Cloud-native authorization standards

CNCF [Cloud Native Computing Foundation]
1 Nov 202326:08

Summary

TLDROmary Gazit, CEO of Certo, delves into fine-grained authorization, contrasting it with authentication. He highlights the lack of standards in authorization, leading to security vulnerabilities, and emphasizes the need for centralized, fine-grained access control. Gazit discusses the evolution from coarse-grained roles to attribute and relationship-based models, advocating for policy-based access management. He introduces tools like Open Policy Agent and Topaz, promoting real-time, local authorization integrated with centralized policy management. Gazit concludes with the 'Five Laws of Authorization' for building robust systems, offering open-source projects and Certo's commercial solutions for streamlined implementation.

Takeaways

  • πŸ˜€ Omary Gazit, the co-founder and CEO of Certo, has over three decades of experience in software development, with a focus on cloud platforms, identity, and access.
  • πŸ” Authentication and authorization are distinct processes; authentication verifies identity, while authorization determines what an authenticated user can do within an application.
  • πŸ›  The authentication ecosystem is mature with established standards like SAML and OAuth, whereas authorization lacks such standards and often results in inconsistent implementations.
  • 🚨 Broken access control is a significant security issue, ranking top on the OWASP Top 10 list, with 94% of tested applications having vulnerabilities.
  • πŸ“ˆ Modern best practices for authorization include centralizing it through purpose-built services, implementing fine-grained access control, and separating authorization logic from application code.
  • πŸ”— Relationship-based access control (RBAC) and attribute-based access control (ABAC) are evolving models that provide more nuanced permission settings compared to traditional access control lists (ACLs).
  • πŸ“ Policy-based access management involves externalizing authorization logic into a domain-specific language, allowing for better management and versioning of access control policies.
  • 🌐 Real-time access control is crucial for performance and availability, necessitating a local call to an authorization service for every access request.
  • πŸ”„ The 'Five Laws of Authorization' include being fine-grained, policy-based, real-time, centrally managed, and having aggregated decision logs for compliance and forensics.
  • πŸ’‘ Certo offers commercial solutions for authorization, and Gazit encourages exploring open-source projects like OPA and Topaz for building robust authorization systems.

Q & A

  • What is the main difference between authentication and authorization?

    -Authentication is about proving that you are who you say you are, often using methods like emails, passwords, biometrics, or two-factor authentication. Authorization, on the other hand, is about determining what a logged-in user is allowed to do within an application, specifically whether a user has certain permissions on a particular resource.

  • Why is fine-grained authorization important?

    -Fine-grained authorization is crucial for security because it adheres to the principle of least privilege, limiting user permissions to the minimum necessary for their tasks. This minimizes the damage potential from compromised identities and helps maintain a secure and consistent authorization surface area across applications.

  • What is the significance of the OAuth and OpenID Connect standards in authentication?

    -OAuth and OpenID Connect are significant standards in authentication because they provide a mature ecosystem for implementing single sign-on and access delegation. They have been around for almost 20 years, with OpenID Connect being around for about nine years, and they are widely used to enable login without the need for developers to write their own authentication code.

  • What are the common issues with current authorization implementations?

    -Current authorization implementations often suffer from a lack of consistency, leading to security vulnerabilities, such as broken access control, which is the number one issue on the OWASP Top 10 list. Additionally, the lack of standards results in each microservice implementing permissions differently, creating a complex and hard-to-manage authorization landscape.

  • What is the role of centralization in authorization?

    -Centralization in authorization involves creating a single, consistent implementation that can be used across all microservices, reducing the risk of security vulnerabilities and making it easier to manage and reason about the authorization surface area of an application.

  • How does the principle of least privilege relate to authorization?

    -The principle of least privilege in authorization means giving users only the permissions they need to perform their tasks, and no more. This minimizes the potential damage from a compromised identity and is a key reason for implementing fine-grained access control.

  • What is the difference between 'authorization spaghetti code' and extracting authorization logic?

    -Authorization spaghetti code refers to the practice of having numerous if and switch statements scattered throughout microservices, making it difficult to manage and reason about. Extracting authorization logic involves separating this logic from the application code and storing it in a centralized manner, which aligns with the security principle of separation of duties.

  • Why is real-time access control important in authorization?

    -Real-time access control is important because it allows for dynamic decision-making based on the most current data, which is crucial for security. It enables permissions to be checked right before granting access to a protected resource, ensuring that the decision is based on up-to-date information.

  • What are the 'Five Laws of Authorization' mentioned in the script?

    -The 'Five Laws of Authorization' include: 1) Be fine-grained and flexible, 2) Be policy-based, 3) Ensure real-time local authorization, 4) Centrally manage policies and data, and 5) Aggregate and centralize decision logs for compliance and forensics.

  • How does the Topaz project relate to the concepts discussed in the script?

    -The Topaz project is an open-source solution that combines the decision engine from the Open Policy Agent (OPA) with a Zanzibar-like directory model. It aims to offer a fast, flexible, and easy-to-use authorization system that supports various access control models and is designed to be used in any cloud environment.

Outlines

00:00

πŸ˜€ Introduction to Fine-Grained Authorization

Omary Gazit, the co-founder and CEO of Certo, introduces himself and his background in software development, particularly in cloud platforms and identity access. He highlights his experience with Microsoft's Azure Access Control service and his involvement in open-source projects like OpenStack and Kubernetes. Gazit differentiates between authentication and authorization, explaining that while authentication is about verifying identity, authorization is about defining what a user can do within an application. He points out the lack of standards in authorization and the resulting security issues, such as broken access control being the number one vulnerability in applications. He emphasizes the need for a centralized and consistent approach to authorization, contrasting it with the mature ecosystem for authentication.

05:01

πŸ” Modern Authorization Best Practices

Gazit discusses the shift towards centralized authorization services, replacing the old pattern of each service handling its own authorization. He advocates for fine-grained access control, adhering to the principle of least privilege to limit the blast radius of a compromised identity. He criticizes the old practice of authorization spaghetti code and promotes extracting authorization logic out of applications for better separation of duties. Gazit also argues against baking scopes into access tokens, favoring real-time access checks for greater flexibility and security. Lastly, he stresses the importance of comprehensive monitoring and audit trails for compliance and forensics in the event of a breach.

10:02

πŸ“š Evolution of Access Control Models

This section takes a historical view of access control models, starting from access control lists in Unix and Linux, moving to role-based access control with LDAP and Active Directory, and then to attribute-based access control which considers various attributes for decision-making. Gazit then introduces relationship-based access control, popularized by Google's Zanzibar system, which models access control rules as relationships between subjects and objects. He also discusses the emergence of two ecosystems for fine-grained authorization: policy-as-code with Open Policy Agent and policy-as-data with various RBAC implementations.

15:05

πŸ› οΈ Policy-Based Access Management

Gazit explains the concept of policy-based access management, which involves lifting access control logic out of application code and expressing it in a domain-specific language. He uses Rego, the policy language for Open Policy Agent, to illustrate how policies can be written and managed separately from application code. This approach allows for easier evolution of access control policies and separation of concerns between application developers and security teams. He also mentions the use of middleware to simplify the integration of authorization checks in applications.

20:06

⏲️ Real-Time Access Control and Distributed Systems

The speaker emphasizes that authorization is a distributed systems problem, requiring fast and local decision-making while maintaining centralized management of policies and data. He argues against hosted services for authorization due to the critical nature of authorization decisions in the request path of applications. Gazit outlines the need for a control plane to manage policies, data, and decision logs, suggesting the use of technologies like Open Policy Agent and Topaz for building such systems. He concludes with the 'Five Laws of Authorization' that organizations should consider when building an authorization system, including being fine-grained, policy-based, real-time, centrally manageable, and having aggregated decision logs.

25:06

πŸ“’ Closing Remarks and Resources

In conclusion, Gazit provides resources for those interested in learning more about authorization, including the Topaz project and the Open Policy Containers project. He invites the audience to engage with him on social media, join the Certo Slack community, and explore the Topaz GitHub repository. He also mentions that Certo offers commercial solutions for organizations that prefer not to build their own authorization systems from open-source projects.

Mindmap

Keywords

πŸ’‘Authentication

Authentication is the process of verifying the identity of a user or system. In the context of the video, it is described as proving that you are who you say you are, traditionally done through methods like passwords, but now also including more sophisticated methods like biometrics and two-factor authentication. The video emphasizes that while authentication is a mature field with established standards like SAML and OpenID Connect, authorization remains a more complex issue.

πŸ’‘Authorization

Authorization refers to the set of rules and practices that determine who is allowed to perform certain actions or access specific resources within a system. The video discusses the importance of fine-grained authorization, which is about defining specific permissions for users on particular resources, as opposed to broader roles or groups. It is highlighted as a more challenging problem compared to authentication, with less standardization and more room for inconsistency across different applications and services.

πŸ’‘Fine-grained Authorization

Fine-grained authorization is the concept of defining very specific access controls for users, often down to the level of individual actions or resources. The video speaker is excited about this concept because it allows for greater security and flexibility. It contrasts with coarse-grained roles that might give too much access, which is a problem the video aims to address by advocating for more precise control mechanisms.

πŸ’‘OAuth

OAuth is an open standard for access delegation, commonly used as a way for users to grant websites or applications access to their information on other websites without exposing their password. The video mentions OAuth as one of the developer services that have made implementing login mechanisms easier, indicating a shift away from custom login implementations towards standardized services.

πŸ’‘Role-Based Access Control (RBAC)

RBAC is a method of restricting system access to authorized users. It is based on the roles within an organization, and the video discusses how it has evolved from simple group-based access to more complex models. The video contrasts RBAC with Attribute-Based Access Control (ABAC) and Relationship-Based Access Control (ReBAC), highlighting the move towards more granular and flexible access control models.

πŸ’‘Attribute-Based Access Control (ABAC)

ABAC is an access control method where access rights are granted to users through the use of policies which take into account the attributes of the user, the resource, and the environment. The video explains how ABAC allows for more nuanced access control decisions based on various attributes, rather than just roles, which can lead to more secure and flexible systems.

πŸ’‘Relationship-Based Access Control (ReBAC)

ReBAC is an access control model that focuses on the relationships between users (subjects) and resources (objects). The video discusses how ReBAC can provide a more intuitive way to manage permissions, especially in systems with complex relationships like Google Docs, where permissions are not just about roles but also about how users are connected to each other and to resources.

πŸ’‘Policy as Code

Policy as Code is the practice of managing system policies through code repositories, version control, and software development practices. The video advocates for this approach for authorization policies, suggesting that it allows for better management, auditability, and consistency across different parts of an application or organization.

πŸ’‘Open Policy Agent (OPA)

OPA is an open-source project that provides a general-purpose policy engine that can enforce policies in microservices, Kubernetes, CI/CD pipelines, API gateways, and more. The video mentions OPA as a flagbearer for the 'policy as code' camp, highlighting its role in the ecosystem of fine-grained authorization tools and its flexibility in handling different types of policies.

πŸ’‘Zanzibar

Zanzibar is Google's system for access control across a variety of their services. The video references Zanzibar as an inspiration for other tech companies to build centralized authorization services, indicating a trend towards moreθ§„ζ¨‘εŒ– and consistent authorization mechanisms across different services and applications.

Highlights

Introduction to the concept of fine-grained authorization and its growing importance.

Background of the speaker, Omary Gazit, including his experience with Microsoft and open-source projects.

The distinction between authentication and authorization, with a focus on the maturity of authentication processes.

The current state of authorization, highlighting the lack of standards and the prevalence of inconsistent implementations.

The security risks associated with poor authorization practices, including the top spot of broken access control in the OWASP Top 10.

The benefits of centralizing authorization and the trend among tech organizations to build centralized authorization services.

The evolution from coarse-grained roles to fine-grained access control, adhering to the principle of least privilege.

The shift from authorization spaghetti code to extracting authorization logic and separating concerns.

The drawbacks of baked-in access token scopes and the move towards real-time access checks.

The importance of comprehensive monitoring and decision logging for compliance and forensics.

The rise of purpose-built authorization services and the influence of Google's Zanzibar system.

A comparison of different authorization models, including RBAC, ABAC, and the emerging ReBAC models.

The policy-as-code movement and its benefits for managing access control policies.

The implementation of real-time access control as a local call for performance and availability.

The Five Laws of Authorization as a framework for building an organization-wide authorization system.

Practical advice on adopting authorization solutions, including the use of open-source projects like OPA and Topaz.

The offerings of Certo, the company behind Topaz, in providing commercial solutions for authorization.

Transcripts

play00:00

hello my name is omary gazit I'm the

play00:03

co-founder and CEO of Certo an

play00:06

authorization company and I'm very

play00:08

excited to spend the next 30 or so

play00:11

minutes with you talking about fine

play00:13

grained authorization and why

play00:14

everybody's so excited about

play00:18

it first a little bit about myself I've

play00:21

spent well over three decades building

play00:23

software for developers um the last 15

play00:28

years of which uh we're really focused

play00:29

on on cloud platforms uh in identity and

play00:32

access in particular I love doing

play00:34

startups this is my third startup uh and

play00:37

when I'm not start uping I'm skiing I

play00:40

was super fortunate to have worked on

play00:41

some really cool projects uh over my

play00:44

career uh I was one of the co-founders

play00:46

of the net project at Microsoft uh as

play00:49

well as the Azure project where I was uh

play00:51

I worked on Azure Access Control service

play00:54

that became Azure active directory uh

play00:56

and then the last 10 years I spent a lot

play00:58

of time in the open source Source base

play01:00

uh working on things like openstack and

play01:02

specifically I am an openstack Cloud

play01:05

Foundry where I was a board member U

play01:07

puppet in

play01:10

kubernetes so let's start by talking

play01:12

about the differences between

play01:14

authentication and authorization some

play01:16

people talk about them as being the same

play01:18

thing off but they really are two

play01:20

distinct processes authentication is

play01:23

really about proving that you are who

play01:24

you say you are so in the old days we

play01:26

used to do it using emails and passwords

play01:29

and these days is we have password list

play01:31

and Biometrics and magic links and two

play01:35

Factor but ultimately it's the same

play01:38

process and the ecosystem at this point

play01:40

is pretty mature we've had standards in

play01:42

the space for almost 20 years now saml

play01:45

is the OG The Original Gangster of um

play01:48

single sign on standards uh and open ID

play01:51

connect has been around for about nine

play01:53

years oo 2 a little bit longer than that

play01:56

and we also have some fairly mature

play01:58

