|
DLI EPCR7 Object Model Reference
|
| object | auth/ |
| Object representing the authentication server configuration | |
Retrieving the value is denied if not administrative user
This object contains the following items:
| users | Users list |
| realm | Realm |
| cookie_timeout | Cookie timeout |
| notifications | Notifications |
Sample CLI read command:
uom get auth
⇒
...
Sample uom library write command:
uom.auth=<...>
| array | auth/users/ |
| List of user accounts | |
Retrieving the value is denied if not administrative user
Changing the value is denied if not administrative user
This array represents a value in persistent storage.
This array represents an unordered set (order of its elements doesn't matter, and each value should not be supplied more than once).
This array contains User account elements.
Sample uom library write command:
uom.auth.users={{is_allowed=true,name="admin",outlet_access={true,true,true,true,true,true,true,true},password="Hf(5\\W:}'P"},{is_allowed=true,name="tom",outlet_access={false,true,false,false,true,false,false,false},password="h`b}EhuCw"},{is_allowed=false,name="dick",outlet_access={true,false,false,true,false,true,false,false},password="a#\\I,q&c,"},{is_admin=false,is_allowed=true,name="harry",outlet_access={true,false,false,true,false,false,false,false},password="_J)X>41!8.a\"AD"}}
Sample uom library read command:
print(uom.dump(uom.auth.users))
⇒
| object | auth/users/N/ |
| User account configuration | |
Removing the object from its parent collection is denied if administrative user
This object contains the following items:
| name | Username |
| password | Password |
| is_allowed | User allowed |
| is_admin | Administrative user |
| outlet_access | Outlet access levels |
Sample JS request write command (note that _user_account_index is a variable):
request.put({url:"auth/users/"+_user_account_index.toString()+"/",body:{"password":",-*=&S^3m%!","is_admin":false,"name":"admin","is_allowed":true,"outlet_access":[true,true,true,true,true,true,true,true]}});
Sample uom library read command (note that _user_account_index is a variable):
print(uom.dump(uom.auth.users[_user_account_index]))
⇒
{is_admin=false,is_allowed=true,name="harry",outlet_access={true,false,true,false,true,true,true,false},password="<>[[Kowr[E"}
See also User account: Username
See also User account: Password
See also User account: User allowed
See also User account: Administrative user
See also User account: Outlet access levels
| string | auth/users/N/name/ |
| Username | |
The value is subject to the following constraints: all of the following is true:
Retrieving the value is denied if not administrative user
Changing the value is denied if not administrative user
This string represents a value in persistent storage.
Write operations must supply the current value of password if administrative user
Sample CLI write command (note that user_account_index is a variable):
uom set "auth/users/${user_account_index}/name" "\"admin\""
Sample requests read command (note that _user_account_index is a variable):
print(requests.get('http://192.168.0.100/restapi/auth/users/'+str(_user_account_index)+'/name/',auth=auth,headers=headers).json())
⇒
'admin'
| string | auth/users/N/password/ |
| Password | |
The value is subject to the following constraints: the value matches ^[ -~]*$
Retrieving the value is denied if any of the following is true:
Using the string as a field for indexing into the grandparent collection is denied
This string represents a value in persistent storage.
This string should be displayed in a secure manner.
Write operations must supply the current value of the value if administrative user
Sample JS request read command (note that _user_account_index is a variable):
request.get({url:"auth/users/"+_user_account_index.toString()+"/password/"},function(error,response,body) {console.log(body)});
⇒
"B%_`{jEGgMgyS^C"
Sample CLI read command (note that user_account_index is a variable):
uom get "auth/users/${user_account_index}/password"
⇒
") $:$J_n"
| sum (boolean) | auth/users/N/is_allowed/ |
| Flag indicating whether user is allowed or denied | |
Retrieving the value is denied if not administrative user
Changing the value is denied if not administrative user
This sum does not support direct modification if administrative user.
This sum represents a value in persistent storage.
This sum can assume the following values:
| constant true | Allowed | The user is allowed to log in | |
| constant false | Denied | The user is denied login | |
Sample requests read command (note that _user_account_index is a variable):
print(requests.get('http://192.168.0.100/restapi/auth/users/'+str(_user_account_index)+'/is_allowed/',auth=auth,headers=headers).json())
⇒
True
Sample requests write command (note that _user_account_index is a variable):
requests.put('http://192.168.0.100/restapi/auth/users/'+str(_user_account_index)+'/is_allowed/',auth=auth,headers=headers,json=True)
| sum (boolean) | auth/users/N/is_admin/ |
| Flag indicating whether the user is an administrator | |
Retrieving the value is denied if not administrative user
Changing the value is denied if not administrative user
This sum does not support direct modification.
This sum represents a value in persistent storage.
This sum can assume the following values:
| constant true | Administrator | The user is an administrator | |
| constant false | Regular user | The user is a regular user | |
Sample CLI read command (note that user_account_index is a variable):
uom get "auth/users/${user_account_index}/is_admin"
⇒
false
Sample uom library read command (note that _user_account_index is a variable):
print(uom.dump(uom.auth.users[_user_account_index].is_admin))
⇒
true
| array | auth/users/N/outlet_access/ |
| Access levels per outlet | |
The value is subject to the following constraints: length of the value is equal to length of outlets
Retrieving the value is denied if not administrative user
Changing the value is denied if not administrative user
This array is composite, i.e. is modified as a whole.
This array does not support direct modification if administrative user.
This array represents a value in persistent storage.
This array contains Outlet access elements.
Sample requests outlet access creation command (note that _user_account_index is a variable):
requests.post('http://192.168.0.100/restapi/auth/users/'+str(_user_account_index)+'/outlet_access/',auth=auth,headers=headers,json=True)
Sample CLI read command (note that user_account_index is a variable):
uom get "auth/users/${user_account_index}/outlet_access"
⇒
[false,false,true,false,false,false,true,true]
| sum (boolean) | auth/users/N/outlet_access/N/ |
| Access level for outlet by index | |
The value is subject to the following constraints: outlets[index of the value]
Retrieving the value is denied if not administrative user
Changing the value is denied if not administrative user
This sum is a part of a composite value which is modified as a whole.
This sum does not support direct modification if administrative user.
This sum represents a value in persistent storage.
This sum can assume the following values:
| constant true | Full | Outlet state can be manipulated by the user | |
| constant false | None | Outlet state cannot be neither seen nor manipulated by the user | |
Sample requests read command (note that _user_account_index and _outlet_access_index are variables):
print(requests.get('http://192.168.0.100/restapi/auth/users/'+str(_user_account_index)+'/outlet_access/'+str(_outlet_access_index)+'/',auth=auth,headers=headers).json())
⇒
True
Sample uom library deletion command (note that _user_account_index and _outlet_access_index are variables):
local composite=uom.copy(uom.auth.users[_user_account_index].outlet_access) uom.remove(composite,_outlet_access_index) uom.auth.users[_user_account_index].outlet_access=composite
| string | auth/realm/ |
| The realm to be announced in authentication responses | |
Retrieving the value is denied if not administrative user
Changing the value is denied if not administrative user
This string represents a value in persistent storage.
Sample requests write command:
requests.put('http://192.168.0.100/restapi/auth/realm/',auth=auth,headers=headers,json={})
Sample curl read command:
curl --digest -u admin:1234 -H "Accept: application/json" "http://192.168.0.100/restapi/auth/realm/"
⇒
[]
| number | auth/cookie_timeout/ |
| The amount of time for which a cookie is valid | |
The value represents time, the standard unit of which is the second (s).
The value is subject to the following constraints: the value is greater than 0
Changing the value is denied if not administrative user
This number represents a value in persistent storage.
Sample JS request write command:
request.put({url:"auth/cookie_timeout/",body:30000});
Sample uom library write command:
uom.auth.cookie_timeout=30000
| object | auth/notifications/ |
| Authentication-related notifications | |
Retrieving the value is denied if not administrative user
This object does not support direct modification.
This object contains the following items:
| parameter_kinds | Parameter kinds |
| events | Events |
Sample uom library read command:
print(uom.dump(uom.auth.notifications))
⇒
<...>
Sample requests read command:
print(requests.get('http://192.168.0.100/restapi/auth/notifications/',auth=auth,headers=headers).json())
⇒
<...>
See also Notifications: Parameter kinds
| map | auth/notifications/events/ |
| Event templates | |
Retrieving the value is denied if not administrative user
This map is composite, i.e. is modified as a whole.
This map does not support direct modification.
This map contains Event elements.
Creating elements in this collection is not supported.
Sample curl read command:
curl --digest -u admin:1234 -H "Accept: application/json" "http://192.168.0.100/restapi/auth/notifications/events/"
⇒
...
Sample uom library read command:
print(uom.dump(uom.auth.notifications.events))
⇒
<...>
See also Events: Event
| object | auth/notifications/parameter_kinds/ |
| Kinds of event parameters | |
This object does not correspond to an actual resource.
This object contains the following items:
| auth_login | Username |
| auth_ip | IP address |
| auth_method | Method |
| auth_reason | Reason |
| auth_allowed | Authentication allowed |
| user_state | User state |
| string | auth/notifications/parameter_kinds/auth_login/ |
| The name of the user | |
| string | auth/notifications/parameter_kinds/auth_ip/ |
| The IP address of the user | |
The value is subject to the following constraints: the value matches ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]).){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$
| string | auth/notifications/parameter_kinds/auth_method/ |
| The authentication method | |
| string | auth/notifications/parameter_kinds/auth_reason/ |
| The reason for authentication decision | |
| sum (boolean) | auth/notifications/parameter_kinds/auth_allowed/ |
| Authentication decision result | |
This sum can assume the following values:
| constant true | Allowed | The user is allowed to log in | |
| constant false | Denied | The user is denied to log in | |
| sum (variant) | auth/notifications/parameter_kinds/user_state/ |
| The state of the user | |
This sum can assume the following values:
| constant true | Existing | The user exists | |
| constant false | Deleted | The user has been deleted | |
| constant "new" | New | The user has been created | |
| object | auth/notifications/events/S/parameters/N/ |
| Properties of a parameter associated with the event | |
This object is a part of a composite value which is modified as a whole.
This object contains the following items:
| id | Identifier |
| has_fixed_value | Fixed value flag |
| fixed_value | Fixed value |
Sample curl read command (note that :event and :event_parameter_index are URL template arguments):
curl --digest -u admin:1234 -H "Accept: application/json" "http://192.168.0.100/restapi/auth/notifications/events/:event/parameters/:event_parameter_index/"
⇒
{"fixed_value":null,"has_fixed_value":false,"id":"auth_ip"}
Sample CLI write command (note that event and event_parameter_index are variables):
uom set "auth/notifications/events/${event}/parameters/${event_parameter_index}" "{\"fixed_value\":null,\"has_fixed_value\":false,\"id\":\"auth_method\"}"
| string | auth/notifications/events/S/parameters/N/id/ |
| Parameter identifier | |
The value is subject to the following constraints: parameter kinds[the value]
Retrieving the value is denied if not administrative user
This string is a part of a composite value which is modified as a whole.
This string does not support direct modification.
Sample uom library read command (note that _event and _event_parameter_index are variables):
print(uom.dump(uom.auth.notifications.events[_event].parameters[_event_parameter_index].id))
⇒
"user_state"
Sample JS request read command (note that _event and _event_parameter_index are variables):
request.get({url:"auth/notifications/events/"+_event+"/parameters/"+_event_parameter_index.toString()+"/id/"},function(error,response,body) {console.log(body)});
⇒
"auth_login"
| sum (boolean) | auth/notifications/events/S/parameters/N/has_fixed_value/ |
| Flag indicating that the parameter's value for this event is fixed | |
Retrieving the value is denied if not administrative user
This sum is a part of a composite value which is modified as a whole.
This sum does not support direct modification.
This sum can assume the following values:
| constant true | Fixed | The value is fixed | |
| constant false | Variable | The value is variable | |
Sample uom library read command (note that _event and _event_parameter_index are variables):
print(uom.dump(uom.auth.notifications.events[_event].parameters[_event_parameter_index].has_fixed_value))
⇒
false
Sample JS request read command (note that _event and _event_parameter_index are variables):
request.get({url:"auth/notifications/events/"+_event+"/parameters/"+_event_parameter_index.toString()+"/has_fixed_value/"},function(error,response,body) {console.log(body)});
⇒
true
| sum (variant) | auth/notifications/events/S/parameters/N/fixed_value/ |
| Fixed parameter value for this particular event | |
Retrieving the value is denied if not administrative user
This sum is a part of a composite value which is modified as a whole.
This sum does not support direct modification.
This sum can assume the following values:
| constant null | Null | Null | |
| constant true | True | True | |
| constant false | False | False | |
| string | String | This string | |
| number | Number | This number | |
Sample curl read command (note that :event and :event_parameter_index are URL template arguments):
curl --digest -u admin:1234 -H "Accept: application/json" "http://192.168.0.100/restapi/auth/notifications/events/:event/parameters/:event_parameter_index/fixed_value/"
⇒
null
Sample requests read command (note that _event and _event_parameter_index are variables):
print(requests.get('http://192.168.0.100/restapi/auth/notifications/events/'+_event+'/parameters/'+str(_event_parameter_index)+'/fixed_value/',auth=auth,headers=headers).json())
⇒
None
| object | auth/notifications/events/S/ |
| Event template | |
This object is a part of a composite value which is modified as a whole.
This object contains the following items:
| message_template | Message template |
| severity | Severity |
| parameters | Event parameters |
Sample requests write command (note that _event is a variable):
requests.put('http://192.168.0.100/restapi/auth/notifications/events/'+_event+'/',auth=auth,headers=headers,json={'severity': 7, 'message_template': [0, '@', 1, ' session closed'], 'parameters': [{'fixed_value': None, 'has_fixed_value': False, 'id': 'auth_login'}, {'fixed_value': None, 'has_fixed_value': False, 'id': 'auth_ip'}]})
Sample JS request write command (note that _event is a variable):
request.put({url:"auth/notifications/events/"+_event+"/",body:{"severity":6,"message_template":["modified user ",0],"parameters":[{"fixed_value":null,"has_fixed_value":false,"id":"auth_login"},{"fixed_value":true,"has_fixed_value":true,"id":"user_state"}]}});
| array | auth/notifications/events/S/message_template/ |
| Template for human-readable message generation | |
Retrieving the value is denied if not administrative user
This array is a part of a composite value which is modified as a whole.
This array does not support direct modification.
This array contains Message template element elements.
Creating elements in this collection is not supported.
Sample CLI read command (note that event is a variable):
uom get "auth/notifications/events/${event}/message_template"
⇒
["created user ",0]
Sample curl read command (note that :event is a URL template argument):
curl --digest -u admin:1234 -H "Accept: application/json" "http://192.168.0.100/restapi/auth/notifications/events/:event/message_template/"
⇒
["deleted user ",0]
| sum (variant) | auth/notifications/events/S/message_template/N/ |
| Element of human-readable message template | |
Retrieving the value is denied if not administrative user
This sum is a part of a composite value which is modified as a whole.
This sum does not support direct modification.
This sum can assume the following values:
| string | String | Fixed string | |
| number | Parameter | Index of message parameter to insert | event parameters[the value] |
Sample CLI read command (note that event and message_template_element_index are variables):
uom get "auth/notifications/events/${event}/message_template/${message_template_element_index}"
⇒
"protection violation attempt: "
Sample JS request read command (note that _event and _message_template_element_index are variables):
request.get({url:"auth/notifications/events/"+_event+"/message_template/"+_message_template_element_index.toString()+"/"},function(error,response,body) {console.log(body)});
⇒
2
| sum (enumerated number) | auth/notifications/events/S/severity/ |
| Severity rating assigned to the event | |
Retrieving the value is denied if not administrative user
This sum is a part of a composite value which is modified as a whole.
This sum does not support direct modification.
This sum can assume the following values:
| constant 1 | Emergency | Treat the event as an emergency | |
| constant 2 | Alert | Treat the event as an alert | |
| constant 3 | Critical | Treat the event as critical | |
| constant 4 | Error | Treat the event as an error | |
| constant 5 | Warning | Treat the event as a warning | |
| constant 6 | Notice | Treat the event as a notice | |
| constant 7 | Informational | Treat the event as informational | |
| constant 8 | Debug | Treat the event as debugging-related | |
Sample uom library read command (note that _event is a variable):
print(uom.dump(uom.auth.notifications.events[_event].severity))
⇒
6
Sample curl read command (note that :event is a URL template argument):
curl --digest -u admin:1234 -H "Accept: application/json" "http://192.168.0.100/restapi/auth/notifications/events/:event/severity/"
⇒
7
| array | auth/notifications/events/S/parameters/ |
| Additional data associated with the event | |
Retrieving the value is denied if not administrative user
This array is a part of a composite value which is modified as a whole.
This array does not support direct modification.
This array contains Event parameter elements.
Creating elements in this collection is not supported.
Sample uom library read command (note that _event is a variable):
print(uom.dump(uom.auth.notifications.events[_event].parameters))
⇒
{{fixed_value=null,has_fixed_value=false,id="auth_login"},{fixed_value=null,has_fixed_value=false,id="auth_ip"}}
Sample JS request read command (note that _event is a variable):
request.get({url:"auth/notifications/events/"+_event+"/parameters/"},function(error,response,body) {console.log(body)});
⇒
[{"fixed_value":null,"has_fixed_value":false,"id":"auth_login"},{"fixed_value":false,"has_fixed_value":true,"id":"user_state"}]
See also Event parameters: Event parameter