SlideShare a Scribd company logo
1 of 22
Flexible & Repeatable
Permissions Management
with ACL Templates
Jeff Potts
Learn. Connect. Collaborate.
Alfresco is missing a feature: ACL Templates
• Many projects start with a spreadsheet that organizes folder structure
• The next step is often defining the permissions that go with that structure
• Usually, permissions are applied in a consistent, predictable way
according to business rules
Learn. Connect. Collaborate.
Don’t Repeat Yourself
• When you programmatically create nodes and set permissions, it is
tempting to just make a bunch of API calls and be done
• What happens when you need to set permissions in different places?
– JavaScript versus Java
– Actions versus Behaviors
– Workflows
– Yes, you can centralize this logic in a common “service” class, but…
Learn. Connect. Collaborate.
If it might change, why is it in code?
• What happens when the business rules change and a power user wants to
change how permissions are set?
• Build and deploy just because an entry in an ACL is changing from
“Collaborator” to “Consumer”?
• Yuck
Learn. Connect. Collaborate.
How Does Everyone Else Do It?
• Many ECM systems allow permission sets to be declared, then applied
when needed
• Now you can do that with Alfresco
• I give you Alfresco ACL Templates!
– https://github.com/conexiam/alfresco-acl-templates
• Dun dun DUN!!!
1
Learn. Connect. Collaborate.
Example: Folders that hold files related to client
projects
• /Project 1 for Client A
– /Design Discussion
– /Final Deliverables
– /Status Reports
• /Project 2 for Client A
– /Design Discussion
– /Final Deliverables
– /Status Reports
• /Project 3 for Client B
– /Design Discussion
– /Final Deliverables
– /Status Reports
Project 1 Team: Collaborator
Client A Team: Collaborator
Project 2 Team: Collaborator
Client A Team: Consumer
Project 1 Team: Collaborator
Client A Team: Consumer
Project 2 Team: Collaborator
Client A Team: Collaborator
Project 3 Team: Collaborator
Client B Team: Consumer
Project 3 Team: Collaborator
Client B Team: Collaborator
Learn. Connect. Collaborate.
I see a pattern!
• /Project 1 for Client A
– /Design Discussion
– /Final Deliverables
– /Status Reports
• /Project 2 for Client A
– /Design Discussion
– /Final Deliverables
– /Status Reports
• /Project 3 for Client B
– /Design Discussion
– /Final Deliverables
– /Status Reports
Project 1 Team: Collaborator
Client A Team: Collaborator
Project 2 Team: Collaborator
Client A Team: Consumer
Project 1 Team: Collaborator
Client A Team: Consumer
Project 2 Team: Collaborator
Client A Team: Collaborator
Project 3 Team: Collaborator
Client B Team: Consumer
Project 3 Team: Collaborator
Client B Team: Collaborator
There is a group for a
project that is always the
collaborator.
There is a group for the
client that is a Collaborator
on some folders and a
Consumer on other
folders.
That’s potentially two
“templates”
Learn. Connect. Collaborate.
A Wrinkle: Group can’t be determined at design-time
• /Project 1 for Client A
– /Design Discussion
– /Final Deliverables
– /Status Reports
• /Project 2 for Client A
– /Design Discussion
– /Final Deliverables
– /Status Reports
• /Project 3 for Client B
– /Design Discussion
– /Final Deliverables
– /Status Reports
Project 1 Team: Collaborator
Client A Team: Collaborator
Project 2 Team: Collaborator
Client A Team: Consumer
Project 1 Team: Collaborator
Client A Team: Consumer
Project 2 Team: Collaborator
Client A Team: Collaborator
Project 3 Team: Collaborator
Client B Team: Consumer
Project 3 Team: Collaborator
Client B Team: Collaborator
Uh-oh, variability!
Learn. Connect. Collaborate.
Another Wrinkle: Time
2
• /Project 1 for Client A
– /Design Discussion
– /Final Deliverables
– /Status Reports
• /Project 2 for Client A
– /Design Discussion
– /Final Deliverables
– /Status Reports
• /Project 3 for Client B
– /Design Discussion
– /Final Deliverables
– /Status Reports
Project 1 Team: Collaborator
Client A Team: Collaborator
Project 2 Team: Collaborator
Client A Team: Consumer
Project 1 Team: Collaborator
Client A Team: Consumer
Project 2 Team: Collaborator
Client A Team: Collaborator
Project 3 Team: Collaborator
Client B Team: Consumer
Project 3 Team: Collaborator
Client B Team: Collaborator
Project 1 Team: Consumer
Client A Team: Consumer
Project 2 Team: Consumer
Client A Team: Consumer
Project 1 Team: Consumer
Client A Team: Consumer
Project 2 Team: Consumer
Client A Team: Consumer
Project 3 Team: Consumer
Client B Team: Consumer
Project 3 Team: Consumer
Client B Team: Consumer
Active Projects Completed Projects
Learn. Connect. Collaborate.
Alfresco ACL Templates Add-On
• Open source project sponsored by a client called Conexiam
– I maintain it on their behalf at Github
• Allows you to declare ACL templates as JSON
– ACL Templates live in the Data Dictionary
• Provides an “ACL Template Service” that you can call from JavaScript or
Java to “apply” a template to a node
Learn. Connect. Collaborate.
Example #1: Static ACL Template
{
"inherit": false,
"permissions": [
{
"authority": ”GROUP_Project 1 Team",
"permission": "Collaborator”
},
{
"authority": ”GROUP_Client A Team",
"permission": "Collaborator”
}
]
}
Learn. Connect. Collaborate.
Example #2: Applying an ACL Template
import com.conexiam.acl.templates.service.AclTemplateService;
…SNIP…
AclTemplateService aclTemplateService;
…SNIP…
aclTemplateService.apply("test-template-2.json", testFolder);
Learn. Connect. Collaborate.
Example #3: An ACL template with placeholders
3
{
"inherit": false,
"permissions": [
{
"authorityTemplate": ”project-team",
"permission": "Collaborator”
},
{
"authorityTemplate": ”client-team",
"permission": "Collaborator”
}
]
}
Learn. Connect. Collaborate.
How do those placeholders work?
• Can specify an authorityTemplate instead of a hard-coded authority
• An authorityTemplate is just a Spring Bean that resolves an authority
template to an actual authority
• Examples:
– What is the correct “project group” for this site?
– What is the correct “client group” for this site?
– Basically anything that can use the nodeRef to resolve the template
Learn. Connect. Collaborate.
Add-on ships with one sample authority template
resolver
• Site role group resolver
• Returns the site group for a given role
• Example: Always give the Site Collaborator group for this site Consumer
access
• Making your own authority template resolvers is easy
Learn. Connect. Collaborate.
Implementing your own authority resolver
• Create a Java class that implements AuthorityResolver
• Inject your dependencies
• Implement public String resolve(NodeRef nodeRef)
• Config in Spring context XML
• Add to authorityResolvers map
Learn. Connect. Collaborate.
Example: Site Role Group Authority Resolver
4
<bean
id="authority-template.site-manager-group”
class="com.conexiam.acl.templates.authority.resolvers.SiteRole
GroupResolver">
<property name="siteService">
<ref bean="SiteService" />
</property>
<property name="role" value="SiteManager" />
</bean>
Learn. Connect. Collaborate.
Example: Site Role Group Authority Resolver
public String resolve(NodeRef nodeRef) {
SiteInfo siteInfo = siteService.getSite(nodeRef);
if (siteInfo == null) {
return null;
}
String siteId = siteInfo.getShortName();
String siteRoleGroup = siteService.getSiteRoleGroup(siteId,
role);
return siteRoleGroup;
}
Learn. Connect. Collaborate.
Summary
• ACL Templates Add-on
• Declare permissions in JSON, store in Data Dictionary
• Apply permissions using ACL Template Service
• Removes permission logic from code
• Makes it easier for non-technical people to change the permissions your
code sets on nodes it creates
Learn. Connect. Collaborate.
Summary
• ACL Templates can have hard-coded authorities, authority templates, or a
mix of both
• Authority templates are resolved with the help of an authority template
resolver class
– Can use properties on the node, or other services to help determine the right
authority
Learn. Connect. Collaborate.
Support the Community!
• This add-on was funded by a Metaversant client called Conexiam
• Per their request, we did all of their Alfresco customizations in the open
• Check out the other related repositories at https://github.com/Conexiam
• Let me know if you have any questions!
• @jeffpotts01
Flexible & Repeatable
Permissions Management
with ACL Templates
Thank you!
@jeffpotts01

