SlideShare a Scribd company logo
Role Based Access Control
Peter Edwards
peter@dragonstaff.co.uk


Birmingham.pm
Perl Technical Talk
22nd October 2008




                                  Peter and Léon Brocard at Google Dev Day

                                                                                   1
      Role Based Access Control                                              12/22/12
Contents
   1. Requirement and Solution
   2. Authentication and Authorisation Definitions
   3. Authentication Process
   4. Authentication Example
   5. Authentication Session
   6. More Authentication Session Examples
   7. Authorisation Types
   8. Article On Simple Authorisation
   9. Simple Authorisation in Catalyst
   10. CPAN Lattice-Based Access Control Example
   14. Role Based Access Control
   14.1. Academic Papers
   14.2. Emerging Standards and Implementations
   14.3. Existing Security Implementations
   14.4. Perl Implementations
   14.5. RBAC Design
   14.6. RBAC Example
   15. Further Information

                                                              2
Role Based Access Control                             12/22/12
Requirement
 Controlling  user access to applications and
   the data within them

Solution
 Identify each user
 Grant them permissions to work with
  applications and data
 Test for that when they use the application




                                                3
Role Based Access Control               12/22/12
Authentication and Authorisation
Definitions
 Authentication  is the validation of a userid
  that is used by a user or batch process
 Authorisation is checking that a userid is
  allowed to perform certain operations on
  an object
  can <user> "fred" do <operation> "delete" on
  <object> "/home/fred/somefile.txt" of <object_type>
  "file"




                                                      4
Role Based Access Control                     12/22/12
Authentication Process
 user/batch  process requests access for <userid>
  using <credential> from a server
 server validates credential (e.g. password or key
  challenge certificate) against userid and returns
  an <authentication_token> (e.g. a cookie or hash
  token) which is linked server side to the userid,
  typically in a session store
 user/batch process supplies the authentication
  token along with subsequent requests to the
  server
 on receiving a request the server
   – validates the authentication token
   – checks the linked userid has authorisation to
     perform the given request
                                                             5
Role Based Access Control                            12/22/12
Authentication Example
http://search.cpan.org/perldoc?Authen::Simple

use Authen::Simple::Passwd;

my $passwd = Authen::Simple::Passwd
 ->new(path => '/etc/passwd');

if ( $passwd->authenticate( $username,
   $password ) ) {
      # successfull authentication
}
                                                        6
Role Based Access Control                       12/22/12
Authentication Session
   Once authenticated, you'll need a session to persist that, otherwise
    you'd need to ask for the userid/password every time
   Using Authen::Simple with Apache gives us an implicit session

    # a mod_perl Authen handler
    PerlModule Authen::Simple::Apache
    PerlModule Authen::Simple::Passwd
    PerlSetVar AuthenSimplePasswd_path "/etc/passwd“
    <Location /protected>
       PerlAuthenHandler Authen::Simple::Passwd
       AuthType Basic
       AuthName "Protected Area“
       Require valid-user
    </Location>

                                                                          7
Role Based Access Control                                         12/22/12
More Auth Session Examples
These modules on CPAN give examples of
how to authenticate and have that persisted
in an authentication session
 CGI::Application::Plugin::Authentication
 CGI::Application::Plugin::Session

 Catalyst::Manual::Tutorial::Authentication
 Catalyst::Plugin::Authentication
 Catalyst::Plugin::Authorization::Roles


                                               8
Role Based Access Control              12/22/12
Authorisation Types / 1
simple
 authenticated user has full access to system
 auth'd user has roles which each grant full access to a sub-system, either as
   a process ('can register new users') or data ('can amend customer records')
     – the role acts effectively as a grouping mechanism
   Lattice-Based Access Control (LBAC)
     – users (subjects) mapped to objects (resources, computers, applications)
   Role-Based Access Control (RBAC)
     – users have hierarchical roles which have permissions that grant operations
       e.g. user "fred" has role "sysadmin" which has permission "security_edit" which
       grants operations "read" and "write" on security objects
       instead user "fred" might have role "root" which inherits from role "sysadmin"
       those permissions
   RBAC with Access Control List extension
     – users have roles which have permissions with a precedence that grant operations
       on matched objects
       e.g. user "jo" has role "editor" which has permission "food_recipes" which grants
       operations "read", "write", "delete" to objects "of type 'document' with file path
       matching '/home/recipes/*'“
  enterprise framework, e.g. PERMIS storing permissions via OpenLDAP and
    authenticating against Windows ADS BBC SSO or Shibboleth
complex

                                                                                     9
Role Based Access Control                                                    12/22/12
Authorisation Types / 2
 The  user-role assignment may be inherent in the
  authorisation system,or might be read externally,
  say from an ADS server via LDAP
 The object matching might involve callouts to
  more sophisticated checking code plugins that
  query other systems
 Authorisation is usually applied at application
  level to check actions
 It can also be applied at database level to filter all
  access to data the user is allowedto see, either by
  a database view or by using a relational database
  object wrapper layerto provide an additional
  safety net, e.g.
  DBIx::Class::Schema::RestrictWithObject
                                                        10
Role Based Access Control                        12/22/12
Article On Simple Authorisation
 "Elements   of Access Control" at perl.com by
   Vladi Belperchinov-Shabanski, Feb 13 2008
   http://www.perl.com/pub/a/2008/02/13/elements-of-acce
   Some nice examples of reading users and groups
   from file or database
 Policy configuration syntax
 Policy parser
 User group storage and mapping
 User group loading
 Policy match function
 Data fences
I won't go through it now but worth reading on-line

                                                  11
Role Based Access Control                  12/22/12
Simple Authorisation in Catalyst
    user <-many--many-> role
    role has meaning in your application code
    Catalyst::Plugin::Authorization::Roles

    use Catalyst qw/
       Authentication
       Authentication::Store::ThatSupportsRoles
       Authorization::Roles
    /;
    sub delete : Local {
       my ( $self, $c ) = @_;
       $c->assert_user_roles( qw/admin/ );
       # only admins can delete
       $c->model("Foo")->delete_it();
    }
                                                         12
Role Based Access Control                         12/22/12
CPAN Lattice-Based Access
Control Example
 WE::Util::Permissions
 Uses   a single file of permission rules queried via
  a Perl interface
 User or group matches rules which link
  operations to matched objects
 In the terminology of the author, operations are
  "processes", objects are "pages“
 Part of a wider web file editing framework
 I wrote a very similar authorisation handler in C
  for the Open University many years ago although
  Perl's obviously much better at tokenising text
  files and handling data!
                                                      13
Role Based Access Control                      12/22/12
WE::Utils::Permissions File Format

