Expand my Community achievements bar.

SOLVED

What is the best way to register AEM system users with code as configuration?

Avatar

Level 7

For example, I have 1 AEM author and 4 AEM publishers. I need to register a couple of system users for each and every environment. What is the best way to achieve my goal using code as configuration?

 

How would I do this in:
AEM - Cloud as a service
AEM - Adobe Managed Services

 

I am planning to use https://adobe-consulting-services.github.io/acs-aem-commons/features/ensure-service-users/index.html... is this a good practice?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @AEMWizard ,

 

RepoInit Scripts is the recommended way to create Service Users in AEMaaCS.

 

https://experienceleague.adobe.com/docs/experience-manager-cloud-service/implementing/developing/aem...

 

Even in Ensure Service ACS link they are recommending to use the Repo Init Scripts.

 

 

kishorekumar14_0-1632794905239.png

 

 

https://adobe-consulting-services.github.io/acs-aem-commons/features/ensure-service-users/index.html 

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

Hi @AEMWizard ,

 

RepoInit Scripts is the recommended way to create Service Users in AEMaaCS.

 

https://experienceleague.adobe.com/docs/experience-manager-cloud-service/implementing/developing/aem...

 

Even in Ensure Service ACS link they are recommending to use the Repo Init Scripts.

 

 

kishorekumar14_0-1632794905239.png

 

 

https://adobe-consulting-services.github.io/acs-aem-commons/features/ensure-service-users/index.html 

Avatar

Community Advisor

Hi @AEMWizard 

 

You can create an OSGi configuration with RepositoryInitializer and it will create appropriate system/service user on any of your AEM instance. This works on both AEM 6.5 and Cloud version as well.

 

To create an OSGi service please follow the below steps:

Create an OSGi service with name like below-

 

/apps/my-app/config.author/org.apache.sling.jcr.repoinit.RepositoryInitializer-author.config

 

Place the script which should contain the service user name along with ACL details.

 

scripts=["
create service user my-data-reader-service

set ACL on /var/my-data
allow jcr:read for my-data-reader-service
end

create path (sling:Folder) /conf/my-app/settings
"]

 

That's it and you are all set!

 

https://experienceleague.adobe.com/docs/experience-manager-cloud-service/implementing/developing/aem...

 

Thanks!

 

Avatar

Employee Advisor

Hi @AEMWizard ,

To create system user please go through the below blogs


AEM - Cloud as a service and AEM 6.5

https://bimmisoi.blogspot.com/2021/08/create-system-user-using-repository.html


AEM - Adobe Managed Services

 

https://bimmisoi.blogspot.com/2020/08/create-system-user-using-runmode-with.html

 

Hope this helps!!!

Thanks