In a distributed system, the OAuth component is normally provided together with the WebUI. Alternatively, it is also possible to provide the component directly on the API server.
To install the OAuth component at a later stage, please configure the following settings:
Path
- Default path:
- /etc/dracoon/oauth.properties
- Java property for overwriting the default path:
- dracoon.oauth.config.file:
- Start Tomcat with Java Opt -Ddracoon.oauth.config.file="/path/to/config/file"
- dracoon.oauth.config.file:
File
## OAuth settings
###############################################################################################################
! OAuth session encryption key.
! To generate a random key you can use 'cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1' on bash console for example.
oauth_session_encryption_key=******
! OAuth connection authentication token.
! To generate a random key you can use 'cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1' on bash console for example.
! Same value as in api.properties
oauth_connection_authentication_token=******
! OAuth connection encryption key.
! To generate a random key you can use 'cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1' on bash console for example.
! Same value as in api.properties
oauth_connection_encryption_key=******
! Api path
sds_api_path=/api/v4
! Protocol switch for oauth connection to api [http,https].
client_protocol=https
All the keys/tokens should be randomly generated in this case. If the OAuth component is being used on multiple systems, the same keys/tokens should be set on all the servers.
The file oauth.war can then be copied to the folder /usr/share/tomcat/webapps/.
In addition, the following entries must be set in the API properties. The key and token from the config of the OAuth component must be applied:
Path
- Default path:
- /etc/dracoon/api.properties
- Java property for overwriting the default path:
- dracoon.api.config.file:
- Start Tomcat with Java Opt -Ddracoon.api.config.file="/path/to/config/file"
- dracoon.api.config.file:
File
api.properties
## OAuth settings
###############################################################################################################
! OAuth connection authentication token. Only needed when oauth.war is deployed.
! Same value as in oauth.properties
oauth_connection_authentication_token=******
! OAuth connection encryption key. Only needed when oauth.war is deployed.
! Same value as in oauth.properties
oauth_connection_encryption_key=******
The Tomcat of the API must then be restarted.
Please note that the OAuth component communicates with the API through port 443/tcp.
Comments
0 comments
Article is closed for comments.