How to manage users for Content Software for File using the CLI.
User login process overview
In the Content Software for File user login process (sign-in), the following steps outline the authentication and user management:
- Local user login
- When users log in, the system initially searches for them within the list of local users (internal users), specifically those created using the command.
- LDAP integration
- In cases where a user isn't internally registered but exists in an LDAP directory, there's an option to integrate the LDAP user directory with the Content Software for File system. This integration allows the system to search for the user in the directory and perform password verification.
- Login events
- Successful logins trigger a event, providing essential details such as the username, role, and user type (internal or LDAP). On the other hand, unsuccessful logins prompt an "Invalid username or password" message and trigger a event containing the username and the reason for the failure.
- GUI login
- The GUI login process requires users to input their username and password. Users can leverage the WEKA_USERNAME and WEKA_PASSWORD environment variables to pass this information to the CLI.
- CLI login
- Users can log in with a specific identity using the command for CLI access. This establishes the user context for each subsequent CLI command. Upon logging in, a token file is generated for authentication, with the default path set to ~/.weka/auth-token.json (adjustable using the attribute). You can use the Content Software for File user whoami command to check the currently logged-in CLI user.
- Persistence and defaults
- The persistence of the Content Software for File user login command applies only to the server where it is set. If and WEKA_PASSWORD environment variables are unspecified, the CLI defaults to the token file. In cases where no CLI user is explicitly logged in, and no token file is present, the CLI resorts to the default 'admin/admin' credentials.
- Customtoken file path
- Users who prefer a non-default path for the token file can use the WEKA_TOKEN environment variable.