Based      on these tokens
   – user           list of users
   – group          list of groups
   – process        operation like “delete”
   – Page           file path or regexp or glob




                                                  14
Role Based Access Control                  12/22/12
WE::U::P File Examples / 1
   Use globbing for matching and allow the "admin" group
    to have rights for all processes. There is no page
    restriction, so the rights are valid for all objects
    ! match: glob
      group admin
          process *

   The chiefeditors have rights for the processes "release",
    "publish" and "edit". Here too, there are no page
    restrictions

    group chiefeditor
      process release publish edit

                                                              15
Role Based Access Control                              12/22/12
WE::U::P File Examples / 2
   The members of the group "news" are allowed to do the
    following operations in all objects below "/News/":"edit",
    "change-folder", "new-doc", "rm-doc", "release" and
    "publish".A regular expression match is used here (there
    is no "! match" directive).

    ! match: regexp
      group news
       page /News/.*
         process edit change-folder new-doc rm-doc release publish

   At end of file this rule denies anything not already
    permitted,similarly to Apache "DENY from all" directive
    or /etc/hosts.deny "ALL: ALL"
    ! match: glob
       group *
       process !*
                                                                       16
Role Based Access Control                                       12/22/12
WE::U::P Querying
  use WE::Util::Permissions;

  my $perm = WE::Util::Permissions->new(-file =>
    $permissionsfile);

  $perm->is_allowed(-user => "some_user", -process
    => "access");
  $perm->is_allowed(-group => [qw( editor admin )],
    -process => "delete", -page => 'a/b/foo.html');

  # get subset of users from list provided who are
     allowed process (operation) 'publish' on page
     (object) '/home/index.txt‘
  $perm->get_all_users([qw( janet john )], 'publish',
     '/home/index.txt');
                                                               17
