Skip to content
Snippets Groups Projects
Unverified Commit 9b24feb1 authored by Daniel's avatar Daniel
Browse files

DOC: Small changes,

parent 943593f6
Branches
Tags
No related merge requests found
# OneTimeAuthenticationToken Config # OneTimeAuthenticationToken Config
# #
# One-Time Authentication (OTA) Tokens are a means to authenticate a client without a # One-Time Authentication (OTA) Tokens are a means to authenticate a client
# password. # without a password.
# #
# This example config file illustrates several use cases of One-Time # This example config file illustrates several use cases of One-Time
# Authentication Tokens. # Authentication Tokens.
...@@ -13,12 +13,12 @@ ...@@ -13,12 +13,12 @@
# #
# - expiresAfter:: An integer timespan in milliseconds after the OTA Token was # - expiresAfter:: An integer timespan in milliseconds after the OTA Token was
# generated by the server when the token expires. So the token will not be # generated by the server when the token expires. So the token will not be
# valid after <date> + <expiresAfter>. # valid after <creationDate> + <expiresAfter>.
# - expiresAfterSeconds:: A convenient option which has the same meaning as # - expiresAfterSeconds:: A convenient option which has the same meaning as
# expiresAfter but with seconds instead of milliseconds. # expiresAfter but measured in seconds instead of milliseconds.
# - roles:: A list of strings which are the user roles that the client has when # - roles:: A list of strings which are the user roles that the client has when
# it authenticates with this token. This is a way to give a client a set of # it authenticates with this token. This is a way to give a client a set of
# roles which it wouldn't have otherwise. Subsequently, the client also has # roles which it wouldn't have otherwise. Consequently, the client also has
# all permissions of its roles. # all permissions of its roles.
# - permissions:: A list of string which are the permissions that the client has # - permissions:: A list of string which are the permissions that the client has
# when it authenticates with this token. This is another way to give a # when it authenticates with this token. This is another way to give a
...@@ -32,44 +32,47 @@ ...@@ -32,44 +32,47 @@
# number of times that a server accepts an OTA token as valid. The default # number of times that a server accepts an OTA token as valid. The default
# is, of course, 1. # is, of course, 1.
# - replayTimeout:: An integer timespan in milliseconds. Because replays are a # - replayTimeout:: An integer timespan in milliseconds. Because replays are a
# possible attack vector, the time frame in which the same token might be is # possible attack vector, the time span in which the same token may be used
# limitted by this value. The default value is configured by the server # is limited by this value. The default value is configured by the server
# property 'ONE_TIME_TOKEN_REPLAYS_TIMEOUT_MS' which has a default of 30000, # property 'ONE_TIME_TOKEN_REPLAYS_TIMEOUT_MS' which has a default of 30000,
# which is 30 seconds. # which is 30 seconds.
# - replayTimeoutSeconds:: A convenient option which has the same meaning as # - replayTimeoutSeconds:: A convenient option which has the same meaning as
# replayTimeout but with seconds instead of milliseconds. # replayTimeout but measured in seconds instead of milliseconds.
# - output:: Defines how the OTA token is outputted by the server. If this # - output:: Defines how the OTA token is output by the server. If this property
# property is not present the OTA is not outputted in any way but only used # is not present the OTA is not output in any way but only used internally
# internally (see purpose). The 'output' object has the following properties: # (see purpose). The 'output' object has the following properties:
# - file:: An absolute or relative path in the servers file system. This # - file:: An absolute or relative path in the server's file system. This
# property means that the OTA is written to that file on server start. # property means that the OTA is written to that file on server start.
# - schedule:: A cron-tab compliant string indicating when the OTA is # - schedule:: A string formatted according to the Quartz[1] library
# renewed and the file is being overridden with the new OTA. # indicating when the OTA is renewed and the file is being overridden
# with the new OTA.
# - purpose:: A string which is used (only internally so far) to generate an OTA # - purpose:: A string which is used (only internally so far) to generate an OTA
# for a special purpose, e.g. the execution of a server-side script with # for a special purpose, e.g. the execution of a server-side script with
# particular permissions. This way, an otherwise unprivileged client might # particular permissions. This way, an otherwise unprivileged client may
# execute a server-side script with all necessary permissions, if only the # execute a server-side script with all necessary permissions, if the client
# client has the "SCRIPTING:EXECUTE:<script-path>" permission and this # has the "SCRIPTING:EXECUTE:<script-path>" permission and this config file
# config file has a configuration with # has a configuration with "purpose: SCRIPTING:EXECUTE:<script-path>"
# "purpose: SCRIPTING:EXECUTE:<script-path>" (case-sensitive). # (case-sensitive).
#
# [1] http://www.quartz-scheduler.org/api/2.3.0/org/quartz/CronExpression.html
# #
# #
# Examples: # Examples:
# #
# 1. Every client with the SCRIPTING:EXECUTE:administration/diagnostics.py # 1. Every client with the SCRIPTING:EXECUTE:administration/diagnostics.py
# permission can execute the administration/diagnostics.py script with the # permission can execute the administration/diagnostics.py script with the
# administration role. # administration role (and not the client's roles).
- purpose: SCRIPTING:EXECUTE:administration/diagnostics.py - purpose: SCRIPTING:EXECUTE:administration/diagnostics.py
roles: roles:
- administration - administration
# 2. The server writes an OTA token with the administration role to # 2. The server writes an OTA token with the administration role to
# "authtoken/admin_token.txt" and refreshes that token every 10 seconds. # "authtoken/admin_token_crud.txt" and refreshes that token every 10 seconds.
- roles: - roles:
- administration - administration
output: output:
file: "authtoken/admin_token.txt" file: "authtoken/admin_token_crud.txt"
schedule: "0/10 * * ? * * *" schedule: "0/10 * * ? * * *"
# 3. The server writes an OTA token with the administration role to # 3. The server writes an OTA token with the administration role to
# "authtoken/admin_token_3_attempts.txt" which can be replayed 3 times in 10 # "authtoken/admin_token_3_attempts.txt" which can be replayed 3 times in 10
# seconds. The OTA token is refreshed every 10 seconds. # seconds. The OTA token is refreshed every 10 seconds.
...@@ -80,21 +83,12 @@ ...@@ -80,21 +83,12 @@
schedule: "0/10 * * ? * * *" schedule: "0/10 * * ? * * *"
maxReplays: 3 maxReplays: 3
replayTimeout: 10000 replayTimeout: 10000
# 4. The server writes an OTA token with the administration role to # 4. The server writes an OTA token with the administration role to
# "authtoken/admin_token_expired.txt" which expires immediately. Of course # "authtoken/admin_token_expired.txt" which expires immediately. Of course
# this is onyl useful for testing. # this is only useful for testing.
- roles: - roles:
- administration - administration
output: output:
file: "authtoken/admin_token_expired.txt" file: "authtoken/admin_token_expired.txt"
expiresAfterSeconds: 0 expiresAfterSeconds: 0
# 5. The server writes an OTA token with the administration role to
# "authtoken/admin_token_crud.txt" and refreshes that token every 10 seconds.
- roles:
- administration
output:
file: "authtoken/admin_token_crud.txt"
schedule: "0/10 * * ? * * *"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment