Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
@Intercominc Staff Engineer Miles McGuire shares the solution they created to ensure that they never “cross the streams” on customer data using ActiveRecord and Rails’ MemCacheStore, as well as the exciting knock-on benefits it offered for observability. Links: https://rubyonrails.org/ https://api.rubyonrails.org/classes/ActiveSupport/Cache/MemCacheStore.html #RailsWorld #RubyonRails #Rails7 #security #datasecurity #observability #ActiveRecord
Date
Summarized using AI?
If this talk's summary was generated by AI, please check this box. A "Summarized using AI" badge will be displayed in the summary tab to indicate that the summary was generated using AI.
Show "Summarized using AI" badge on summary page
Summary
Markdown supported
In the presentation titled "Guardrails: Keeping customer data separate in a multi-tenant system" at Rails World 2023, Miles McGuire, a Staff Engineer at Intercom, discusses a project aimed at enhancing data separation in their complex multitenant Rails application. This talk outlines a systematic approach to address potential security issues and improve observability within a 12-year-old codebase. **Key Points:** - **Context of Multitenant Systems:** McGuire explains that in a multitenant system, customer data is stored in a shared database despite being logically separate. This structure can lead to serious issues if the separation is not strictly maintained. - **Complex Data Model:** With nearly 800 Active Record models, Intercom's data model evolution over the years has increased complexity, posing risks of accidental data leakage between customers. - **Identifying Problems:** Examples highlight how common practices led to security risks. For instance, mishandling URI parsing or misunderstanding non-unique identifiers in a sharded database can mistakenly retrieve incorrect data. - **Need for Systematic Solutions:** The existing reliance on best practices and manual QA was insufficient, prompting the necessity for a structured solution. - **Scope of the Solution:** The team prioritized focusing on safe loading of Active Record objects and cache operations, aiming to define strict app-specific data access rules. - **Implementation Strategy:** By establishing a "safe app" context for requests, they could better regulate data access. This involved checking app IDs on model instantiation to prevent unauthorized data access. - **Results:** The implementation led to a significant reduction in the instantiation of Active Record objects without a defined safe app, enhancing both security and performance. - **Observability Gains:** By tracking data interactions through Honeycomb, the team discovered new insights into user activity, aiding in better resource management and decision-making. - **Conclusion:** McGuire underscores the importance of formalizing assumptions in data modeling, which not only improved security but also facilitated broader enhancements in their system. Ultimately, Intercom's structured approach serves as a case study in how complex systems can safeguard customer data while enhancing operational efficiency and observability.
Suggest modifications
Cancel