Unlocking the mysteries of distributed microservice authorization

Slides:



Advertisements
Similar presentations
SG-A Ad Hoc - ENUM Jordyn A. Buchanan Register.com February 12, 2001.
Advertisements

Delegates & Events Observer and Strategy Patterns Game Design Experience Professor Jim Whitehead January 30, 2009 Creative Commons Attribution 3.0 creativecommons.org/licenses/by/3.0.
Using Digital Credentials On The World-Wide Web M. Winslett.
Cloud Computing for the Enterprise November 18th, This work is licensed under a Creative Commons.
Authorization Scenarios with Signet RL “Bob” Morgan University of Washington Internet2 Member Meeting, September 2004.
Aspect Oriented Programming (AOP) in.NET Brent Krueger 12/20/13.
Microsoft SharePoint Server 2010 for the Microsoft ASP.NET Developer Yaroslav Pentsarskyy
1 Vigil : Enforcing Security in Ubiquitous Environments Authors : Lalana Kagal, Jeffrey Undercoffer, Anupam Joshi, Tim Finin Presented by : Amit Choudhri.
WP3 Authorization and R-GMA Linda Cornwall WP3 workshop 2-4 April 2003.
Messaging. Message Type Patterns Command Invoke a procedure in another application SOAP request is an example Document Message Single unit of information,
CS223: Software Engineering
1 Distributed Systems Architectures Distributed object architectures Reference: ©Ian Sommerville 2000 Software Engineering, 6th edition.
CS223: Software Engineering
100% Exam Passing Guarantee & Money Back Assurance
Microservices & API Gateways Marco Palladino.
Essentials of UrbanCode Deploy v6.1 QQ147
Where are we ? Setup Sprites Input Collision Drawing Sprites
Leveraging the Business Intelligence Features in SharePoint 2010
CSE Retargeting to AE, IPE, and NoDN Hosted Resources
CSE Retargeting to AE, IPE, and NoDN Hosted Resources
Connected Maintenance Solution
MSB Integration Guide.
Chapter 14: System Protection
MSB Integration Guide.
N-Tier Architecture.
MPCS – Advanced java Programming
Gang of Four’s Design Patterns for Microservices
Jessie Kennedy Rob Gales, Robert Kukla
Connected Maintenance Solution
Software Design and Architecture
^ About the.
Advance Software Engineering
Power BI Security Best Practices
Strategic management and Strategy
Magento Technical Guidelines Eugene Shakhsuvarov, Software Magento
Internet Networking recitation #12
About CodeTwo We are a trusted software vendor and Microsoft partner delivering Office 365 and Exchange solutions to over businesses all over the.
About CodeTwo We are a trusted software vendor and Microsoft partner delivering Office 365 and Exchange solutions to over businesses all over the.
GoF Design Patterns (Ch. 26). GoF Design Patterns Adapter Factory Singleton Strategy Composite Façade Observer (Publish-Subscribe)
Jira Workflows for Business Teams
Order Management For Shippers.
Custom Workflow Template
Continuous Automated Chatbot Testing
Arrested by the CAP Handling Data in Distributed Systems
Ashish Pandit, Louis Zelus, Jonathan Whitman
Model-View-Controller Patterns and Frameworks
ONAP Beijing Architecture Chris Donley 1/9/18
Patterns.
Collaborative Business Solutions
Software Architecture
Chapter 6 – Architectural Design
AWS Cloud Computing Masaki.
SharePoint Online Authentication Patterns
SAMANVITHA RAMAYANAM 18TH FEBRUARY 2010 CPE 691
GoF Design Patterns (Ch. 26)
MORE ON ARCHITECTURES The main reasons for using an architecture are maintainability and performance. We want to structure the software into reasonably.
Groups and Permissions
Applying Use Cases (Chapters 25,26)
Applying Use Cases (Chapters 25,26)
Content Delivery and Remote DNS services
Chapter 5 Architectural Design.
Computer Networks Primary, Secondary and Root Servers
ITAS Cash Management Integration to an ERP
DNS Security The Domain Name Service (DNS) translates human-readable names to IP addresses E.g., thesiger.cs.ucla.edu translates to DNS.
Software Development Process Using UML Recap
Chapter 2: System models
Leveraging PIDs for object management in data infrastructures RDA UK Node Workshop, July Tobias Weigel (DKRZ)
Contract Management Software 100% Cloud-Based ContraxAware provides you with a deep set of easy to use contract management features.
ONAP Architecture Principle Review
OU BATTLECARD: Oracle Identity Management Training
Presentation transcript:

Unlocking the mysteries of distributed microservice authorization Wil Schobeiri CTO MediaMath Kasey Klipsch Principal Engineer MediaMath

Wil Who is MediaMath? MediaMath is the leading independent programmatic company for marketers. Went from 30 to 200 engineers in the last 5 years. In the same time, grew from 1 to 6 engineering offices globally. Currently handle 5 million rps across all of our systems. There are 100s of millions of entities in our configuration system.

Wil What this talk is How we are rearchitecting our authorization system for microservices. Start from our typical monolith Show several options we considered by rejected Show the solution we are currently deploying Discuss things we are worried about with our solution Reminder: Authorization is determining if a user has access to a entity