More Related Content

What's hot

What's hot (20)

Chicago Microservices Integration Talk
Chicago Microservices Integration TalkChicago Microservices Integration Talk
Chicago Microservices Integration Talk
 
Polyglot Messaging with Apache ActiveMQ
Polyglot Messaging with Apache ActiveMQPolyglot Messaging with Apache ActiveMQ
Polyglot Messaging with Apache ActiveMQ
 
Solving Enterprise Integration with Apache Camel
Solving Enterprise Integration with Apache CamelSolving Enterprise Integration with Apache Camel
Solving Enterprise Integration with Apache Camel
 
Simplify integrations-final-pdf
Simplify integrations-final-pdfSimplify integrations-final-pdf
Simplify integrations-final-pdf
 
Alfresco Devcon 2019 - Lightning Talk - Not-so-smart folders made smart(er)
Alfresco Devcon 2019 - Lightning Talk - Not-so-smart folders made smart(er)Alfresco Devcon 2019 - Lightning Talk - Not-so-smart folders made smart(er)
Alfresco Devcon 2019 - Lightning Talk - Not-so-smart folders made smart(er)
 
Microservices with Apache Camel, Docker and Fabric8 v2
Microservices with Apache Camel, Docker and Fabric8 v2Microservices with Apache Camel, Docker and Fabric8 v2
Microservices with Apache Camel, Docker and Fabric8 v2
 