developer services right so you can use

play02:00

OCTA or ozero or Azure active directory

play02:03

or Cognito uh to be able to implement

play02:06

login without having to write it

play02:08

yourself in fact no one writes login

play02:10

anymore everybody uses a developer

play02:12

service so this is mostly a solved

play02:14

problem for

play02:15

developers authorization not so much now

play02:18

authorization is once you're logged in

play02:21

what can you do in the context of this

play02:23

application and specifically do you as a

play02:26

user have this particular permission on

play02:28

this particular resource

play02:30

now there are not any real standards in

play02:32

the space as of yet certainly there are

play02:34

patterns like rback and aback which

play02:36

we'll talk about later um and there's

play02:39

also no implementations at scale at

play02:42

least of developer Services right every

play02:45

framework every language has uh a set of

play02:48

libraries uh every framework has a set

play02:50

of libraries that help you build uh

play02:52

authorization but really every one of

play02:55

these implementations is fairly

play02:56

inconsistent that creates a lot of

play02:58

problems the first first one is bad

play03:00

security uh and the case in point is

play03:03

that number one on the oosp top 10 list

play03:07

of application security issues is broken

play03:09

access control so they've tested uh a

play03:12

whole bunch of applications and like a

play03:14

whopping 94% of the applications that

play03:17

they tested have had some sort of broken

play03:20

Access Control vulnerability so this is

play03:22

a huge problem um uh in terms of

play03:25

security Now not to mention the fact

play03:28

that if every micro service implements

play03:31

permissions differently you have a a

play03:33

budg of inconsistency in the application

play03:35

and it's really hard to reason about the

play03:38

authorization surface area of your

play03:39

application not to mention the

play03:41

opportunity cost imagine that you had to

play03:43

go build login uh by yourself or text

play03:46

messaging or uh payments or things like

play03:49

that that's just a whole bunch of wasted

play03:51

effort um and that is unfortunately

play03:54

still the state-of-the-art with

play03:55

authorization every application

play03:57

essentially rolls their own

play04:01

now things are not all bad it turns out

play04:04

that a lot of Technology organizations

play04:06

in the last couple of years have been

play04:08

looking at authorization as something

play04:10

that they need to centralize and they've

play04:11

been been giving it to their platform

play04:13

Services teams or Central Services teams

play04:16

to go build a single consistent

play04:18

implementation and they're writing about

play04:20

it so a lot of Technology organizations

play04:23

have written papers or blog posts or

play04:26

have given talks about how they do

play04:28

authorization and if you look at um all

play04:31

the different patterns uh that they've

play04:33

written about they're really five that

play04:35

bubble up to the surface and we contrast

play04:38

those here with some of the old school

play04:40

or anti patterns the first one is that

play04:42

each service does its own authorization

play04:44

this one's kind of obvious right in the

play04:46

modern best practice is that these

play04:48

technology companies are basically

play04:50

empowering their censal services teams

play04:53

to go build a purpose-built

play04:54

authorization service that all the other

play04:57

microservices can actually go rely on

play05:01

the second uh anti pattern is to use

play05:04

coar grained rolls that are baked into

play05:06

the applications and the modern best

play05:09

practice is to uh replace that with fine

play05:12

grain to access control really adhering

play05:15

to the principle of lease privilege what

play05:17

that principle means is you want to

play05:19

basically give as much permission to the

play05:22

user as they need to be able to do their

play05:25

job but no more than that and the reason

play05:28

why is because if you have a compromised

play05:30

identity you want to limit the blast

play05:32

radius of what that user can do and so

play05:34

it just makes sense to lock down

play05:36

permissions as much as possible and that

play05:38

really is the the impetus for fine grain

play05:41

access

play05:42

control the third one is that you know

play05:45

you find in the you know kind of old

play05:47

school way of doing things authorization

play05:50

built as a bunch of if and switch

play05:51

statements in each of the microservices

play05:55

so authorization spaghetti code is what

play05:57

we call it and the best practice is to

play06:00

extract the authorization logic out of

play06:03

the micros service out of the

play06:04

application and store inversion it

play06:06

separately really achieving a separation

play06:08

of concerns that enables in turn uh

play06:11

another important security principle

play06:13

called separation of Duties so you have

play06:15

the application developers worrying

play06:17

about the application code then you have

play06:19

people who really reason about the

play06:21

authorization surface area able to go

play06:23

look at all the authorization policy Al

play06:26

together and figure out uh whether that

play06:29

authorization policy makes

play06:31

sense the fourth anti- pattern is

play06:34

creating uh Scopes that are baked into

play06:37

access token as

play06:39

permissions and the modern best practice

play06:42

is to make a realtime call to an

play06:45

authorization service right before you

play06:47

want to Grant access to a protected

play06:49

resource a realtime access checks why is

play06:52

uh relying on Scopes baked in Access

play06:55

tokens bad well you know for a number of

play06:57

reasons first of all um they basically

play07:00

