Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events
SOLVED

How to create and config system users during deployment?

Avatar

Level 3

I'm building a service in AEM that uses a system user to perform certain tasks.

Currently, when I develop the service locally, I create the system user (following this LINK) and config everything manually. However, I want to automate this process during deployment using a CI/CD pipeline.

What is the right way to create the system user, add the necessary permissions, and set up the service user mapping during the deployment process? Are there any best practices or potential pitfalls to keep in mind?

Any advice or examples would be greatly appreciated. Thank you!

1 Accepted Solution

Avatar

Correct answer by
Community Advisor
4 Replies

Avatar

Correct answer by
Community Advisor

Avatar

Community Advisor

@wei_lyu 

other option can be netcentric access control tool.

https://github.com/Netcentric/accesscontroltool

 

acl config can be created and committed as a part of code. 

sample config for system user

-user_config

- sample-system-user
- name: sample-system-user
  path: SomePathToSaveUser
  isSystemUser: true

-ace_config:
- sample-system-user
    -path: /content
     permission: allow
     privileges: jcr:all


Avatar

Community Advisor

Why do you want the system user to be created automatically. What are the use case that you need aem system user for ci/cd process?

Avatar

Community Advisor

This is a best practice to do it automatically , otherwise you have to follow same manual step in all the environments including locals



Arun Patidar