What this talk is not Wil A security presentation A discussion about authentication generally or oauth specifically A security presentation A generic rules engine talk A big reveal of a product Reminder: if access is *not* based on the user its not authorization.

Where did we start?

Our Authorization Model (briefly) Wil Our Authorization Model (briefly) 1 2 5 99 200 89 2 3 10 11 101 1001 99 2 3 87 89

Wil Where we started

Where we (actually) started Wil Where we (actually) started

Enter the microservices Wil Enter the microservices Completely separate authorization: No interaction with existing entities. Different set of rules. Authorization was proxied: Monolith enforced rules. Forwarded enough information for the microservice to proceed.

Enter more different microservices Kasey -> Wil Enter more different microservices Batch/Analytics: Batch driven (thousands of entities to authorize) Internal to the response (e.g. authorizing lines in a report) Naturally cross cutting Event based microservices: RESTful interactions with an entity bus. Standardized system for communicating entity data. Encourages cross cutting microservices.

Kasey Design Patterns

Each microservice controls its own authorization Kasey Each microservice controls its own authorization Authorization rules can be arbitrarily complex. Team most familiar with the entity able to make all the decisions about it. Straightforward mapping of monolith behavior onto microservices.

Each microservice controls its own authorization Kasey Each microservice controls its own authorization Requires rigorous standardization. Requires all teams to think about and develop authorization systems. Boilerplate authorization functionality like audit/compliance is spread everywhere. Does not answer the cross cutting concerns problem.

Authorization middleware for all user interactions. Kasey Authorization middleware for all user interactions. Pros: Authorization team handles authorization complexity and boilerplate. No standardization difficulty. Aligns with other edge elements like load balancing. Cons: Must scale to highest scale system. Reintroduces many of the negatives of the monolith. Still doesn’t solve for non-request reply semantics.

What do would we ideally want? Kasey/Wil What do would we ideally want? Management of what a user’s rules are should occur in one place. Resolution of the rules should be distributable. Creation of authorization rules about entities should be controllable by the owners of the entities. Services other than the owners of the entities, must be able to display the entities. An authorization system must not assume all use cases are request/reply single entity contexts. Rule resolution must not require talking to the owners of entity data.

Kasey Our Solution

The system we want Kasey Rules are stored as data. Distributed by our existing event entity system. Rules can be updated via a system that the authorization team controls. Microservices with scalability concerns or that are not request/reply can cache locally via events. Others can use a restful API into the data.

First step: Determine a data model Kasey First step: Determine a data model 99 2 3 87 89 EVERY ENTITY HAS A: Path: Denormalized encoding of the full branch to the entity. Required Roles: Roles needed to perform one of the CRUD operations. EVERY USER HAS A LIST OF: Path walk: Description of the part of the hierarchy being applied to. Role: The role being given. 89 2

It worked! The case of the massive security hole Wil It worked! The case of the massive security hole The model check exercise found: holes in our data model (expected) edge cases where the monolith was doing odd things (not surprising) a massive security hole (headdesk) Top level entity allowed update/delete for any user attached to it, regardless of role/scope A frequent pattern was to add read only users at the top level to leverage the inheritance rules Result was *lots* of users with highly elevated abilities. Oops. Finding this validated the exercise independent of any other results.

Second step: Publish rules in a distributed data store Kasey Second step: Publish rules in a distributed data store USERS Monolith entities already exist in our entity event system (including users). Daemon that translates monolith user data to new user model. Daemon that translates monolith entity data to new entity model. Published to existing entity event system as new entities. ENTITIES

Third step: Build client libraries and REST API Kasey Third step: Build client libraries and REST API Reference client library that takes user model & entity model. Answers does this user have this access to this entity? Can be embedded in microservices that need local resolution. Also wrapped with a REST API for clients who don’t.

Fourth step: Add support for microservice based entities Kasey Fourth step: Add support for microservice based entities Administration API: Add new required role types to entities. Assign paths and roles to users.

How does this system score on our principles? Wil How does this system score on our principles? Management of what a user’s rules are should occur in one place. The authorization teams publisher acts as the gatekeeper for this. Resolution of the rules should be distributable. Any system can subscribe to the authorization feeds. Creation of authorization rules about entities should be controllable by the owners of the entities. External systems can change the rules via an authorization team endpoint. Services other than the owners of the entities must be able to display the entities. By marrying the authorization streams, client library and the entity streams any service can show data correctly.

How does this system score on our principles? Wil How does this system score on our principles? An authorization system must not assume all use cases are request/reply single entity contexts. System works as well for event driven and batch supplied systems as request/reply ones. Rule resolution must not require talking to the owners of entity data. All of the data is available by our existing Kafka data system.

What are we worried about? Kasey What are we worried about? Globally distributed data is a hard problem. Can the data model hold up into the future: In the face of arbitrarily complex rules or new use cases? Are we going to see cyclical entity relationships? Adoption difficulty

Kasey Key Takeaways Authorizations are now resolvable by all microservices! Modeling things as data instead of code makes them more distributable – across both systems and people. Changes to the data are self serve One team owns the data model

Thanks and questions? ANY QUESTIONS? Kasey There is a whole team at MediaMath doing the hard work of getting this system in place and making sure it meets our needs. They deserve the credit for this system. ANY QUESTIONS?

Wil Thank you! PS: We’re hiring. Come talk to us!