SlideShare une entreprise Scribd logo
1  sur  17
Télécharger pour lire hors ligne
Zend Acl
Presented By
Rajanikant Beero
Table of Contents
● What is Acl?
● Zend & Basic Set Up
● Components of Acl(Zend)
● Resources in Acl
● Roles in Acl
● Creating a simple Acl with example
● Storing ACL Data for Persistence
● Conditional ACL Rules with Assertions
● Benefits
What is Acl?
● The functionality of specifying access rights to
resources is access control.
● An ACL specifies which users or system processes
are granted access to resources, as well as what
operations are allowed on given resource.
● An access control list (ACL), with respect to a
computer file system is a list of permissions attached
to the files.
Zend & Basic Set Up
● Zend Framework is an open source, object oriented
web application framework for PHP 5.
● Zend is often called a 'component library', because
it has many components that you can use more or
less independently.
● Provides Model-View-Controller (MVC)
implementation.
● Basic set up can be found here -
http://framework.zend.com/manual/1.12/en/learnin
g.quickstart.html
Components of Acl(ZF)
● Zend_Acl is a flexible implementation for privileges
management.
● Mainly two objects (Resource and role) are involved
→ a resource is an object to which access is
controlled.
→ a role is an object that may request access to a
Resource.
→ And privileges is what an object can do on the
Resource.
Resource in Zend_Acl
● In Zend, resource can be a “module” or “controller”
or “controller action” or any block of code.
● Zend_Acl provides Zend_Acl_Resource_Interface
as a resource to facilitate creating resource.
● Additionally, Zend_Acl_Resource is provided by
Zend_Acl as a basic resource implementation.
● $acl = new Zend_Acl();
● $acl->add(new Zend_Acl_Resource('Resource'));
Role in Zend_Acl
● In Zend, role is the user type say “admin” or “guest”
etc.
● Zend_Acl provides Zend_Acl_Role_Interface as a
basic role to facilitate creating role.
● Additionally, Zend_Acl_Role is provided by
Zend_Acl as a basic role implementation.
● $acl = new Zend_Acl();
● $acl->addRole(new Zend_Acl_Role('guest'))
Zend Role continue.....
● In Zend_Acl, a role may inherit from one or more
roles. This is to support inheritance of rules among
role.
● The following code defines three base roles -
"guest", "member", and "admin"
● $acl->addRole(new Zend_Acl_Role('guest'))
->addRole(new Zend_Acl_Role('member'))
->addRole(new Zend_Acl_Role('admin'));
Zend Role continue.....
Inheritance
● $acl->addRole(new Zend_Acl_Role('guest'), 'user')
Multiple Inheritance among Roles:
● $parents = array('guest', 'member', 'admin');
● $acl->addRole(new Zend_Acl_Role('someUser'),
$parents);
Zend Role continue.....
Multiple Inheritance among Roles:
● $acl->add(new
Zend_Acl_Resource('someResource'));
● $acl->deny('guest', 'someResource');
● $acl->allow('member', 'someResource');
● echo $acl->isAllowed('someUser',
'someResource') ? 'allowed' : 'denied';
Zend Role continue.....
Multiple Inheritance among Roles:
● O/P – allowed
● When specifying multiple parents for a role, then the
last parent listed is the first one searched for rules
applicable to an authorization query.
Creating a Simple ACL
Storing ACL Data
● Zend_Acl was designed in such a way that it does
not require any particular back-end technology such
as a database or cache server for storage of the ACL
data.
● Zend_Acl is serializable, ACL objects may be
serialized with PHP's serialize() function, and the
results may be stored anywhere the developer
should desire, such as a file, database, or caching
mechanism.
● Let us see an example to store the Acl data in
database.
Conditional ACL Rules
● Zend_Acl provides support for conditional rules
with Zend_Acl_Assert_Interface.
→ Only between the hours of 8:00am and 5:00pm.
→ Access / Deny specific to any IP address.
● $acl = new Zend_Acl();
● $acl->allow(null, null, null, new ClsAssertion());
→ Assertion only applies when the assertion method
returns TRUE
Benefits of using Acl
→ Security.
→ Filtering traffic.
→ Confidentiality - Control disclosure of
information.
→ Centralized place to access and manage ACL
rules, resources, and roles.
→ Maps nicely to the MVC controller/action
architecture.
→ Easiness of user and resource management.
→ Easy modification.
Questions??
Thank You
Voting time, please vote for better India :)

Contenu connexe

Tendances

JSR 170: The Key to Unlocking Content Repositories
JSR 170: The Key to Unlocking Content RepositoriesJSR 170: The Key to Unlocking Content Repositories
JSR 170: The Key to Unlocking Content Repositories
Joel Amoussou
 