have a lifetime so as soon as you mint

play07:02

that access token it's good for two

play07:04

hours or two days for for as long as

play07:07

that access token is good for and so if

play07:09

you want to actually take away

play07:11

permissions uh that's not quite possible

play07:13

without token revocation which which is

play07:15

a really complicated thing uh if you're

play07:17

making a real-time access check right

play07:20

before you grant access to a protected

play07:21

resource you don't need to rely on

play07:24

essentially kind of uh stale tokens the

play07:27

other thing that uh these tokens don't

play07:29

really give you uh the ability to do is

play07:32

find grained access control so let's say

play07:35

that you wanted to Grant somebody the

play07:37

right to read a document if you put a

play07:39

read document scope in an access token

play07:41

well you know the calling application

play07:43

can go look at that scope and say okay

play07:46

uh the user can read a document but

play07:48

which document all the documents are you

play07:51

going to go create a scope for every

play07:52

document that the user has access to at

play07:55

login time you know clearly it's just

play07:57

not a scalable practice

play08:00

and then lastly um most applications

play08:03

sadly barely even have a trace of the

play08:06

you know the the folks who have logged

play08:08

into them much less any kind of fine

play08:10

grained audit trail of what users have

play08:13

done in the application and the modern

play08:15

best practice is to have comprehensive

play08:18

monitoring basically uh record the

play08:21

decision log for each decision that the

play08:24

application made and be able to

play08:25

centralize that for compliance and

play08:27

forensics again you know a breach is not

play08:30

a matter of if it's a matter of when at

play08:31

this point in time and so once you

play08:34

detect that something happened you

play08:36

really want to know why it happened you

play08:38

want to have the forensics uh to figure

play08:40

out how the application uh did the

play08:43

authorization what you know the

play08:46

application authorized the user to do uh

play08:48

and of course it's also very important

play08:50

for compliance uh you need to be able to

play08:52

prove that users were only able to do

play08:54

what they were allowed to do within the

play08:56

scope of the

play08:58

application

play09:00

great so let's dive into each one of

play09:02

these the first one I want to dive into

play09:04

is these uh this idea of purpose-built

play09:06

uh authorization service it seems like

play09:08

it's the new hotness everywhere we look

play09:10

uh there's some tech company that's

play09:12

writing a paper about it so it started

play09:14

out about three years ago with Google uh

play09:16

writing about their Zanzibar system

play09:18

Zanzibar is basically their uh

play09:20

distributed system for uh access control

play09:23

for a wide variety of Google services

play09:25

Google Docs Google Drive Google Calendar

play09:28

uh uh cloud and so on and so forth and

play09:32

um it's a large scale Planet scale

play09:35

service and one of the things that

play09:38

they've done is they've created

play09:40

essentially this new model uh that they

play09:42

coined the term relationship based

play09:44

access control for and we'll talk about

play09:46

that uh in a couple slides um into it

play09:49

built one that's based on a different

play09:51

set of principles more of a uh attribute

play09:53

based model hedi from Airbnb was

play09:56

inspired by Zanzibar in fact uh the AR

play09:59

architect for hedi was one of the folks

play10:02

on the Zanzibar team from Carta was also

play10:05

inspired by the Zanzibar paper Netflix

play10:07

is again more of an aback model so we

play10:10

have different types of implementations

play10:12

but all these folks are basically

play10:14

building uh these centralized services

play10:17

and so that you know every one of their

play10:19

application teams doesn't have to

play10:21

reinvent that

play10:24

wheel the next principle is fine grained

play10:27

access control and so let's go down a

play10:29

trip down memory lane here and talk

play10:31

about how that's evolved over the years

play10:34

so back in the 80s and 90s we had uh

play10:37

Unix systems and later on Linux systems

play10:40

uh and NT and those relied on access

play10:43

control lists basically the type of

play10:45

question that you answered with an

play10:46

access control list was does Alice have

play10:48

read access to this file a file system

play10:51

had read write and execute bits uh for

play10:53

users and groups and other and that was

play10:55

basically the as fine grained and access

play10:58

control model model as you could get uh

play11:00

with Linux

play11:02

systems now in the '90s and 2000s we saw

play11:06

uh this new idea called the directory

play11:09

ldap uh and later on active directory

play11:12

basically uh ushered in this idea of

play11:15

role-based access control so roles were

play11:17

typically implemented as groups so you

play11:19

for example had a group in ldap or

play11:21

active directory that you put users in

play11:23

and that would correspond to a role in a

play11:25

business application and you can answer

play11:27

questions like is Bob in the sales admin

play11:29

role by seeing whether Bob was in that

play11:31

group you had this idea of nested groups

play11:34

and you know life was kind of simple but

play11:36

pretty clunky and very much coarse

play11:38

grained the problem there was that you

play11:40

had this group explosion where uh in

play11:42

Microsoft I remember we had uh let's

play11:44

call it you know 50,000 users uh at at

play11:47

