I have a little A12 application that I would like to share with other mgm’ies. Since we can use [LDAP as a user repo]<INTERNAL_LINK>, can I configure my app so that all mgm’ies can log in?
Hi @till-atomic-slope ,
If A12 Services is used for Authentication and Authorisation, you can add the follow configurations in your application.properties
mgm.services.rest.security.authentication.type=ACTIVE_DIRECTORY_LDAP
mgm.services.rest.security.authentication.ldap.domain=mgm
mgm.services.rest.security.authentication.ldap.url=ldap://<INTERNAL_LINK>
mgm.services.rest.security.authentication.ldap.rootDn=DC=mgm-edv,DC=de
mgm.services.rest.security.authentication.ldap.searchFilter=(&(objectClass=user)(sAMAccountName={1}))
After that, an xml of user shall be existed (either by persisting at startup or creating in the app) in the database with corresponding roles to access to the application.
If you want to persist user at start-up, here is example of an xml file
<?xml version="1.0" encoding="UTF-8"?>
<DomainUser id="1">
<SystemProperties>
<login>[login name at mgm]</login>
<firstname>Hello</firstname>
<lastname>world</lastname>
<email>[email]</email>
<lastLoginAt>2019-08-23T08:28:41.838Z</lastLoginAt>
<failedLoginAt />
<failedLoginAttempts>0</failedLoginAttempts>
<passwordChangedAt>2019-08-23T08:28:41.838Z</passwordChangedAt>
<restorePasswordToken />
<passwordTokenCreatedAt />
<createdAt>2019-08-23T08:28:41.838Z</createdAt>
<roles>
<roleIdent>[choose the role you want]</roleIdent>
</roles>
<active>true</active>
<enforcePasswordChange>false</enforcePasswordChange>
<existing>true</existing>
<documentId/>
</SystemProperties>
<CustomProperties />
</DomainUser>
Then put the xml file somewhere in your project follow the way how to config it here [A12 Services Documentation]<INTERNAL_LINK> in Models and Document upload on server start-up section.