Anatomy of an APS 2 appication
Anatomy of an APS 2 appicationAnatomy of an APS 2 appication
Anatomy of an APS 2 appication
 
12-factor-jruby
12-factor-jruby12-factor-jruby
12-factor-jruby
 
In The Trenches With Tomster, Upgrading Ember.js & Ember Data
In The Trenches With Tomster, Upgrading Ember.js & Ember DataIn The Trenches With Tomster, Upgrading Ember.js & Ember Data
In The Trenches With Tomster, Upgrading Ember.js & Ember Data
 
Apigility-Powered APIs on IBM i
Apigility-Powered APIs on IBM iApigility-Powered APIs on IBM i
Apigility-Powered APIs on IBM i
 
Real-world #microservices with Apache Camel, Fabric8, and OpenShift
Real-world #microservices with Apache Camel, Fabric8, and OpenShiftReal-world #microservices with Apache Camel, Fabric8, and OpenShift
Real-world #microservices with Apache Camel, Fabric8, and OpenShift
 
Apigility-powered API's on IBM i
Apigility-powered API's on IBM iApigility-powered API's on IBM i
Apigility-powered API's on IBM i
 
Jose portillo dev con presentation 1138
Jose portillo   dev con presentation 1138Jose portillo   dev con presentation 1138
Jose portillo dev con presentation 1138
 
Microservices with Apache Camel, DDD, and Kubernetes
Microservices with Apache Camel, DDD, and KubernetesMicroservices with Apache Camel, DDD, and Kubernetes
Microservices with Apache Camel, DDD, and Kubernetes
 
Cloud Native Camel Riding
Cloud Native Camel RidingCloud Native Camel Riding
Cloud Native Camel Riding
 
12 Factor Scala
12 Factor Scala12 Factor Scala
12 Factor Scala
 
gRPC, GraphQL, REST - Which API Tech to use - API Conference Berlin oct 20
gRPC, GraphQL, REST - Which API Tech to use - API Conference Berlin oct 20gRPC, GraphQL, REST - Which API Tech to use - API Conference Berlin oct 20
gRPC, GraphQL, REST - Which API Tech to use - API Conference Berlin oct 20
 
Fuse integration-services
Fuse integration-servicesFuse integration-services
Fuse integration-services
 
Java one kubernetes, jenkins and microservices
Java one   kubernetes, jenkins and microservicesJava one   kubernetes, jenkins and microservices
Java one kubernetes, jenkins and microservices
 
Merging two big Symfony based applications - SymfonyCon 2017
Merging two big Symfony based applications - SymfonyCon 2017Merging two big Symfony based applications - SymfonyCon 2017
Merging two big Symfony based applications - SymfonyCon 2017
 