one time in 250,000 groups uh so it was

play11:50

impossible to reason about what

play11:51

permissions uh users actually

play11:54

had in the 2000s and 2010s we had this

play11:58

new idea called attribute based access

play12:00

control and the idea there was that you

play12:02

basically computed Access Control

play12:04

decisions based on attributes either on

play12:07

the user or on the resource or even

play12:10

environmental attributes so you could

play12:11

answer questions like is mallerie have

play12:14

access if mallerie is in the sales

play12:16

department and the document is in the

play12:18

sales folder and it's currently working

play12:20

hours um so you could write a policy

play12:23

that evaluated all those attributes and

play12:25

gave you a yes or no answer the you know

play12:28

the original system that implemented

play12:30

this uh was known as exactl uh that's

play12:33

kind of like the Original Gangster of uh

play12:35

the ABAC systems and of course uh you

play12:38

know now in the last five years we've

play12:39

had successors to that and I'll talk

play12:41

about that in the next slide and lastly

play12:44

uh we have relationship based access

play12:46

control like I said before it actually

play12:47

predates the Google's ends of our paper

play12:49

but Google uh really repop poize that

play12:52

model uh and the idea is that you

play12:54

basically have relationships defined

play12:56

between subjects and objects so so for

play12:59

example uh a subject like Eve is a user

play13:02

and she can be in a group uh and that

play13:05

group can have say view access on a

play13:07

folder and there can be documents inside

play13:11

that folder and so we can answer

play13:13

questions uh like does Eve have read

play13:15

access to this document uh by chasing

play13:19

the edges that link uh between that

play13:21

subject Eve and the object uh the that

play13:24

particular document and see whether

play13:26

those edges carry the read permission

play13:31

so after the history lesson uh let's uh

play13:34

fast forward to the present over the

play13:35

last 5 years we've seen two different

play13:37

ecosystems emerge around fine gr

play13:40

authorization the first one I call the

play13:42

policy is code Camp uh and the flag

play13:45

bearer for that is the open policy agent

play13:47

project uh which basically started from

play13:50

the aback uh view of the world and so

play13:53

there's a lot of stuff going for it it's

play13:55

a cncf graduated project it graduated

play13:57

about two and a half years ago so

play13:58

there's a single mature open source

play14:00

implementation it's a general purpose

play14:02

decision engine uh fairly flexible and

play14:05

primarily used today for infrastructure

play14:07

authorization scenarios like kubernetes

play14:09

admission control uh and it's really

play14:11

tailor made for policy based access

play14:14

management and ABAC it's essentially the

play14:16

successor to exagal now there are some

play14:18

drawbacks as well the language is has a

play14:22

high learning curve so unless you're a

play14:24

prolog head you know this is a side

play14:26

effect free data log derivative uh and

play14:30

you have to kind of go build your

play14:31

authorization model from first

play14:33

principles it's really an unopinionated

play14:35

language so you have to kind of design

play14:37

your authorization mod model from

play14:39

scratch and it's a little like you know

play14:41

writing something in the sembler

play14:42

language and furthermore you really

play14:44

don't have much help with how to manage

play14:46

data in the system Opa has an effective

play14:49

policy plane but it doesn't really have

play14:51

a data plane so if you want to start

play14:53

with Opa you have to kind of roll that

play14:55

out on your own on the other side

play14:57

there's the Zanzibar model model uh I

play14:59

call this the policy as data camp and

play15:01

like I said before Google uh built their

play15:05

uh model over an abstract model called

play15:07

reback relationship based Access Control

play15:09

they didn't invent it but they certainly

play15:11

popularized it uh if Opa has no opinions

play15:14

reback has plenty of opinions it's a

play15:15

very opinionative model uh and the idea

play15:18

is again like I said you're modeling

play15:20

your um access control rules essentially

play15:23

as data as a set of relationships

play15:25

between subjects and objects and so if

play15:27

your domain looks a lot like Google Docs

play15:30

you have subjects like users and groups

play15:32

uh and objects like uh folders and files

play15:36

you can uh very much use this as an

play15:39

opinionated model that you can start

play15:41

from now it's a fairly immature

play15:43

ecosystem there are at least half a

play15:44

dozen uh competing open source

play15:46

implementations uh because Google didn't

play15:48

open source anything they didn't even

play15:50

write a spec they built they wrote a

play15:52

technical report so there are uh a bunch

play15:55

of different uh open source

play15:56

implementations at this point and they

play15:58

don't really share uh any common schema

play16:00

language or a common data language uh

play16:02

and it's also hard to extend the reback

play16:04

model into uh attributes although some

play16:07

of these projects are starting to do

play16:09

that uh they're they each do it in kind

play16:12

of an inconsistent way as

play16:14

well now fortunately there's a third

play16:16

path uh we call this the uh don't

play16:19

succumb to the tyranny of the ore a lot

play16:21

of people think of these as competitive

play16:23

ideas but we think of them as compliment

play16:25