Tendances (20)

JSR 170: The Key to Unlocking Content Repositories
JSR 170: The Key to Unlocking Content RepositoriesJSR 170: The Key to Unlocking Content Repositories
JSR 170: The Key to Unlocking Content Repositories
 
AngularJS with Slim PHP Micro Framework
AngularJS with Slim PHP Micro FrameworkAngularJS with Slim PHP Micro Framework
AngularJS with Slim PHP Micro Framework
 
Caldera Learn - LoopConf WP API + Angular FTW Workshop
Caldera Learn - LoopConf WP API + Angular FTW WorkshopCaldera Learn - LoopConf WP API + Angular FTW Workshop
Caldera Learn - LoopConf WP API + Angular FTW Workshop
 
Zend Framework
Zend FrameworkZend Framework
Zend Framework
 
Code Igniter 2
Code Igniter 2Code Igniter 2
Code Igniter 2
 
Slim Framework
Slim FrameworkSlim Framework
Slim Framework
 
Flask and Angular: An approach to build robust platforms
Flask and Angular:  An approach to build robust platformsFlask and Angular:  An approach to build robust platforms
Flask and Angular: An approach to build robust platforms
 
Creating REST Applications with the Slim Micro-Framework by Vikram Vaswani
Creating REST Applications with the Slim Micro-Framework by Vikram VaswaniCreating REST Applications with the Slim Micro-Framework by Vikram Vaswani
Creating REST Applications with the Slim Micro-Framework by Vikram Vaswani
 
Codegnitorppt
CodegnitorpptCodegnitorppt
Codegnitorppt
 
Let ColdFusion ORM do the work for you!
Let ColdFusion ORM do the work for you!Let ColdFusion ORM do the work for you!
Let ColdFusion ORM do the work for you!
 
Extending the WordPress REST API - Josh Pollock
Extending the WordPress REST API - Josh PollockExtending the WordPress REST API - Josh Pollock
Extending the WordPress REST API - Josh Pollock
 
Power of Simplicity in FW/1
Power of Simplicity in FW/1Power of Simplicity in FW/1
Power of Simplicity in FW/1
 
Extend sdk
Extend sdkExtend sdk
Extend sdk
 
Introduction to plugin development
Introduction to plugin developmentIntroduction to plugin development
Introduction to plugin development
 
AngularJS Directives
AngularJS DirectivesAngularJS Directives
AngularJS Directives
 
AngularJS Basics with Example
AngularJS Basics with ExampleAngularJS Basics with Example
AngularJS Basics with Example
 
AngularJS $http Interceptors (Explanation and Examples)
AngularJS $http Interceptors (Explanation and Examples)AngularJS $http Interceptors (Explanation and Examples)
AngularJS $http Interceptors (Explanation and Examples)
 
Silex Cheat Sheet
Silex Cheat SheetSilex Cheat Sheet
Silex Cheat Sheet
 
AngularJS - $http & $resource Services
AngularJS - $http & $resource ServicesAngularJS - $http & $resource Services
AngularJS - $http & $resource Services
 
SQL Injection in PHP
SQL Injection in PHPSQL Injection in PHP
SQL Injection in PHP
 

Similaire à Zend ACL Basics

ASP.NET Session 11 12
ASP.NET Session 11 12ASP.NET Session 11 12
ASP.NET Session 11 12
Sisir Ghosh
 
Data Access Technologies
Data Access TechnologiesData Access Technologies
Data Access Technologies
Dimara Hakim
 

Similaire à Zend ACL Basics (20)

Manage cloud infrastructures in PHP using Zend Framework 2 (and 1)
Manage cloud infrastructures in PHP using Zend Framework 2 (and 1)Manage cloud infrastructures in PHP using Zend Framework 2 (and 1)
Manage cloud infrastructures in PHP using Zend Framework 2 (and 1)
 
ASP.NET Session 11 12
ASP.NET Session 11 12ASP.NET Session 11 12
ASP.NET Session 11 12
 
Ansible Tutorial.pdf
Ansible Tutorial.pdfAnsible Tutorial.pdf
Ansible Tutorial.pdf
 
Ansible - Hands on Training
Ansible - Hands on TrainingAnsible - Hands on Training
Ansible - Hands on Training
 
Drupal node access system & AUL 7.x.-2.x
Drupal node access system & AUL 7.x.-2.xDrupal node access system & AUL 7.x.-2.x
Drupal node access system & AUL 7.x.-2.x
 
New PLSQL in Oracle Database 12c
New PLSQL in Oracle Database 12cNew PLSQL in Oracle Database 12c
New PLSQL in Oracle Database 12c
 
Catalyst MVC
Catalyst MVCCatalyst MVC
Catalyst MVC
 