Similar to Flexible Permissions Management with ACL Templates

Tech talk specflow_bddx_hassa_nagy
Tech talk specflow_bddx_hassa_nagyTech talk specflow_bddx_hassa_nagy
Tech talk specflow_bddx_hassa_nagy
Skills Matter
 
Socialite, the Open Source Status Feed Part 1: Design Overview and Scaling fo...
Socialite, the Open Source Status Feed Part 1: Design Overview and Scaling fo...Socialite, the Open Source Status Feed Part 1: Design Overview and Scaling fo...
Socialite, the Open Source Status Feed Part 1: Design Overview and Scaling fo...
MongoDB
 
Cs 1023 lec 8 design pattern (week 2)
Cs 1023 lec 8 design pattern (week 2)Cs 1023 lec 8 design pattern (week 2)
Cs 1023 lec 8 design pattern (week 2)
stanbridge
 

Similar to Flexible Permissions Management with ACL Templates (20)

565847651-Az-400t00a-Enu-Powerpoint-05.pptx
565847651-Az-400t00a-Enu-Powerpoint-05.pptx565847651-Az-400t00a-Enu-Powerpoint-05.pptx
565847651-Az-400t00a-Enu-Powerpoint-05.pptx
 
Tech talk specflow_bddx_hassa_nagy
Tech talk specflow_bddx_hassa_nagyTech talk specflow_bddx_hassa_nagy
Tech talk specflow_bddx_hassa_nagy
 
Automated Acceptance Tests & Tool choice
Automated Acceptance Tests & Tool choiceAutomated Acceptance Tests & Tool choice
Automated Acceptance Tests & Tool choice
 
Mcknight well built extensions
Mcknight well built extensionsMcknight well built extensions
Mcknight well built extensions
 
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 9...
 Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 9... Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 9...
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 9...
 
Agile Secure Cloud Application Development Management
Agile Secure Cloud Application Development ManagementAgile Secure Cloud Application Development Management
Agile Secure Cloud Application Development Management
 
Opendaylight SDN Controller
Opendaylight SDN ControllerOpendaylight SDN Controller
Opendaylight SDN Controller
 
Alfresco Mvc - a seamless integration with Spring Mvc
Alfresco Mvc - a seamless integration with Spring MvcAlfresco Mvc - a seamless integration with Spring Mvc
Alfresco Mvc - a seamless integration with Spring Mvc
 
The State of OpenStack Product Management
The State of OpenStack Product ManagementThe State of OpenStack Product Management
The State of OpenStack Product Management
 
The Meteor Framework
The Meteor FrameworkThe Meteor Framework
The Meteor Framework
 
Software Design Patterns. Part I :: Structural Patterns
Software Design Patterns. Part I :: Structural PatternsSoftware Design Patterns. Part I :: Structural Patterns
Software Design Patterns. Part I :: Structural Patterns
 
SEppt
SEpptSEppt
SEppt
 
Apidays Paris 2023 - AsyncAPI For Platform Self-Service, João Dias and Rui Eu...
Apidays Paris 2023 - AsyncAPI For Platform Self-Service, João Dias and Rui Eu...Apidays Paris 2023 - AsyncAPI For Platform Self-Service, João Dias and Rui Eu...
Apidays Paris 2023 - AsyncAPI For Platform Self-Service, João Dias and Rui Eu...
 
29.4 mb
29.4 mb29.4 mb
29.4 mb
 
29.4 Mb
29.4 Mb29.4 Mb
29.4 Mb
 
Socialite, the Open Source Status Feed Part 1: Design Overview and Scaling fo...
Socialite, the Open Source Status Feed Part 1: Design Overview and Scaling fo...Socialite, the Open Source Status Feed Part 1: Design Overview and Scaling fo...
Socialite, the Open Source Status Feed Part 1: Design Overview and Scaling fo...
 
Intelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest IstanbulIntelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest Istanbul
 
Introduction to Agile Software Development Process
Introduction to Agile Software Development ProcessIntroduction to Agile Software Development Process
Introduction to Agile Software Development Process
 
O365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - MaterialO365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - Material
 
Cs 1023 lec 8 design pattern (week 2)
Cs 1023 lec 8 design pattern (week 2)Cs 1023 lec 8 design pattern (week 2)
Cs 1023 lec 8 design pattern (week 2)
 

