Administrate the System Configuration¶
The configuration of PLOSSYS 5 is kept in the Consul key value store and can be administrated by PLOSSYS CLI.
Requirements¶
For the requirements for using PLOSSYS CLI, refer to PLOSSYS CLI.
Options¶
Secured Consul Key Value Store¶
If the Consul key value store has been secured by a token (CONSUL_TOKEN), specify the --token <consul_token>
option. By default, no token is used.
plossys config <command> --token <consul_token>
Example - export the configuration from a secured Consul key value store
plossys config export <filename>.yml --token <consul_token>
Self-Signed Certificates¶
Specifying the --insecure
option, you avoid that the certificate will be checked by the client.
plossys config <command> --insecure
Commands¶
Import the Configuration into a Running System¶
plossys config import <filename>.yml
Delete the Consul Key Value Store and Import the Configuration¶
plossys config import <filename>.yml --purge
Update the Configuration in a Running System Without Overwriting the Existent Settings¶
plossys config update <filename>.yml
Export the Configuration to a File¶
plossys config export <filename>.yml
Set a Key to a Value for All Services¶
plossys config set <key> <value>
Hint - global section
The key is specified in the global section any
for all services. An already existent service-specific setting of the same key is not overwritten.
Example - set LOG_LEVEL
for all services
plossys config set LOG_LEVEL error
Set a Key to a Value for a Specific Service¶
plossys config set <key> <value> --service <service_name>
Hint - service name
With --service
, specify the service name as used in the configuration, that means without the seal-
prefix.
Example - set LOG_LEVEL
for the seal-rest
service
plossys config set LOG_LEVEL error --service rest
Get the Value of a Key Specified for All Services¶
plossys config get <key>
Get the Key of a Key Specified for a Specific Service¶
plossys config get <key> --service <service_name>
Example - get LOG_LEVEL for the seal-plossysadmin
service
plossys config get LOG_LEVEL --service plossysadmin
Special Case ALLOWED_OIDC_CLIENTS
¶
Set or Get the Value of ALLOWED_OIDC_CLIENTS
¶
Setting and getting the ALLOWED_OIDC_CLIENTS
key is a special case of the set and get commands described above. Here, you do not have to specify the service due to this is set to the seal-rest
service automatically.
Due to that the value of ALLOWED_OIDC_CLIENTS
is a complex JSON object, reading it to or from a file makes sense. Additionally, the value of ALLOWED_OIDC_CLIENTS
is checked for JSON conformity.
plossys config set ALLOWED_OIDC_CLIENTS --file <filename>.json
Generate the Template for ALLOWED_OIDC_CLIENTS
¶
The value of ALLOWED_OIDC_CLIENTS
has to accord to a specific JSON object. For this, a template can be generated which then only has to be filled out.
plossys config template ALLOWED_OIDC_CLIENTS --file <filename>.json
Example - template for ALLOWED_OIDC_CLIENTS
with the superadmin
and admin
example roles
{
"seal-plossysadmin": {
"roles": {
"superadmin": {
"areas": {
"jobs": {
"set-a": {
"views": [
{
"struct": "current.printerName",
"operator": "eq",
"value": "printer"
}
],
"permissions": [
"tempfiles",
"move",
"pause",
"cancel",
"repeat",
"resume",
"delete"
]
},
"set-b": {
"views": [
{
"struct": "current.printerName",
"operator": "eq",
"value": "printer2"
}
],
"permissions": [
"ALL"
]
},
"set-c": {
"views": [
"ALL"
],
"permissions": []
}
},
"printers": {
"set-a": {
"views": [
{
"struct": "config.server",
"operator": "eq",
"value": "spooler1"
}
],
"permissions": [
"add",
"update",
"pause",
"redirect",
"resume",
"createTestJob",
"delete"
]
},
"set-b": {
"views": [
{
"struct": "connection",
"operator": "eq",
"value": "socket://valid:1234"
}
],
"permissions": [
"add"
]
},
"set-c": {
"views": [
{
"struct": "config.printer",
"operator": "eq",
"value": "printer2"
},
{
"struct": "config.printer",
"operator": "eq",
"value": "printer3"
}
],
"permissions": [
"ALL"
]
}
}
}
},
"admin": {
"areas": {
"printers": {
"set-a": {
"views": [
"ALL"
],
"permissions": [
"resume",
"pause"
]
}
}
}
}
}
}
}
Special Case HTPASSWD
¶
Set or Get the Value of HTPASSWD
¶
Setting and getting the HTPASSWD
key is a special case of the set and get commands described above. Here, you do not have to specify the service due to this is set to the seal-rest
service automatically.
Due to that the value of HTPASSWD
has to accord to the format of the Apache htpasswd file, reading it to or from a file makes sense. Additionally, the value of HTPASSWD
is checked for htpasswd conformity.
plossys config set HTPASSWD --file <filename>
Generate the Template for HTPASSWD
¶
The value of HTPASSWD
has to accord to the format of the Apache htpasswd file. For this, a template can be generated which then only has to be filled out.
plossys config template HTPASSWD --file <filename>
Example - template for HTPASSWD
user1:password1
user2:password2