PHP Oracle
PHP OraclePHP Oracle
PHP Oracle
 
Building Scalable Applications with Laravel
Building Scalable Applications with LaravelBuilding Scalable Applications with Laravel
Building Scalable Applications with Laravel
 
Data Access Technologies
Data Access TechnologiesData Access Technologies
Data Access Technologies
 
Cloug Undocumented Secrets Black Magic
Cloug Undocumented Secrets Black MagicCloug Undocumented Secrets Black Magic
Cloug Undocumented Secrets Black Magic
 
OpenLDAP - Installation and Configuration
OpenLDAP - Installation and ConfigurationOpenLDAP - Installation and Configuration
OpenLDAP - Installation and Configuration
 
Manual Tecnico OGG Oracle to MySQL
Manual Tecnico OGG Oracle to MySQLManual Tecnico OGG Oracle to MySQL
Manual Tecnico OGG Oracle to MySQL
 
2012-10-16 Mil-OSS Working Group: Introduction to SCAP Security Guide
2012-10-16 Mil-OSS Working Group: Introduction to SCAP Security Guide2012-10-16 Mil-OSS Working Group: Introduction to SCAP Security Guide
2012-10-16 Mil-OSS Working Group: Introduction to SCAP Security Guide
 
Drools rule Concepts
Drools rule ConceptsDrools rule Concepts
Drools rule Concepts
 
Manage cloud infrastructures using Zend Framework 2 (and ZF1)
Manage cloud infrastructures using Zend Framework 2 (and ZF1)Manage cloud infrastructures using Zend Framework 2 (and ZF1)
Manage cloud infrastructures using Zend Framework 2 (and ZF1)
 
ADO.NET by ASP.NET Development Company in india
ADO.NET by ASP.NET  Development Company in indiaADO.NET by ASP.NET  Development Company in india
ADO.NET by ASP.NET Development Company in india
 
Database As A Service: OEM + ODA (OOW 15 Presentation)
Database As A Service: OEM + ODA (OOW 15 Presentation)Database As A Service: OEM + ODA (OOW 15 Presentation)
Database As A Service: OEM + ODA (OOW 15 Presentation)
 
How to Manage Cloud Infrastructures using Zend Framework
How to Manage Cloud Infrastructures using Zend FrameworkHow to Manage Cloud Infrastructures using Zend Framework
How to Manage Cloud Infrastructures using Zend Framework
 
Google cloud datastore driver for Google Apps Script DB abstraction
Google cloud datastore driver for Google Apps Script DB abstractionGoogle cloud datastore driver for Google Apps Script DB abstraction
Google cloud datastore driver for Google Apps Script DB abstraction
 

Plus de Mindfire Solutions

Plus de Mindfire Solutions (20)

Physician Search and Review
Physician Search and ReviewPhysician Search and Review
Physician Search and Review
 
diet management app
diet management appdiet management app
diet management app
 
Business Technology Solution
Business Technology SolutionBusiness Technology Solution
Business Technology Solution
 
Remote Health Monitoring
Remote Health MonitoringRemote Health Monitoring
Remote Health Monitoring
 
Influencer Marketing Solution
Influencer Marketing SolutionInfluencer Marketing Solution
Influencer Marketing Solution
 
ELMAH
ELMAHELMAH
ELMAH
 
High Availability of Azure Applications
High Availability of Azure ApplicationsHigh Availability of Azure Applications
High Availability of Azure Applications
 
IOT Hands On
IOT Hands OnIOT Hands On
IOT Hands On
 
Glimpse of Loops Vs Set
Glimpse of Loops Vs SetGlimpse of Loops Vs Set
Glimpse of Loops Vs Set
 
Oracle Sql Developer-Getting Started
Oracle Sql Developer-Getting StartedOracle Sql Developer-Getting Started
Oracle Sql Developer-Getting Started
 
Adaptive Layout In iOS 8
Adaptive Layout In iOS 8Adaptive Layout In iOS 8
Adaptive Layout In iOS 8
 
Introduction to Auto-layout : iOS/Mac
Introduction to Auto-layout : iOS/MacIntroduction to Auto-layout : iOS/Mac
Introduction to Auto-layout : iOS/Mac
 
LINQPad - utility Tool
LINQPad - utility ToolLINQPad - utility Tool
LINQPad - utility Tool
 
Get started with watch kit development
Get started with watch kit developmentGet started with watch kit development
Get started with watch kit development
 
Swift vs Objective-C
Swift vs Objective-CSwift vs Objective-C
Swift vs Objective-C
 
Material Design in Android
Material Design in AndroidMaterial Design in Android
Material Design in Android
 
Introduction to OData
Introduction to ODataIntroduction to OData
Introduction to OData
 
