CLI Tool - Authentication methods

Currently, there are two authentication methods for the CLI Tool:

  1. Using the existing LDAP credentials
  2. Creating a dedicated internal user


Using the LDAP credentials

To use your LDAP login credentials, make sure that the LDAP users have at least the Technical role assigned via LDAP Roles Settings. The next step is to set your LDAP login credentials in the environment variables.

The process is explained through the example: FreeIPA demo instance: https://www.freeipa.org/page/Demo.

CodeScene LDAP config
---
LDAP host: ipa.demo1.freeipa.org
LDAP port: 636
LDAP bind DN format: uid={username},cn=users,cn=accounts,dc=demo1,dc=freeipa,dc=org
LDAP search base:
dc=demo1,dc=freeipa,dc=org

then you can use the employee OR manager password for all users: Secret123

export CS_ONPREM_API_URL=http://localhost:3003/api/v2
export CS_USERNAME=employee
export CS_PASSWORD=Secret123

Note: The LDAP-based approach might make CLI slower, notably the delta command if the LDAP/AD lookup takes a bit longer.

 

Creating a dedicated internal user

To create a dedicated CodeScene user with a Technical role for each person using the CLI, the administrator has to do the following:

  1. Go to Global Configuration.
  2. Click on the Users/Authentication tab.
  3. Scroll down to the Add New User section.
  4. Choose a username and password and click on the Add User button.
  5. Under the All Users section, select a Technical role for the newly created user:


The last step is that a newly created user with a Technical role sets the environment variables as documented here.