and so topaz is a project uh that Asser

play16:28

of my company maintains but the idea

play16:30

there is to take the Best of Both Worlds

play16:32

you take the decision engine from Opa

play16:34

and so you have a policy based Access

play16:36

Control model uh that is uh supports

play16:39

attributes and you take the Zanzibar

play16:41

directory and you kind of put them

play16:42

together in a single open source project

play16:44

that's delivered as a single container

play16:46

image so here I have a as a reference a

play16:49

URL to Topaz uh go check it out uh the

play16:52

QR code will also take you to the GitHub

play16:57

repo the next principle I want to talk

play17:00

about is policy-based access management

play17:02

and as a reminder this is the idea of

play17:04

lifting the access control logic out of

play17:07

the application where it's uh expressed

play17:09

as if or switch statements and instead

play17:12

expressing it in its own domain specific

play17:14

language uh and storing and versioning

play17:17

it as code just like any application

play17:20

artifact so here I have a policy written

play17:23

in Rego uh which is the surface syntax

play17:26

for the open policy agent this happens

play17:28

to be a topaz policy uh because it has a

play17:31

little bit of an Easter egg here uh that

play17:34

uh basically uh makes a call to one of

play17:37

the topaz built-ins uh that computes the

play17:40

policy based on a relationship between a

play17:44

subject the user and an object uh one of

play17:48

their reports so this policy has two

play17:50

allowed Clauses one of them uses

play17:52

attributes so uh basically you're

play17:54

allowed if the uh logged in user's

play17:57

property is a Department property I

play18:00

should say equals operations or you're

play18:02

allowed if you're the manager of uh this

play18:04

particular user and so it's important to

play18:08

note that uh it's not just Opa that

play18:11

adheres to this principle any Zan ofar

play18:13

BAS system also equally believes that

play18:16

you should extract that policy logic

play18:18

don't express it as if in switch

play18:20

statements inside of your application

play18:22

instead store inv verion it as a domain

play18:26

model but what does that get you

play18:29

basically instead of having to go again

play18:32

like I said write if we switch

play18:34

statements to express authorization

play18:36

logic you can go use a middleware so

play18:40

here we have this check off Z middleware

play18:42

that we've placed in the dispatch path

play18:44

of uh this route Handler for this

play18:46

node.js this expressjs uh route Handler

play18:50

and all we have to do is just uh tell

play18:53

the developer to make sure to call that

play18:55

middleware that middleware makes a call

play18:57

to an authorization server that computes

play18:59

a decision if that decision comes back

play19:01

as uh you know aess denied uh the whole

play19:05

route gets uh basically returns and

play19:07

access denied otherwise you dispatch to

play19:10

the next Handler here what does that

play19:12

give you uh it allows you to store

play19:14

inversion uh that policy artifact just

play19:17

like you do application code and every

play19:20

policy change is part of a get change

play19:22

log so every Access Control change that

play19:24

you want to make in the policy is loged

play19:27

just like any other

play19:28

uh G change uh so that means that the

play19:31

policy can evolve uh from using a

play19:34

different team so a different team like

play19:36

the security team can own that policy

play19:38

and it's decoupled from the application

play19:40

Logic the application delivery team

play19:42

doesn't have to worry about uh how to

play19:44

evolve that access control logic and the

play19:46

security team can reason about the

play19:49

entire surface area uh authorization

play19:51

surface area of the application lastly

play19:53

we think of these policies as something

play19:56

that you should treat just like like any

play19:59

application artifact so application code

play20:01

you build into an immutable image

play20:03

typically a dock or container that's how

play20:05

you distribute it and that's the same

play20:07

thing that you should do with policies

play20:09

you should build them into oci images

play20:11

and sign them using something like

play20:13

cosign to secure uh the software supply

play20:16

chain for these artifacts in fact here I

play20:18

have a reference to a project called the

play20:20

open policy containers project which is

play20:22

a cncf u sandbox project s is also

play20:25

involved with that uh and you can build

play20:27

not just topaz policies but also any

play20:30

generic Opa policy into a container

play20:32

image sign it with cosign and verify the

play20:37

signatures and lastly I want to talk

play20:39

about real time access control so this

play20:42

is where I kind of go into my

play20:44

infomercial about authorization actually

play20:47

being a distributed systems problem and

play20:49

I'll explain why I what I mean by

play20:52

that you really need to do authorization

play20:55

locally authorization is different than

play20:57

any other developer service because if

play20:59

you think about uh things like stripe or

play21:01

twilio or even ozero those are hosted

play21:03

services and it's fine for them to be

play21:05

hosted because you basically make a call

play21:08

to them and it's important that that

play21:10

call complete and it's important that

play21:11

they maintain you know a high SLA but

play21:14

you know it doesn't really matter if it

play21:17

happens in a second uh because it turns

play21:20

out that it's not really in the critical

play21:22

path of every application request

play21:24

whereas authorization is if you're doing

play21:26

it correctly uh you're basically making

