Set up roles and permissions using the Deploy CLI
This topic describes the default permission settings in Deploy after installation. Initially, no permissions are granted to any user, except for administrator users, who have all permissions.
Deploy has one predefined administrator user called admin
, with the default password admin
. For more information, see roles and permissions.
Set up roles and permissions in Deploy
To change password strength requirements please refer to Password strength requirements.
Step 1 - Change the admin
user's password
To change the admin
user's password:
- Use the Deploy command-line interface (CLI) to Update User details:
adminUser = security.readUser('admin')
adminUser.password = 'newPassword_1'
security.modifyUser(adminUser)
For more information, see getting started with the Deploy command-line interface (CLI)
Note: Only users with admin rights can change the password using this method.
- Change the password in the
XL_DEPLOY_SERVER_HOME/conf/deployit.conf
configuration file:
admin.password=newPassword_1
- Restart the Deploy server.
Note: The password in deployit.conf
file is encrypted when the server starts for the first time.
Step 2 - Create new users
To create new Deploy users, execute the following commands in the CLI:
security.createUser('john', 'Secret01')
security.createUser('alice', 'Secret02', 'Alice Smith', 'alice.smith@example.com')
security.createUser('alice', 'Secret02', 'Alice Smith', 'alice.smith@example.com')
When you execute security.createUser('john', 'Secret01'), it creates a new user with the username john and the password Secret01. Similarly, executing security.createUser('alice', 'Secret02', 'Alice Smith', 'alice.smith@example.com') creates a user with the username alice, the password Secret02, the full name Alice Smith, and the email address alice.smith@example.com.
To delete a user, execute:
security.deleteUser('john')
Important: Deploy will only create users in its own repository, even if it is configured to use an LDAP repository for authentication and authorization. You must use an LDAP administration tool to create users in, for example, an LDAP credentials store.
Deploy supports the concept of groups when using LDAP as the credentials store. All groups defined in LDAP can be assigned to roles in Deploy. Users that are part of these groups will be assigned the role permissions when they use the system.