More from Jeff Potts

Alfresco Community Survey 2012 Results
Alfresco Community Survey 2012 ResultsAlfresco Community Survey 2012 Results
Alfresco Community Survey 2012 Results
Jeff Potts
 
Alfresco SAUG: CMIS & Integrations
Alfresco SAUG: CMIS & IntegrationsAlfresco SAUG: CMIS & Integrations
Alfresco SAUG: CMIS & Integrations
Jeff Potts
 

More from Jeff Potts (20)

No Docker? No Problem: Automating installation and config with Ansible
No Docker? No Problem: Automating installation and config with AnsibleNo Docker? No Problem: Automating installation and config with Ansible
No Docker? No Problem: Automating installation and config with Ansible
 
Moving From Actions & Behaviors to Microservices
Moving From Actions & Behaviors to MicroservicesMoving From Actions & Behaviors to Microservices
Moving From Actions & Behaviors to Microservices
 
Moving Gigantic Files Into and Out of the Alfresco Repository
Moving Gigantic Files Into and Out of the Alfresco RepositoryMoving Gigantic Files Into and Out of the Alfresco Repository
Moving Gigantic Files Into and Out of the Alfresco Repository
 
Could Alfresco Survive a Zombie Attack?
Could Alfresco Survive a Zombie Attack?Could Alfresco Survive a Zombie Attack?
Could Alfresco Survive a Zombie Attack?
 
Connecting Content Management Apps with CMIS
Connecting Content Management Apps with CMISConnecting Content Management Apps with CMIS
Connecting Content Management Apps with CMIS
 
The Challenges of Keeping Bees
The Challenges of Keeping BeesThe Challenges of Keeping Bees
The Challenges of Keeping Bees
 
Getting Started With CMIS
Getting Started With CMISGetting Started With CMIS
Getting Started With CMIS
 
Alfresco: What every developer should know
Alfresco: What every developer should knowAlfresco: What every developer should know
Alfresco: What every developer should know
 
CMIS: An Open API for Managing Content
CMIS: An Open API for Managing ContentCMIS: An Open API for Managing Content
CMIS: An Open API for Managing Content
 
Apache Chemistry in Action: Using CMIS and your favorite language to unlock c...
Apache Chemistry in Action: Using CMIS and your favorite language to unlock c...Apache Chemistry in Action: Using CMIS and your favorite language to unlock c...
Apache Chemistry in Action: Using CMIS and your favorite language to unlock c...
 
Alfresco: The Story of How Open Source Disrupted the ECM Market
Alfresco: The Story of How Open Source Disrupted the ECM MarketAlfresco: The Story of How Open Source Disrupted the ECM Market
Alfresco: The Story of How Open Source Disrupted the ECM Market
 
Join the Alfresco community
Join the Alfresco communityJoin the Alfresco community
Join the Alfresco community
 
Intro to the Alfresco Public API
Intro to the Alfresco Public APIIntro to the Alfresco Public API
Intro to the Alfresco Public API
 
Apache Chemistry in Action
Apache Chemistry in ActionApache Chemistry in Action
Apache Chemistry in Action
 
Building Content-Rich Java Apps in the Cloud with the Alfresco API
Building Content-Rich Java Apps in the Cloud with the Alfresco APIBuilding Content-Rich Java Apps in the Cloud with the Alfresco API
Building Content-Rich Java Apps in the Cloud with the Alfresco API
 
Alfresco Community Survey 2012 Results
Alfresco Community Survey 2012 ResultsAlfresco Community Survey 2012 Results
Alfresco Community Survey 2012 Results
 
Getting Started with CMIS
Getting Started with CMISGetting Started with CMIS
Getting Started with CMIS
 
Relational Won't Cut It: Architecting Content Centric Apps
Relational Won't Cut It: Architecting Content Centric AppsRelational Won't Cut It: Architecting Content Centric Apps
Relational Won't Cut It: Architecting Content Centric Apps
 
Alfresco SAUG: State of ECM
Alfresco SAUG: State of ECMAlfresco SAUG: State of ECM
Alfresco SAUG: State of ECM
 