play21:28

a call to the authorization system right

play21:31

before you grant access to a protected

play21:33

resource and that can happen one or more

play21:35

times for every user request so it's got

play21:39

to be fast it's got to be done in around

play21:42

a millisecond and it's got to be 100%

play21:45

available to the calling application so

play21:47

it can't really be a hosted

play21:49

service but um you also want to be able

play21:53

to manage all of the policies and the

play21:56

data that's used for authorization in a

play21:58

centralized manner so you really need to

play22:02

have some kind of control plane that

play22:04

allows you to manage the life cycle of

play22:08

policies uh and as well as uh you know

play22:11

all the all the data all the user and

play22:13

group and resource data that are used

play22:16

for policy decisions uh and

play22:18

relationships and be able to mediate

play22:20

those decision logs back to a

play22:22

centralized control plan so data uh

play22:25

about users comes from an identity

play22:27

provider

play22:28

uh data from you know the source code

play22:30

for policies comes from a source code

play22:33

control system and then decision logs

play22:35

really want to end up in your scene tool

play22:37

in your log aggregation tool so you

play22:40

really need kind of this central control

play22:42

plane that allows you to manage all this

play22:44

stuff at

play22:47

scale so as we bring this presentation

play22:50

to a close I want to close with what we

play22:52

call the Five Laws of authorization if

play22:55

you're building an authorization system

play22:58

for your entire organization you want to

play23:00

have it have the following five

play23:02

properties at the very least you want to

play23:04

be fine grained and you want it to be

play23:06

also flexible enough to support all the

play23:07

different types of authorization models

play23:10

so rback aback reback any combinations

play23:12

of them you want to make it policy based

play23:15

so you really want to make sure that you

play23:17

give the opportunity to the application

play23:20

developers to not have a bunch of switch

play23:23

and if statements in their code and

play23:24

instead allow them to extract the

play23:26

authorization policy their applications

play23:29

and store and version it into in it as

play23:31

its own artifact that you can actually

play23:33

go build into assigned image make sure

play23:36

that authorization is done in real time

play23:39

as a local call executing over fresh

play23:42

data and yet you want to have Central

play23:45

management of the policies and all the

play23:47

resource data that are used in

play23:49

authorization decisions and finally you

play23:51

want to Aggregate centralize and

play23:53

aggregate all the decision logs that

play23:55

come out of these authorization requests

play23:57

so that you can use those later for

play23:59

compliance and forensics and if you're

play24:02

building a system like this you also

play24:03

want some nonfunctional requirements

play24:06

like you want to make it super easy for

play24:07

your developers to adopt so uh you want

play24:10

to uh have a system that allows you to

play24:12

do authorization uh to an external

play24:15

system with a single line of code you

play24:17

want to be able to have it integrate

play24:18

with all of the systems you already have

play24:20

so identity providers uh source code

play24:22

repositories artifact Registries logging

play24:25

systems and finally uh it's important

play24:28

for it to be open uh so you get a lot of

play24:30

ecosystem effects from betting on

play24:32

kubernetes Native Technologies like open

play24:34

policy agent and

play24:37

topaz now this is a lot of work to do

play24:40

and fortunately there are some places to

play24:42

start there are open source projects

play24:43

that you can start from Opa is one of

play24:45

them topaz is one that I've talk talked

play24:47

about as well it's the project that my

play24:49

company maintains so we're very partial

play24:51

about it um this is a QR code for

play24:54

getting to the repo and topaz uh we'

play24:56

like to say that it's fast flexible and

play24:58

easy fast uh it does authorization in

play25:01

under a millisecond flexible it supports

play25:03

all the different U Access Control

play25:06

Models All The Backs as we like to say R

play25:08

back a back and reback it runs in any

play25:10

cloud and finally easy it has sdks uh it

play25:14

has grpc apis it has rest apis graphql

play25:17

apis sdks from every language so it's

play25:19

super easy for your developers uh to

play25:22

incorporate no matter what language

play25:23

they're

play25:24

using and lastly my company ass Certo

play25:28

uh basically builds commercial solutions

play25:30

for authorization so if this is not

play25:32

something that you want to roll out by

play25:33

hand using open source uh we're happy to

play25:36

provide you readymade Solutions thank

play25:38

you so much for listening over the last

play25:41

almost 30 minutes uh please come find me

play25:44

on social I'm om G at Twitter I'm

play25:47

rto.com if you have any questions or

play25:50

comments uh we'd love to answer U join

play25:52

our slack uh it's at aso.com slack uh

play25:56

check out our repo uh that's soru ddev

play26:00

toaz on GitHub and uh let us know what

play26:04

you think thank you so

play26:06

much

Rate This
β˜…
β˜…
β˜…
β˜…
β˜…

5.0 / 5 (0 votes)

Related Tags
AuthorizationAccess ControlSecurityCloud PlatformsIdentity ManagementOpen SourceMicroservicesComplianceCertoTech Innovation