Configuration¶
Two configuration files are required:
motley_cue.conf
: contains configuration options relating to authorisation.feudal_adapter.conf
: contains configuration options relating to the account creation.
Configuration templates¶
Example config files explaining the options are included with motley_cue
. If you installed it via package manager, they will be located at /etc/motley_cue
.
Warning
The default configuration might work well in most cases, but you have to configure the authorisation to enable any user to use your service.
Config files search paths¶
The config files will be searched in several places. Once one is found no further config files will be considered.
motley_cue.conf
path configured via the environment variable
MOTLEY_CUE_CONFIG
./motley_cue.conf
$HOME/.config/motley_cue/motley_cue.conf
/etc/motley_cue/motley_cue.conf
feudal_adapter.conf (according to the feudalAdapter documentation)
path configured via the environment variable
FEUDAL_ADAPTER_CONFIG
./feudal_adapter.conf
$HOME/.config/feudal_adapter.conf
$HOME/.config/feudal/feudal_adapter.conf
/etc/feudal/feudal_adapter.conf
Account creation configuration¶
This is handled by the feudal adapter in feudal_adapter.conf
(see the documentation for details).
Pay close attention to the following configurations:
backend: how are the users managed locally (e.g. local UNIX accounts, LDAP, …)
assurance: specifying minimum acceptable assurance (according to the REFEDS Assurance Framework)
username generator: how local usernames are generated for users (e.g. trying to honour incoming
preferred username
from the OP, or using pooled accounts with a custom prefix)
An approval workflow is supported as well, where local admins can approve or reject account creation requests. The notification system supported so far is email.
Additional configurations¶
One-time tokens
To enable SSH support for large access tokens (longer than 1k), you can enable the use of one-time tokens in the [mapper.otp]
section in motley_cue.conf
.
Calling the /user/generate_otp
endpoint will generate a shorter, one-time token and store it in a local, encrypted database. This token can then be used as an SSH password instead of the access token, and the /verify_user
will be able to verify the username with this one-time token by retrieving the corresponding access token from the database.
You can also configure the location of the token database, the backend used, as well as the location of the encryption key.
############
[mapper.otp]
############
## use one-time passwords (OTP) instead of tokens as ssh password -- default: False
## this can be used when access tokens are too long to be used as passwords (>1k)
use_otp = True
##
## backend for storing the OTP-AT mapping -- default: sqlite
## supported backends: sqlite, sqlitedict
# backend = sqlite
##
## location for storing token database -- default: /run/motley_cue/tokenmap.db
# db_location = /run/motley_cue/tokenmap.db
## path to file containing key for encrypting token db -- default: /run/motley_cue/motley_cue.key
## key must be a URL-safe base64-encoded 32-byte key, and it will be created if it doesn't exist
# keyfile = /run/motley_cue/motley_cue.key
Swagger docs
By default, the Swagger documentation for the REST API is disabled. You can enable it in motley_cue.conf
, and change its location:
## enable swagger documentation -- default: False
enable_docs = True
## location of swagger docs -- default: /docs
docs_url = /api/v1/docs
If motley_cue
is running on localhost
, these settings will enable the interactive Swagger docs at http://localhost:8080/api/v1/docs:
Privacy policy¶
We provide a default privacy statement that you can use when running motley-cue.
When installing from Linux packages, the privacy statement is installed in:
/etc/motley_cue/privacystatement.md
To run the service, you must configure the service contact information in the [privacy]
section of motley_cue.conf
:
#########
[privacy]
#########
## configuration related to privacy policy
##
## contact information for service operator to be included in privacy policy -- default: None
## this is an email address and MUST be filled in
# privacy_contact = None
##
## privacy policy location (markdown file) -- default: /etc/motley_cue/privacystatement.md
# privacy_file = /etc/motley_cue/privacystatement.md
You can also modify the privacy statement to fit your organisation’s needs by editing the markdown file directly.
The privacy statement can be retrieved using the REST API from the the /privacy
endpoint.