Alfresco SAUG: CMIS & Integrations
Alfresco SAUG: CMIS & IntegrationsAlfresco SAUG: CMIS & Integrations
Alfresco SAUG: CMIS & Integrations
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 

Flexible Permissions Management with ACL Templates

  • 1. Flexible & Repeatable Permissions Management with ACL Templates Jeff Potts
  • 2. Learn. Connect. Collaborate. Alfresco is missing a feature: ACL Templates • Many projects start with a spreadsheet that organizes folder structure • The next step is often defining the permissions that go with that structure • Usually, permissions are applied in a consistent, predictable way according to business rules
  • 3. Learn. Connect. Collaborate. Don’t Repeat Yourself • When you programmatically create nodes and set permissions, it is tempting to just make a bunch of API calls and be done • What happens when you need to set permissions in different places? – JavaScript versus Java – Actions versus Behaviors – Workflows – Yes, you can centralize this logic in a common “service” class, but…
  • 4. Learn. Connect. Collaborate. If it might change, why is it in code? • What happens when the business rules change and a power user wants to change how permissions are set? • Build and deploy just because an entry in an ACL is changing from “Collaborator” to “Consumer”? • Yuck
  • 5. Learn. Connect. Collaborate. How Does Everyone Else Do It? • Many ECM systems allow permission sets to be declared, then applied when needed • Now you can do that with Alfresco • I give you Alfresco ACL Templates! – https://github.com/conexiam/alfresco-acl-templates • Dun dun DUN!!! 1
  • 6. Learn. Connect. Collaborate. Example: Folders that hold files related to client projects • /Project 1 for Client A – /Design Discussion – /Final Deliverables – /Status Reports • /Project 2 for Client A – /Design Discussion – /Final Deliverables – /Status Reports • /Project 3 for Client B – /Design Discussion – /Final Deliverables – /Status Reports Project 1 Team: Collaborator Client A Team: Collaborator Project 2 Team: Collaborator Client A Team: Consumer Project 1 Team: Collaborator Client A Team: Consumer Project 2 Team: Collaborator Client A Team: Collaborator Project 3 Team: Collaborator Client B Team: Consumer Project 3 Team: Collaborator Client B Team: Collaborator
  • 7. Learn. Connect. Collaborate. I see a pattern! • /Project 1 for Client A – /Design Discussion – /Final Deliverables – /Status Reports • /Project 2 for Client A – /Design Discussion – /Final Deliverables – /Status Reports • /Project 3 for Client B – /Design Discussion – /Final Deliverables – /Status Reports Project 1 Team: Collaborator Client A Team: Collaborator Project 2 Team: Collaborator Client A Team: Consumer Project 1 Team: Collaborator Client A Team: Consumer Project 2 Team: Collaborator Client A Team: Collaborator Project 3 Team: Collaborator Client B Team: Consumer Project 3 Team: Collaborator Client B Team: Collaborator There is a group for a project that is always the collaborator. There is a group for the client that is a Collaborator on some folders and a Consumer on other folders. That’s potentially two “templates”
  • 8. Learn. Connect. Collaborate. A Wrinkle: Group can’t be determined at design-time • /Project 1 for Client A – /Design Discussion – /Final Deliverables – /Status Reports • /Project 2 for Client A – /Design Discussion – /Final Deliverables – /Status Reports • /Project 3 for Client B – /Design Discussion – /Final Deliverables – /Status Reports Project 1 Team: Collaborator Client A Team: Collaborator Project 2 Team: Collaborator Client A Team: Consumer Project 1 Team: Collaborator Client A Team: Consumer Project 2 Team: Collaborator Client A Team: Collaborator Project 3 Team: Collaborator Client B Team: Consumer Project 3 Team: Collaborator Client B Team: Collaborator Uh-oh, variability!
  • 9. Learn. Connect. Collaborate. Another Wrinkle: Time 2 • /Project 1 for Client A – /Design Discussion – /Final Deliverables – /Status Reports • /Project 2 for Client A – /Design Discussion – /Final Deliverables – /Status Reports • /Project 3 for Client B – /Design Discussion – /Final Deliverables – /Status Reports Project 1 Team: Collaborator Client A Team: Collaborator Project 2 Team: Collaborator Client A Team: Consumer Project 1 Team: Collaborator Client A Team: Consumer Project 2 Team: Collaborator Client A Team: Collaborator Project 3 Team: Collaborator Client B Team: Consumer Project 3 Team: Collaborator Client B Team: Collaborator Project 1 Team: Consumer Client A Team: Consumer Project 2 Team: Consumer Client A Team: Consumer Project 1 Team: Consumer Client A Team: Consumer Project 2 Team: Consumer Client A Team: Consumer Project 3 Team: Consumer Client B Team: Consumer Project 3 Team: Consumer Client B Team: Consumer Active Projects Completed Projects
  • 10. Learn. Connect. Collaborate. Alfresco ACL Templates Add-On • Open source project sponsored by a client called Conexiam – I maintain it on their behalf at Github • Allows you to declare ACL templates as JSON – ACL Templates live in the Data Dictionary • Provides an “ACL Template Service” that you can call from JavaScript or Java to “apply” a template to a node
  • 11. Learn. Connect. Collaborate. Example #1: Static ACL Template { "inherit": false, "permissions": [ { "authority": ”GROUP_Project 1 Team", "permission": "Collaborator” }, { "authority": ”GROUP_Client A Team", "permission": "Collaborator” } ] }
  • 12. Learn. Connect. Collaborate. Example #2: Applying an ACL Template import com.conexiam.acl.templates.service.AclTemplateService; …SNIP… AclTemplateService aclTemplateService; …SNIP… aclTemplateService.apply("test-template-2.json", testFolder);
  • 13. Learn. Connect. Collaborate. Example #3: An ACL template with placeholders 3 { "inherit": false, "permissions": [ { "authorityTemplate": ”project-team", "permission": "Collaborator” }, { "authorityTemplate": ”client-team", "permission": "Collaborator” } ] }
  • 14. Learn. Connect. Collaborate. How do those placeholders work? • Can specify an authorityTemplate instead of a hard-coded authority • An authorityTemplate is just a Spring Bean that resolves an authority template to an actual authority • Examples: – What is the correct “project group” for this site? – What is the correct “client group” for this site? – Basically anything that can use the nodeRef to resolve the template
  • 15. Learn. Connect. Collaborate. Add-on ships with one sample authority template resolver • Site role group resolver • Returns the site group for a given role • Example: Always give the Site Collaborator group for this site Consumer access • Making your own authority template resolvers is easy
  • 16. Learn. Connect. Collaborate. Implementing your own authority resolver • Create a Java class that implements AuthorityResolver • Inject your dependencies • Implement public String resolve(NodeRef nodeRef) • Config in Spring context XML • Add to authorityResolvers map
  • 17. Learn. Connect. Collaborate. Example: Site Role Group Authority Resolver 4 <bean id="authority-template.site-manager-group” class="com.conexiam.acl.templates.authority.resolvers.SiteRole GroupResolver"> <property name="siteService"> <ref bean="SiteService" /> </property> <property name="role" value="SiteManager" /> </bean>
  • 18. Learn. Connect. Collaborate. Example: Site Role Group Authority Resolver public String resolve(NodeRef nodeRef) { SiteInfo siteInfo = siteService.getSite(nodeRef); if (siteInfo == null) { return null; } String siteId = siteInfo.getShortName(); String siteRoleGroup = siteService.getSiteRoleGroup(siteId, role); return siteRoleGroup; }
  • 19. Learn. Connect. Collaborate. Summary • ACL Templates Add-on • Declare permissions in JSON, store in Data Dictionary • Apply permissions using ACL Template Service • Removes permission logic from code • Makes it easier for non-technical people to change the permissions your code sets on nodes it creates
  • 20. Learn. Connect. Collaborate. Summary • ACL Templates can have hard-coded authorities, authority templates, or a mix of both • Authority templates are resolved with the help of an authority template resolver class – Can use properties on the node, or other services to help determine the right authority
  • 21. Learn. Connect. Collaborate. Support the Community! • This add-on was funded by a Metaversant client called Conexiam • Per their request, we did all of their Alfresco customizations in the open • Check out the other related repositories at https://github.com/Conexiam • Let me know if you have any questions! • @jeffpotts01
  • 22. Flexible & Repeatable Permissions Management with ACL Templates Thank you! @jeffpotts01