Authentication with Catena
CATENA authentication uses a pre-defined list of username and password combinations. It's a good fit for secure development, QA or administration with small teams, or as a fallback for administration when a 3rd-party platform is unavailable.
Configuration
To use the CATENA provider with the Catena authentication service, make sure it is enabled in the configuration and PlainPasswordFile points to a file containing a list of username and password combinations.
{
"Catena": {
"Authentication": {
"PROVIDER_CATENA": {
"PlainPasswordFile": "/path/to/a/password/file",
"IsEnabled": true
}
}
}
}The plain password file should contain one username and password combination per line, ex:
admin:secure
studio:changemeWhen using a container or deploying Catena, make sure your password file is available but is still secure. It should not be checked into version control (git). For a docker container, the password file can be mounted into the container with a bind mount.
Usage
To authenticate with the Catena login, specify PROVIDER_CATENA in your authentication request and provide a username and password separated by a colon as the payload, for example: username:password.
Note: A successful authentication request will return an empty response body. The catena-session-id response header is what we're looking for here.
Code Sample
- Localhost http://localhost:5000/api/v1/authentication/login
- Custom Domain https://your_domain_here/api/v1/authentication/login
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
http://localhost:5000/api/v1/authentication/login \
-H 'Content-Type: application/json' \
-d '{
"provider": "PROVIDER_CATENA",
"payload": "username:password"
}'{ "redirectUri": "string" }