Role Based Access Control                               12/22/12
WE::U::P Caveats
 You  have to provide user and group handling
  ("The semantics of users, groups, processes and
  pages are usually defined in another layer")
 No admin interface to create rules
 "There is currently no way to specify a token
  with spaces or slashes.”
 “Diagnostics is poor. Unrecognized tokens won't
  cause errors or warnings.”
 No precedence other than rule order (e.g. how do
  I deny a tree except for a sub-tree which is
  allowed).
 No plugin methods matching/precedence
  caclulation.
  But you could use the ideas and code as a basis
  for your own authorisation library.Have a look at
  the code on CPAN.
                                                   18
Role Based Access Control                   12/22/12
Role Based Access Control
  This is an evolving area and it is surprising how
  recently the standards for it have been written
  (2001 on)
 NIST "Role Based Access Control (RBAC) and Role Ba
 “The NIST Model for Role-Based Access Control: Tow
 Proposed NIST Standard for Role-Based Access Contro
 ACM Transactions on Information and System Security
  D.F.Ferraiolo et al.
 "Beyond Roles: A Practical Approach to Enterprise Use




                                                 19
Role Based Access Control                 12/22/12
Emerging Standards and Implementations
  An evolving area. Surprising how recently the
  standards for it have been written (2001 on)
 XACML
  http://en.wikipedia.org/wiki/XACML
 "OASIS eXtensible
   Access Control Markup Language (XACML) TC“
 “Core and hierarchical role based access control (RBAC
 Sun's XACML Open Source impl. in Java
  http://sunxacml.sourceforge.net
 Axis2 web service for Apache Maven
  http://xacmllight.sourceforge.net/
  C/Java providing SOAP stack
 Still a moving target!

                                                  20
Role Based Access Control                  12/22/12
Existing Security Implementations / 1
 Windows     ADS
    – Using an LDAP connector to authenticate users and
      determine group memberships and permissions, such
      as Perl-LDAP http://ldap.perl.org/
    – Requires application-side logic to interpret
      permissions
 OpenLDAP
    – "LDAP for Security, Part I“
      http://www.linuxjournal.com/article/6789
    – Paranoid Penguin "Authenticate with LDAP, Part III“
      http://www.linuxjournal.com/article/6936


                                                         21
Role Based Access Control                         12/22/12
Existing Security Implementations / 2
 PERMIS     Privilege Management
   Infrastructure
    – Enterprise-wide, huge, complex
    – http://sec.cs.kent.ac.uk/permis/
    – http://www.openpermis.org/download.htm
    – PERMIS PMI Architecture "Implementing
      Role Based Access Controls Using X.509
      Attribute Certificates”
    – "RBAC POLICIES IN XML FOR X.509
      BASED PRIVILEGE MANAGEMENT"

                                                22
Role Based Access Control                12/22/12
Existing Security Implementations / 3
 Shibboleth
    – A standards based, open source software package for
      web single sign-on across or within organizational
      boundaries that can work with PERMIS
      http://shibboleth.internet2.edu/
 Distributed    Access Control System (DACS)
    –   http://dacs.dss.ca/faq.html
    –   Written in C, well-designed, modular
    –   Provides authentication and authorisation
    –   Doesn't work on Apache 1, which the BBC uses in
        production :-(


                                                          23
Role Based Access Control                          12/22/12
Existing Security Implementations / 4
 "A  Role-Based Access Control (RBAC)
   system for PHP“ by Tony Marston
   – http://www.tonymarston.net/php-mysql/role-
     based-access-control.html
   – small, well-designed, good for standalone applications
 "FineGrained Role Based Access Control
   (RBAC) system" for PHP
   – reasonable database design and PHP code
 POSIX    ACL – ACLs from Python
   – http://pylibacl.sourceforge.net/
 Linux   kernel extension "grsecurity“
   – http://www.grsecurity.net/index.php
   – Unix-based kernel level RBAC, really aimed at Unix
     files and users
                                                          24
Role Based Access Control                          12/22/12
Perl Implementations of RBAC
I  know of no solutions in Perl although there are
  libraries for Python, Ruby, Java. In principle you
  could wrap one of them
 We needed one at the BBC so I wrote one called
  IFL::Authz and hope to release it to CPAN
 Based on Ferraiolo et al. "Proposed NIST
  Standard for Role-Based Access Control"
  This paper has a Functional Specification of an
  API written in the Z formal language which I
  adapted to Perl. Z is nice match for the
  mathematical set theory underlying RBAC
  though there are some errors in the paper.
                                                    25
Role Based Access Control                    12/22/12
RBAC Model
 From   Ferraiolo
  http://csrc.nist.gov/rbac/rbacSTD-ACM.pdf




                                                 26
Role Based Access Control                 12/22/12
RBAC Model Detail
   When defining an RBAC model, the following conventions are
    useful:
   S = Subject = A person or automated agent
   R = Role = Job function or title which defines an authority level
   P = Permissions = An approval of a mode of access to a resource
   SE = Session = A mapping involving S, R and/or P
   SA = Subject Assignment
   PA = Permission Assignment
   RH = Partially ordered role Hierarchy. RH can also be written: ≥
   A subject can have multiple roles.
   A role can have multiple subjects.
   A role can have many permissions.
   A permission can be assigned to many roles.
   A constraint places a restrictive rule on the potential inheritance of
    permissions from opposing roles, thus it can be used to achieve
    appropriate segregation of duties. For example, the same person
    should not be allowed to both create a login account for someone,
    and also be allowed to authorize the procedure.
   A subject may have multiple simultaneous sessions with different
    permissions.
                                                                          27
Role Based Access Control                                          12/22/12
RBAC Example
   Subject = user "joe“
   Role = "editor“
   Operation = "publish“
    However, at the BBC we're using it to handle
    sophisticated authorisation for a CMS system which
    requires ACLs, so we need object matching too
   From the Wikipedia article on RBAC:
    – "With the concepts of role hierarchy and constraints, one can
      control RBAC to create or simulate lattice-based access control
      (LBAC). Thus RBAC can be considered a superset of LBAC.
    I.e. RBAC + ACLs = LBAC
   To do this I extended the concept of permission to
    include within it a reference to an object, or matches
    against objects using regexps, globs or plugin method
   Object = "/home/recipes/*"

                                                                     28
Role Based Access Control                                     12/22/12
Code Examples - Create Authz / 1
  use IFL::Authz;
  use IFL::Authz::Config::PerlFile;
  # load config
  my $authzconfig = IFL::Authz::Config::PerlFile
     ->new({ configfilepath => "authz.xpl" });
  # contains
  # store => {
  # class => 'IFL::Authz::Serialiser::PerlFile',
  # storefilepath = 'authz_schema.xpl',
  # },
  # objectmatch => { class => 'TestAdminAuthz' },
  # relies on plugin TestAdminAuthz.pm which gives
  # match_object() that understands rings of power

                                                        29
Role Based Access Control                        12/22/12
Code Examples - Create Authz / 2
  # create authz object
  my $authz = IFL::Authz->new({ config =>
     $authzconfig });
  $authz->begin_transaction;
  $authz->add_object_type({ name => 'ring', ops =>
     ['wear', 'destroy'], precedence => 1 });
  $authz->add_user({ user => 'unittest', metadata =>
     { name => 'Ms. Unity Test', country => 'UK' } });
  $authz->add_role({ role => 'tester', description =>
     'Tester Role' });
  $authz->grant_permission({role => 'tester',
     description => 'access rings', operations =>
     [qw( access read )], allow_deny => 'allow', object
     => { type => 'ring', precedence => 'DEFAULT', id
     => {} } } );
                                                           30
Role Based Access Control                           12/22/12
Code Examples - Create Authz / 3
  $authz->add_role({ role => 'ring_bearer', description
    => 'Ring Bearer Role' });
  $authz->grant_permission({ role => 'ring_bearer',
    description => 'wear rings', operations =>
    [qw( wear )], allow_deny => 'allow', object =>
    { type => 'ring', precedence => 'DEFAULT', id =>
    {} } });
  $authz->add_inheritance({ role_asc => 'tester',
    role_desc => 'ring_bearer' });
  $authz->assign_user({ user => 'unittest', role =>
    'ring_bearer' });
  $authz->end_transaction;
  $authz->save;


                                                           31
Role Based Access Control                           12/22/12
Code Examples - Query Authz / 1
  my $session = $authz->create_session({ user =>
    'unittest', active_roles => [qw( ring_bearer )] });

  # user unittest ops access on object_type ring from
     indirect role tester inherited by assigned role
     ring_bearer
  die unless $authz->check_access({ session =>
     $session, operation => 'access', object => { type
     => 'ring' } });

  # user unittest ops wear on object_type ring from
     assigned role ring_bearer
  die unless $authz->check_access({ session =>
     $session, operation => 'wear', object => { type =>
     'ring' } });
                                                                 32
Role Based Access Control                                 12/22/12
Code Examples - Query Authz / 2
  # not able to destroy 'a pretty ring‘
  die if $authz->check_access({ session => $session,
     operation => 'destroy', object => { type => 'ring',
     id => { name => 'a pretty ring' } } });

  # but we can destroy 'the one ring‘
  die unless $authz->check_access({ session =>
     $session, operation => 'destroy', object => { type
     => 'ring', id => { name => 'the one ring' } } });




                                                              33
Role Based Access Control                              12/22/12
Summary and Links
   Summary
    – There’s a lot to it, evolving standards
    – Choice of library depends on language, platform, whether it’s
      enterprise, any special requirements
    – Authentication and Authorisation
    – At the simplest, use roles
    – Then look at a lattice
    – More complex may require RBAC

   Links
    – Slides at http://miltonkeynes.pm.org
    – Sandhu, R., Ferraiolo, D.F. and Kuhn, D.R. (July 2000). "
      The NIST Model for Role Based Access Control: Toward a Unified Standard
      " (PDF). 5th ACM Workshop Role-Based Access Control: 47-63.

Thank you. Any Questions?


                                                                             34
Role Based Access Control                                             12/22/12

More Related Content

What's hot

The Rise of Secrets Management
The Rise of Secrets ManagementThe Rise of Secrets Management
The Rise of Secrets Management
Akeyless
 
Rest and Sling Resolution
Rest and Sling ResolutionRest and Sling Resolution
Rest and Sling ResolutionDEEPAK KHETAWAT
 
J2ee
J2eeJ2ee
Java Persistence API (JPA) Step By Step
Java Persistence API (JPA) Step By StepJava Persistence API (JPA) Step By Step
Java Persistence API (JPA) Step By StepGuo Albert
 
Multithread Programing in Java
Multithread Programing in JavaMultithread Programing in Java
Multithread Programing in Java
M. Raihan
 
Sécurité des bases de données
Sécurité des bases de donnéesSécurité des bases de données
Sécurité des bases de données
litayem bechir
 
SOLID principles
SOLID principlesSOLID principles
SOLID principles
Jonathan Holloway
 
Applications secure by default
Applications secure by defaultApplications secure by default
Applications secure by default
SecuRing
 
Container security
Container securityContainer security
Container security
Anthony Chow
 
Java Servlets
Java ServletsJava Servlets
Java ServletsNitin Pai
 
SIngle Sign On with Keycloak
SIngle Sign On with KeycloakSIngle Sign On with Keycloak
SIngle Sign On with Keycloak
Julien Pivotto
 
Attribute based access control
Attribute based access controlAttribute based access control
Attribute based access control
Elimity
 
Java interview questions
Java interview questionsJava interview questions
Java interview questions
G C Reddy Technologies
 
OWASP AppSecCali 2015 - Marshalling Pickles
OWASP AppSecCali 2015 - Marshalling PicklesOWASP AppSecCali 2015 - Marshalling Pickles
OWASP AppSecCali 2015 - Marshalling Pickles
Christopher Frohoff
 
Secure coding presentation Oct 3 2020
Secure coding presentation Oct 3 2020Secure coding presentation Oct 3 2020
Secure coding presentation Oct 3 2020
Moataz Kamel
 
Okta docs
Okta docsOkta docs
Okta docs
Sam Bauch
 
Complex architectures for authentication and authorization on AWS
Complex architectures for authentication and authorization on AWSComplex architectures for authentication and authorization on AWS
Complex architectures for authentication and authorization on AWS
Boyan Dimitrov
 
SQL Injection
SQL InjectionSQL Injection
SQL Injection
Asish Kumar Rath
 
0wn-premises: Bypassing Microsoft Defender for Identity
0wn-premises: Bypassing Microsoft Defender for Identity0wn-premises: Bypassing Microsoft Defender for Identity
0wn-premises: Bypassing Microsoft Defender for Identity
Nikhil Mittal
 
Access Control Models: Controlling Resource Authorization
Access Control Models: Controlling Resource AuthorizationAccess Control Models: Controlling Resource Authorization
Access Control Models: Controlling Resource Authorization
Mark Niebergall
 

What's hot (20)

The Rise of Secrets Management
The Rise of Secrets ManagementThe Rise of Secrets Management
The Rise of Secrets Management
 
Rest and Sling Resolution
Rest and Sling ResolutionRest and Sling Resolution
Rest and Sling Resolution
 
J2ee
J2eeJ2ee
J2ee
 
Java Persistence API (JPA) Step By Step
Java Persistence API (JPA) Step By StepJava Persistence API (JPA) Step By Step
Java Persistence API (JPA) Step By Step
 
Multithread Programing in Java
Multithread Programing in JavaMultithread Programing in Java
Multithread Programing in Java
 
Sécurité des bases de données
Sécurité des bases de donnéesSécurité des bases de données
Sécurité des bases de données
 
SOLID principles
SOLID principlesSOLID principles
SOLID principles
 
Applications secure by default
Applications secure by defaultApplications secure by default
Applications secure by default
 
Container security
Container securityContainer security
Container security
 
Java Servlets
Java ServletsJava Servlets
Java Servlets
 
SIngle Sign On with Keycloak
SIngle Sign On with KeycloakSIngle Sign On with Keycloak
SIngle Sign On with Keycloak
 
Attribute based access control
Attribute based access controlAttribute based access control
Attribute based access control
 
Java interview questions
Java interview questionsJava interview questions
Java interview questions
 
OWASP AppSecCali 2015 - Marshalling Pickles
OWASP AppSecCali 2015 - Marshalling PicklesOWASP AppSecCali 2015 - Marshalling Pickles
OWASP AppSecCali 2015 - Marshalling Pickles
 
Secure coding presentation Oct 3 2020
Secure coding presentation Oct 3 2020Secure coding presentation Oct 3 2020
Secure coding presentation Oct 3 2020
 
Okta docs
Okta docsOkta docs
Okta docs
 
Complex architectures for authentication and authorization on AWS
Complex architectures for authentication and authorization on AWSComplex architectures for authentication and authorization on AWS
Complex architectures for authentication and authorization on AWS
 
SQL Injection
SQL InjectionSQL Injection
SQL Injection
 
0wn-premises: Bypassing Microsoft Defender for Identity
0wn-premises: Bypassing Microsoft Defender for Identity0wn-premises: Bypassing Microsoft Defender for Identity
0wn-premises: Bypassing Microsoft Defender for Identity
 
Access Control Models: Controlling Resource Authorization
Access Control Models: Controlling Resource AuthorizationAccess Control Models: Controlling Resource Authorization
Access Control Models: Controlling Resource Authorization
 

Viewers also liked

Access Control Presentation
Access Control PresentationAccess Control Presentation
Access Control PresentationWajahat Rajab
 
IAM Role Management
IAM Role ManagementIAM Role Management
IAM Role Management
sgjense
 
Role-based Access Control June09 GeoSOA Workshop
Role-based Access Control June09 GeoSOA WorkshopRole-based Access Control June09 GeoSOA Workshop
Role-based Access Control June09 GeoSOA Workshop
Carbon Project
 
Multi-domain and Privacy-aware Role Based Access Control in eHealth
Multi-domain and Privacy-aware Role Based Access Control in eHealthMulti-domain and Privacy-aware Role Based Access Control in eHealth
Multi-domain and Privacy-aware Role Based Access Control in eHealth
guest3dc8ca
 
Security Measures
Security MeasuresSecurity Measures
Security Measureshanna91
 
Building IAM for OpenStack
Building IAM for OpenStackBuilding IAM for OpenStack
Building IAM for OpenStack
Steve Martinelli
 
Attribute Based Access Control
Attribute Based Access ControlAttribute Based Access Control
Attribute Based Access Control
Chandra Sharma
 
Mandatory access control for information security
Mandatory access control for information securityMandatory access control for information security
Mandatory access control for information security
Ajit Dadresa
 
8 Access Control
8 Access Control8 Access Control
8 Access Control
Alfred Ouyang
 
An overview of access control
An overview of access controlAn overview of access control
An overview of access control
Elimity
 
Identity and Access Management 101
Identity and Access Management 101Identity and Access Management 101
Identity and Access Management 101
Jerod Brennen
 

Viewers also liked (12)

Access Control Presentation
Access Control PresentationAccess Control Presentation
Access Control Presentation
 
IAM Role Management
IAM Role ManagementIAM Role Management
IAM Role Management
 
Role-based Access Control June09 GeoSOA Workshop
Role-based Access Control June09 GeoSOA WorkshopRole-based Access Control June09 GeoSOA Workshop
Role-based Access Control June09 GeoSOA Workshop
 
Multi-domain and Privacy-aware Role Based Access Control in eHealth
Multi-domain and Privacy-aware Role Based Access Control in eHealthMulti-domain and Privacy-aware Role Based Access Control in eHealth
Multi-domain and Privacy-aware Role Based Access Control in eHealth
 
Week3 lecture
Week3 lectureWeek3 lecture
Week3 lecture
 
Security Measures
Security MeasuresSecurity Measures
Security Measures
 
Building IAM for OpenStack
Building IAM for OpenStackBuilding IAM for OpenStack
Building IAM for OpenStack
 
Attribute Based Access Control
Attribute Based Access ControlAttribute Based Access Control
Attribute Based Access Control
 
Mandatory access control for information security
Mandatory access control for information securityMandatory access control for information security
Mandatory access control for information security
 
8 Access Control
8 Access Control8 Access Control
8 Access Control
 
An overview of access control
An overview of access controlAn overview of access control
An overview of access control
 
Identity and Access Management 101
Identity and Access Management 101Identity and Access Management 101
Identity and Access Management 101
 

Similar to Role based access control

Apache2 BootCamp : Restricting Access
Apache2 BootCamp : Restricting AccessApache2 BootCamp : Restricting Access
Apache2 BootCamp : Restricting AccessWildan Maulana
 
Advanced Security In Hadoop Cluster
Advanced Security In Hadoop ClusterAdvanced Security In Hadoop Cluster
Advanced Security In Hadoop Cluster
Edureka!
 
Hadoop security
Hadoop securityHadoop security
Hadoop security
shrey mehrotra
 
Running the Apache Web Server
Running the Apache Web ServerRunning the Apache Web Server
Running the Apache Web Serverwebhostingguy
 
Apache Web Server Setup 4
Apache Web Server Setup 4Apache Web Server Setup 4
Apache Web Server Setup 4
Information Technology
 
Dekho security overview
Dekho security overviewDekho security overview
Dekho security overview
jpradeep1982
 
S5-Authorization
S5-AuthorizationS5-Authorization
S5-Authorization
zakieh alizadeh
 
4.5 manage file permissions and ownership v3
4.5 manage file permissions and ownership v34.5 manage file permissions and ownership v3
4.5 manage file permissions and ownership v3
Acácio Oliveira
 
Low Hanging Fruit, Making Your Basic MongoDB Installation More Secure
Low Hanging Fruit, Making Your Basic MongoDB Installation More SecureLow Hanging Fruit, Making Your Basic MongoDB Installation More Secure
Low Hanging Fruit, Making Your Basic MongoDB Installation More Secure
MongoDB
 
Drupal 8 meets to symphony
Drupal 8 meets to symphonyDrupal 8 meets to symphony
Drupal 8 meets to symphony
Brahampal Singh
 
WWHF 2018 - Using PowerUpSQL and goddi for Active Directory Information Gathe...
WWHF 2018 - Using PowerUpSQL and goddi for Active Directory Information Gathe...WWHF 2018 - Using PowerUpSQL and goddi for Active Directory Information Gathe...
WWHF 2018 - Using PowerUpSQL and goddi for Active Directory Information Gathe...
ThomasElling1
 
101 4.5 manage file permissions and ownership v3
101 4.5 manage file permissions and ownership v3101 4.5 manage file permissions and ownership v3
101 4.5 manage file permissions and ownership v3
Acácio Oliveira
 
Sql Server Security
Sql Server SecuritySql Server Security
Sql Server Security
Vinod Kumar
 
Install ldap server
Install ldap serverInstall ldap server
Install ldap serverMawardi 12
 
Install ldap server
Install ldap serverInstall ldap server
Install ldap serverMawardi 12
 
Privileged file operations_bug_on_windows
Privileged file operations_bug_on_windowsPrivileged file operations_bug_on_windows
Privileged file operations_bug_on_windows
Sai Lay
 
Kubernetes Summit 2019 - Harden Your Kubernetes Cluster
Kubernetes Summit 2019 - Harden Your Kubernetes ClusterKubernetes Summit 2019 - Harden Your Kubernetes Cluster
Kubernetes Summit 2019 - Harden Your Kubernetes Cluster
smalltown
 
Squid
SquidSquid
Authentication and authorization in res tful infrastructures
Authentication and authorization in res tful infrastructuresAuthentication and authorization in res tful infrastructures
Authentication and authorization in res tful infrastructures
Corley S.r.l.
 

Similar to Role based access control (20)

Apache2 BootCamp : Restricting Access
Apache2 BootCamp : Restricting AccessApache2 BootCamp : Restricting Access
Apache2 BootCamp : Restricting Access
 
Advanced Security In Hadoop Cluster
Advanced Security In Hadoop ClusterAdvanced Security In Hadoop Cluster
Advanced Security In Hadoop Cluster
 
Hadoop security
Hadoop securityHadoop security
Hadoop security
 
Running the Apache Web Server
Running the Apache Web ServerRunning the Apache Web Server
Running the Apache Web Server
 
Apache Web Server Setup 4
Apache Web Server Setup 4Apache Web Server Setup 4
Apache Web Server Setup 4
 
Dekho security overview
Dekho security overviewDekho security overview
Dekho security overview
 
S5-Authorization
S5-AuthorizationS5-Authorization
S5-Authorization
 
4.5 manage file permissions and ownership v3
4.5 manage file permissions and ownership v34.5 manage file permissions and ownership v3
4.5 manage file permissions and ownership v3
 
Low Hanging Fruit, Making Your Basic MongoDB Installation More Secure
Low Hanging Fruit, Making Your Basic MongoDB Installation More SecureLow Hanging Fruit, Making Your Basic MongoDB Installation More Secure
Low Hanging Fruit, Making Your Basic MongoDB Installation More Secure
 
Drupal 8 meets to symphony
Drupal 8 meets to symphonyDrupal 8 meets to symphony
Drupal 8 meets to symphony
 
WWHF 2018 - Using PowerUpSQL and goddi for Active Directory Information Gathe...
WWHF 2018 - Using PowerUpSQL and goddi for Active Directory Information Gathe...WWHF 2018 - Using PowerUpSQL and goddi for Active Directory Information Gathe...
WWHF 2018 - Using PowerUpSQL and goddi for Active Directory Information Gathe...
 
Durkee apache 2009_v7
Durkee apache 2009_v7Durkee apache 2009_v7
Durkee apache 2009_v7
 
101 4.5 manage file permissions and ownership v3
101 4.5 manage file permissions and ownership v3101 4.5 manage file permissions and ownership v3
101 4.5 manage file permissions and ownership v3
 
Sql Server Security
Sql Server SecuritySql Server Security
Sql Server Security
 
Install ldap server
Install ldap serverInstall ldap server
Install ldap server
 
Install ldap server
Install ldap serverInstall ldap server
Install ldap server
 
Privileged file operations_bug_on_windows
Privileged file operations_bug_on_windowsPrivileged file operations_bug_on_windows
Privileged file operations_bug_on_windows
 
Kubernetes Summit 2019 - Harden Your Kubernetes Cluster
Kubernetes Summit 2019 - Harden Your Kubernetes ClusterKubernetes Summit 2019 - Harden Your Kubernetes Cluster
Kubernetes Summit 2019 - Harden Your Kubernetes Cluster
 
Squid
SquidSquid
Squid
 
Authentication and authorization in res tful infrastructures
Authentication and authorization in res tful infrastructuresAuthentication and authorization in res tful infrastructures
Authentication and authorization in res tful infrastructures
 

More from Peter Edwards

Enhancing engagement through content
Enhancing engagement through contentEnhancing engagement through content
Enhancing engagement through content
Peter Edwards
 
BBC World Service Twitter OAuth Perl
BBC World Service Twitter OAuth PerlBBC World Service Twitter OAuth Perl
BBC World Service Twitter OAuth PerlPeter Edwards
 
Perl exceptions lightning talk
Perl exceptions lightning talkPerl exceptions lightning talk
Perl exceptions lightning talkPeter Edwards
 
Getting started with Catalyst and extjs
Getting started with Catalyst and extjsGetting started with Catalyst and extjs
Getting started with Catalyst and extjsPeter Edwards
 
Desperately seeking a lightweight Perl framework
Desperately seeking a lightweight Perl frameworkDesperately seeking a lightweight Perl framework
Desperately seeking a lightweight Perl frameworkPeter Edwards
 
Real world cross-platform testing
Real world cross-platform testingReal world cross-platform testing
Real world cross-platform testingPeter Edwards
 
Open Source for Government - PSEICT Conference - British Council Case Study u...
Open Source for Government - PSEICT Conference - British Council Case Study u...Open Source for Government - PSEICT Conference - British Council Case Study u...
Open Source for Government - PSEICT Conference - British Council Case Study u...
Peter Edwards
 

More from Peter Edwards (8)

Enhancing engagement through content
Enhancing engagement through contentEnhancing engagement through content
Enhancing engagement through content
 
Twitter oauth
Twitter oauthTwitter oauth
Twitter oauth
 
BBC World Service Twitter OAuth Perl
BBC World Service Twitter OAuth PerlBBC World Service Twitter OAuth Perl
BBC World Service Twitter OAuth Perl
 
Perl exceptions lightning talk
Perl exceptions lightning talkPerl exceptions lightning talk
Perl exceptions lightning talk
 
Getting started with Catalyst and extjs
Getting started with Catalyst and extjsGetting started with Catalyst and extjs
Getting started with Catalyst and extjs
 
Desperately seeking a lightweight Perl framework
Desperately seeking a lightweight Perl frameworkDesperately seeking a lightweight Perl framework
Desperately seeking a lightweight Perl framework
 
Real world cross-platform testing
Real world cross-platform testingReal world cross-platform testing
Real world cross-platform testing
 
Open Source for Government - PSEICT Conference - British Council Case Study u...
Open Source for Government - PSEICT Conference - British Council Case Study u...Open Source for Government - PSEICT Conference - British Council Case Study u...
Open Source for Government - PSEICT Conference - British Council Case Study u...
 

Recently uploaded

Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 

Recently uploaded (20)

Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 

Role based access control

  • 1. Role Based Access Control Peter Edwards peter@dragonstaff.co.uk Birmingham.pm Perl Technical Talk 22nd October 2008 Peter and Léon Brocard at Google Dev Day 1 Role Based Access Control 12/22/12
  • 2. Contents  1. Requirement and Solution  2. Authentication and Authorisation Definitions  3. Authentication Process  4. Authentication Example  5. Authentication Session  6. More Authentication Session Examples  7. Authorisation Types  8. Article On Simple Authorisation  9. Simple Authorisation in Catalyst  10. CPAN Lattice-Based Access Control Example  14. Role Based Access Control  14.1. Academic Papers  14.2. Emerging Standards and Implementations  14.3. Existing Security Implementations  14.4. Perl Implementations  14.5. RBAC Design  14.6. RBAC Example  15. Further Information 2 Role Based Access Control 12/22/12
  • 3. Requirement  Controlling user access to applications and the data within them Solution  Identify each user  Grant them permissions to work with applications and data  Test for that when they use the application 3 Role Based Access Control 12/22/12
  • 4. Authentication and Authorisation Definitions  Authentication is the validation of a userid that is used by a user or batch process  Authorisation is checking that a userid is allowed to perform certain operations on an object can <user> "fred" do <operation> "delete" on <object> "/home/fred/somefile.txt" of <object_type> "file" 4 Role Based Access Control 12/22/12
  • 5. Authentication Process  user/batch process requests access for <userid> using <credential> from a server  server validates credential (e.g. password or key challenge certificate) against userid and returns an <authentication_token> (e.g. a cookie or hash token) which is linked server side to the userid, typically in a session store  user/batch process supplies the authentication token along with subsequent requests to the server  on receiving a request the server – validates the authentication token – checks the linked userid has authorisation to perform the given request 5 Role Based Access Control 12/22/12
  • 6. Authentication Example http://search.cpan.org/perldoc?Authen::Simple use Authen::Simple::Passwd; my $passwd = Authen::Simple::Passwd ->new(path => '/etc/passwd'); if ( $passwd->authenticate( $username, $password ) ) { # successfull authentication } 6 Role Based Access Control 12/22/12
  • 7. Authentication Session  Once authenticated, you'll need a session to persist that, otherwise you'd need to ask for the userid/password every time  Using Authen::Simple with Apache gives us an implicit session # a mod_perl Authen handler PerlModule Authen::Simple::Apache PerlModule Authen::Simple::Passwd PerlSetVar AuthenSimplePasswd_path "/etc/passwd“ <Location /protected> PerlAuthenHandler Authen::Simple::Passwd AuthType Basic AuthName "Protected Area“ Require valid-user </Location> 7 Role Based Access Control 12/22/12
  • 8. More Auth Session Examples These modules on CPAN give examples of how to authenticate and have that persisted in an authentication session  CGI::Application::Plugin::Authentication  CGI::Application::Plugin::Session  Catalyst::Manual::Tutorial::Authentication  Catalyst::Plugin::Authentication  Catalyst::Plugin::Authorization::Roles 8 Role Based Access Control 12/22/12
  • 9. Authorisation Types / 1 simple  authenticated user has full access to system  auth'd user has roles which each grant full access to a sub-system, either as a process ('can register new users') or data ('can amend customer records') – the role acts effectively as a grouping mechanism  Lattice-Based Access Control (LBAC) – users (subjects) mapped to objects (resources, computers, applications)  Role-Based Access Control (RBAC) – users have hierarchical roles which have permissions that grant operations e.g. user "fred" has role "sysadmin" which has permission "security_edit" which grants operations "read" and "write" on security objects instead user "fred" might have role "root" which inherits from role "sysadmin" those permissions  RBAC with Access Control List extension – users have roles which have permissions with a precedence that grant operations on matched objects e.g. user "jo" has role "editor" which has permission "food_recipes" which grants operations "read", "write", "delete" to objects "of type 'document' with file path matching '/home/recipes/*'“  enterprise framework, e.g. PERMIS storing permissions via OpenLDAP and authenticating against Windows ADS BBC SSO or Shibboleth complex 9 Role Based Access Control 12/22/12
  • 10. Authorisation Types / 2  The user-role assignment may be inherent in the authorisation system,or might be read externally, say from an ADS server via LDAP  The object matching might involve callouts to more sophisticated checking code plugins that query other systems  Authorisation is usually applied at application level to check actions  It can also be applied at database level to filter all access to data the user is allowedto see, either by a database view or by using a relational database object wrapper layerto provide an additional safety net, e.g. DBIx::Class::Schema::RestrictWithObject 10 Role Based Access Control 12/22/12
  • 11. Article On Simple Authorisation  "Elements of Access Control" at perl.com by Vladi Belperchinov-Shabanski, Feb 13 2008 http://www.perl.com/pub/a/2008/02/13/elements-of-acce Some nice examples of reading users and groups from file or database  Policy configuration syntax  Policy parser  User group storage and mapping  User group loading  Policy match function  Data fences I won't go through it now but worth reading on-line 11 Role Based Access Control 12/22/12
  • 12. Simple Authorisation in Catalyst  user <-many--many-> role  role has meaning in your application code  Catalyst::Plugin::Authorization::Roles use Catalyst qw/ Authentication Authentication::Store::ThatSupportsRoles Authorization::Roles /; sub delete : Local { my ( $self, $c ) = @_; $c->assert_user_roles( qw/admin/ ); # only admins can delete $c->model("Foo")->delete_it(); } 12 Role Based Access Control 12/22/12
  • 13. CPAN Lattice-Based Access Control Example  WE::Util::Permissions  Uses a single file of permission rules queried via a Perl interface  User or group matches rules which link operations to matched objects  In the terminology of the author, operations are "processes", objects are "pages“  Part of a wider web file editing framework  I wrote a very similar authorisation handler in C for the Open University many years ago although Perl's obviously much better at tokenising text files and handling data! 13 Role Based Access Control 12/22/12
  • 14. WE::Utils::Permissions File Format Based on these tokens – user list of users – group list of groups – process operation like “delete” – Page file path or regexp or glob 14 Role Based Access Control 12/22/12
  • 15. WE::U::P File Examples / 1  Use globbing for matching and allow the "admin" group to have rights for all processes. There is no page restriction, so the rights are valid for all objects ! match: glob group admin process *  The chiefeditors have rights for the processes "release", "publish" and "edit". Here too, there are no page restrictions group chiefeditor process release publish edit 15 Role Based Access Control 12/22/12
  • 16. WE::U::P File Examples / 2  The members of the group "news" are allowed to do the following operations in all objects below "/News/":"edit", "change-folder", "new-doc", "rm-doc", "release" and "publish".A regular expression match is used here (there is no "! match" directive). ! match: regexp group news page /News/.* process edit change-folder new-doc rm-doc release publish  At end of file this rule denies anything not already permitted,similarly to Apache "DENY from all" directive or /etc/hosts.deny "ALL: ALL" ! match: glob group * process !* 16 Role Based Access Control 12/22/12
  • 17. WE::U::P Querying use WE::Util::Permissions; my $perm = WE::Util::Permissions->new(-file => $permissionsfile); $perm->is_allowed(-user => "some_user", -process => "access"); $perm->is_allowed(-group => [qw( editor admin )], -process => "delete", -page => 'a/b/foo.html'); # get subset of users from list provided who are allowed process (operation) 'publish' on page (object) '/home/index.txt‘ $perm->get_all_users([qw( janet john )], 'publish', '/home/index.txt'); 17 Role Based Access Control 12/22/12
  • 18. WE::U::P Caveats  You have to provide user and group handling ("The semantics of users, groups, processes and pages are usually defined in another layer")  No admin interface to create rules  "There is currently no way to specify a token with spaces or slashes.”  “Diagnostics is poor. Unrecognized tokens won't cause errors or warnings.”  No precedence other than rule order (e.g. how do I deny a tree except for a sub-tree which is allowed).  No plugin methods matching/precedence caclulation. But you could use the ideas and code as a basis for your own authorisation library.Have a look at the code on CPAN. 18 Role Based Access Control 12/22/12
  • 19. Role Based Access Control This is an evolving area and it is surprising how recently the standards for it have been written (2001 on)  NIST "Role Based Access Control (RBAC) and Role Ba  “The NIST Model for Role-Based Access Control: Tow  Proposed NIST Standard for Role-Based Access Contro  ACM Transactions on Information and System Security D.F.Ferraiolo et al.  "Beyond Roles: A Practical Approach to Enterprise Use 19 Role Based Access Control 12/22/12
  • 20. Emerging Standards and Implementations An evolving area. Surprising how recently the standards for it have been written (2001 on)  XACML http://en.wikipedia.org/wiki/XACML  "OASIS eXtensible Access Control Markup Language (XACML) TC“  “Core and hierarchical role based access control (RBAC  Sun's XACML Open Source impl. in Java http://sunxacml.sourceforge.net  Axis2 web service for Apache Maven http://xacmllight.sourceforge.net/ C/Java providing SOAP stack  Still a moving target! 20 Role Based Access Control 12/22/12
  • 21. Existing Security Implementations / 1  Windows ADS – Using an LDAP connector to authenticate users and determine group memberships and permissions, such as Perl-LDAP http://ldap.perl.org/ – Requires application-side logic to interpret permissions  OpenLDAP – "LDAP for Security, Part I“ http://www.linuxjournal.com/article/6789 – Paranoid Penguin "Authenticate with LDAP, Part III“ http://www.linuxjournal.com/article/6936 21 Role Based Access Control 12/22/12
  • 22. Existing Security Implementations / 2  PERMIS Privilege Management Infrastructure – Enterprise-wide, huge, complex – http://sec.cs.kent.ac.uk/permis/ – http://www.openpermis.org/download.htm – PERMIS PMI Architecture "Implementing Role Based Access Controls Using X.509 Attribute Certificates” – "RBAC POLICIES IN XML FOR X.509 BASED PRIVILEGE MANAGEMENT" 22 Role Based Access Control 12/22/12
  • 23. Existing Security Implementations / 3  Shibboleth – A standards based, open source software package for web single sign-on across or within organizational boundaries that can work with PERMIS http://shibboleth.internet2.edu/  Distributed Access Control System (DACS) – http://dacs.dss.ca/faq.html – Written in C, well-designed, modular – Provides authentication and authorisation – Doesn't work on Apache 1, which the BBC uses in production :-( 23 Role Based Access Control 12/22/12
  • 24. Existing Security Implementations / 4  "A Role-Based Access Control (RBAC) system for PHP“ by Tony Marston – http://www.tonymarston.net/php-mysql/role- based-access-control.html – small, well-designed, good for standalone applications  "FineGrained Role Based Access Control (RBAC) system" for PHP – reasonable database design and PHP code  POSIX ACL – ACLs from Python – http://pylibacl.sourceforge.net/  Linux kernel extension "grsecurity“ – http://www.grsecurity.net/index.php – Unix-based kernel level RBAC, really aimed at Unix files and users 24 Role Based Access Control 12/22/12
  • 25. Perl Implementations of RBAC I know of no solutions in Perl although there are libraries for Python, Ruby, Java. In principle you could wrap one of them  We needed one at the BBC so I wrote one called IFL::Authz and hope to release it to CPAN  Based on Ferraiolo et al. "Proposed NIST Standard for Role-Based Access Control" This paper has a Functional Specification of an API written in the Z formal language which I adapted to Perl. Z is nice match for the mathematical set theory underlying RBAC though there are some errors in the paper. 25 Role Based Access Control 12/22/12
  • 26. RBAC Model  From Ferraiolo http://csrc.nist.gov/rbac/rbacSTD-ACM.pdf 26 Role Based Access Control 12/22/12
  • 27. RBAC Model Detail  When defining an RBAC model, the following conventions are useful:  S = Subject = A person or automated agent  R = Role = Job function or title which defines an authority level  P = Permissions = An approval of a mode of access to a resource  SE = Session = A mapping involving S, R and/or P  SA = Subject Assignment  PA = Permission Assignment  RH = Partially ordered role Hierarchy. RH can also be written: ≥  A subject can have multiple roles.  A role can have multiple subjects.  A role can have many permissions.  A permission can be assigned to many roles.  A constraint places a restrictive rule on the potential inheritance of permissions from opposing roles, thus it can be used to achieve appropriate segregation of duties. For example, the same person should not be allowed to both create a login account for someone, and also be allowed to authorize the procedure.  A subject may have multiple simultaneous sessions with different permissions. 27 Role Based Access Control 12/22/12
  • 28. RBAC Example  Subject = user "joe“  Role = "editor“  Operation = "publish“ However, at the BBC we're using it to handle sophisticated authorisation for a CMS system which requires ACLs, so we need object matching too  From the Wikipedia article on RBAC: – "With the concepts of role hierarchy and constraints, one can control RBAC to create or simulate lattice-based access control (LBAC). Thus RBAC can be considered a superset of LBAC. I.e. RBAC + ACLs = LBAC  To do this I extended the concept of permission to include within it a reference to an object, or matches against objects using regexps, globs or plugin method  Object = "/home/recipes/*" 28 Role Based Access Control 12/22/12
  • 29. Code Examples - Create Authz / 1 use IFL::Authz; use IFL::Authz::Config::PerlFile; # load config my $authzconfig = IFL::Authz::Config::PerlFile ->new({ configfilepath => "authz.xpl" }); # contains # store => { # class => 'IFL::Authz::Serialiser::PerlFile', # storefilepath = 'authz_schema.xpl', # }, # objectmatch => { class => 'TestAdminAuthz' }, # relies on plugin TestAdminAuthz.pm which gives # match_object() that understands rings of power 29 Role Based Access Control 12/22/12
  • 30. Code Examples - Create Authz / 2 # create authz object my $authz = IFL::Authz->new({ config => $authzconfig }); $authz->begin_transaction; $authz->add_object_type({ name => 'ring', ops => ['wear', 'destroy'], precedence => 1 }); $authz->add_user({ user => 'unittest', metadata => { name => 'Ms. Unity Test', country => 'UK' } }); $authz->add_role({ role => 'tester', description => 'Tester Role' }); $authz->grant_permission({role => 'tester', description => 'access rings', operations => [qw( access read )], allow_deny => 'allow', object => { type => 'ring', precedence => 'DEFAULT', id => {} } } ); 30 Role Based Access Control 12/22/12
  • 31. Code Examples - Create Authz / 3 $authz->add_role({ role => 'ring_bearer', description => 'Ring Bearer Role' }); $authz->grant_permission({ role => 'ring_bearer', description => 'wear rings', operations => [qw( wear )], allow_deny => 'allow', object => { type => 'ring', precedence => 'DEFAULT', id => {} } }); $authz->add_inheritance({ role_asc => 'tester', role_desc => 'ring_bearer' }); $authz->assign_user({ user => 'unittest', role => 'ring_bearer' }); $authz->end_transaction; $authz->save; 31 Role Based Access Control 12/22/12
  • 32. Code Examples - Query Authz / 1 my $session = $authz->create_session({ user => 'unittest', active_roles => [qw( ring_bearer )] }); # user unittest ops access on object_type ring from indirect role tester inherited by assigned role ring_bearer die unless $authz->check_access({ session => $session, operation => 'access', object => { type => 'ring' } }); # user unittest ops wear on object_type ring from assigned role ring_bearer die unless $authz->check_access({ session => $session, operation => 'wear', object => { type => 'ring' } }); 32 Role Based Access Control 12/22/12
  • 33. Code Examples - Query Authz / 2 # not able to destroy 'a pretty ring‘ die if $authz->check_access({ session => $session, operation => 'destroy', object => { type => 'ring', id => { name => 'a pretty ring' } } }); # but we can destroy 'the one ring‘ die unless $authz->check_access({ session => $session, operation => 'destroy', object => { type => 'ring', id => { name => 'the one ring' } } }); 33 Role Based Access Control 12/22/12
  • 34. Summary and Links  Summary – There’s a lot to it, evolving standards – Choice of library depends on language, platform, whether it’s enterprise, any special requirements – Authentication and Authorisation – At the simplest, use roles – Then look at a lattice – More complex may require RBAC  Links – Slides at http://miltonkeynes.pm.org – Sandhu, R., Ferraiolo, D.F. and Kuhn, D.R. (July 2000). " The NIST Model for Role Based Access Control: Toward a Unified Standard " (PDF). 5th ACM Workshop Role-Based Access Control: 47-63. Thank you. Any Questions? 34 Role Based Access Control 12/22/12