Ext js Part 2- MVC
Ext js Part 2- MVCExt js Part 2- MVC
Ext js Part 2- MVC
 
ExtJs Basic Part-1
ExtJs Basic Part-1ExtJs Basic Part-1
ExtJs Basic Part-1
 
Spring Security Introduction
Spring Security IntroductionSpring Security Introduction
Spring Security Introduction
 

Dernier

%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
masabamasaba
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
 

Dernier (20)

WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security Program
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 

Zend ACL Basics

  • 2. Table of Contents ● What is Acl? ● Zend & Basic Set Up ● Components of Acl(Zend) ● Resources in Acl ● Roles in Acl ● Creating a simple Acl with example ● Storing ACL Data for Persistence ● Conditional ACL Rules with Assertions ● Benefits
  • 3. What is Acl? ● The functionality of specifying access rights to resources is access control. ● An ACL specifies which users or system processes are granted access to resources, as well as what operations are allowed on given resource. ● An access control list (ACL), with respect to a computer file system is a list of permissions attached to the files.
  • 4. Zend & Basic Set Up ● Zend Framework is an open source, object oriented web application framework for PHP 5. ● Zend is often called a 'component library', because it has many components that you can use more or less independently. ● Provides Model-View-Controller (MVC) implementation. ● Basic set up can be found here - http://framework.zend.com/manual/1.12/en/learnin g.quickstart.html
  • 5. Components of Acl(ZF) ● Zend_Acl is a flexible implementation for privileges management. ● Mainly two objects (Resource and role) are involved → a resource is an object to which access is controlled. → a role is an object that may request access to a Resource. → And privileges is what an object can do on the Resource.
  • 6. Resource in Zend_Acl ● In Zend, resource can be a “module” or “controller” or “controller action” or any block of code. ● Zend_Acl provides Zend_Acl_Resource_Interface as a resource to facilitate creating resource. ● Additionally, Zend_Acl_Resource is provided by Zend_Acl as a basic resource implementation. ● $acl = new Zend_Acl(); ● $acl->add(new Zend_Acl_Resource('Resource'));
  • 7. Role in Zend_Acl ● In Zend, role is the user type say “admin” or “guest” etc. ● Zend_Acl provides Zend_Acl_Role_Interface as a basic role to facilitate creating role. ● Additionally, Zend_Acl_Role is provided by Zend_Acl as a basic role implementation. ● $acl = new Zend_Acl(); ● $acl->addRole(new Zend_Acl_Role('guest'))
  • 8. Zend Role continue..... ● In Zend_Acl, a role may inherit from one or more roles. This is to support inheritance of rules among role. ● The following code defines three base roles - "guest", "member", and "admin" ● $acl->addRole(new Zend_Acl_Role('guest')) ->addRole(new Zend_Acl_Role('member')) ->addRole(new Zend_Acl_Role('admin'));
  • 9. Zend Role continue..... Inheritance ● $acl->addRole(new Zend_Acl_Role('guest'), 'user') Multiple Inheritance among Roles: ● $parents = array('guest', 'member', 'admin'); ● $acl->addRole(new Zend_Acl_Role('someUser'), $parents);
  • 10. Zend Role continue..... Multiple Inheritance among Roles: ● $acl->add(new Zend_Acl_Resource('someResource')); ● $acl->deny('guest', 'someResource'); ● $acl->allow('member', 'someResource'); ● echo $acl->isAllowed('someUser', 'someResource') ? 'allowed' : 'denied';
  • 11. Zend Role continue..... Multiple Inheritance among Roles: ● O/P – allowed ● When specifying multiple parents for a role, then the last parent listed is the first one searched for rules applicable to an authorization query.
  • 13. Storing ACL Data ● Zend_Acl was designed in such a way that it does not require any particular back-end technology such as a database or cache server for storage of the ACL data. ● Zend_Acl is serializable, ACL objects may be serialized with PHP's serialize() function, and the results may be stored anywhere the developer should desire, such as a file, database, or caching mechanism. ● Let us see an example to store the Acl data in database.
  • 14. Conditional ACL Rules ● Zend_Acl provides support for conditional rules with Zend_Acl_Assert_Interface. → Only between the hours of 8:00am and 5:00pm. → Access / Deny specific to any IP address. ● $acl = new Zend_Acl(); ● $acl->allow(null, null, null, new ClsAssertion()); → Assertion only applies when the assertion method returns TRUE
  • 15. Benefits of using Acl → Security. → Filtering traffic. → Confidentiality - Control disclosure of information. → Centralized place to access and manage ACL rules, resources, and roles. → Maps nicely to the MVC controller/action architecture. → Easiness of user and resource management. → Easy modification.
  • 17. Thank You Voting time, please vote for better India :)