Sessioning | Legacy REST Web Services
TODO: replace the old type of sessionId for the new one
The sessioning interface provides methods to create, read and delete live sessions.
Read and delete methods manipulate live sessions based on the DirX Access server subject identifier (sessionId) of the live session.
The same behavior is also used for authorization decisions.
OpenApi Specification
GET {legacy_rest_web_application_location}/sessioning/1_0_0/openapi.json
Properties
The following table shows the Session entity properties:
| Property | Type | Read / Write | Description |
|---|---|---|---|
|
|
RW |
The server subject identifier of the session. The identifier should be empty when the new session is created (HTTP method POST). |
|
|
RW |
The identifier of the existing WebPep configuration. |
|
|
RW |
The identifier of the existing Authentication method configuration (only Password, X.509 and Trusted method types are supported). |
|
|
RW |
The login name of the authenticated user. |
|
|
RW |
The password of the user to authenticate (valid only for the Password method type). |
|
|
RW |
The X.509 certificate of the user to authenticate (valid only for the X.509 method type). |
Reading {property_name} property of existing live session addressed by the {session_id}
Request
GET {legacy_rest_web_application_location}/sessioning/1_0_0/Sessions('{session_id}')/{property_name}
Response
{
"@odata.context": "{legacy_rest_web_application_location}/sessioning/1_0_0/$metadata#Sessions('{session_id}')/{property_name}",
"value": "{user_login_name}"
}
Result
{
"@odata.context": "{legacy_rest_web_application_location}/sessioning/1_0_0/$metadata#Sessions/$entity",
"sessionId": "{session_id}",
"webPepId": "{pep_id}",
"authnMethodId": "{authn_method_id}",
"loginName": "{user_login_name}",
"password": "{user_password}",
"X509Certificate": ""
}
X.509 Authentication
Request
POST {legacy_rest_web_application_location}/sessioning/1_0_0/Sessions
{"sessionId": "", "webPepId": "{pep_id}", "authnMethodId": "{authn_method_id}", "loginName": "{user_login_name}", "X509Certificate": "{user_certificate}"}
Result
{
"@odata.context": "{legacy_rest_web_application_location}/sessioning/1_0_0/$metadata#Sessions/$entity",
"sessionId": "{session_id}",
"webPepId": "{pep_id}",
"authnMethodId": "{authn_method_id}",
"loginName": "{user_login_name}",
"password": "",
"X509Certificate": "{user_certificate}"
}
Remove Live Session addressed by {session_id}
DELETE {legacy_rest_web_application_location}/sessioning/1_0_0/Sessions('{session_id}')
Authorization Decision Operations
The authorization decision operation provides simple RBAC authorization decisions (true/false) for specific resources according RBAC policies.
Parameters and Return Type
The following table shows the Authorization decision parameters and return type:
| Parameter | Type | Read / Write | Description |
|---|---|---|---|
|
|
W |
The identifier of the session used for the request (returned by the Session entity). |
|
|
W |
The identifier of the existing WebPep configuration used for the authorization decision. |
|
|
W |
The URI of the request for the authorization decision. |
|
|
W |
The action of the request for the authorization decision. |
Return Value |
Type |
Read / Write |
Description |
|
R |
The authorization decision (true/false) in the form of the returned type. |
Examples
Addressing (HTTP Method POST)
/odata4/sessioning/1_0_0/AuthorizationDecision
Authorization XACML Decision Operation
The authorization XACML decision operation provides authorization decisions based on XACML requests.
Parameters and Return Type
The following table shows the Authorization XACML decision parameters and return type:
| Parameter | Type | Read / Write | Description |
|---|---|---|---|
|
|
W |
The identifier of the session used for the request (returned by the Session entity). |
|
|
W |
The identifier of the WebPep configuration item used for the authorization decision. |
|
|
W |
The XACML request in the XML string to be processed. (The request must be encoded) |
Return Value |
Type |
Read / Write |
Description |
|
R |
The XACML response in the XML string. |
Request Injection Operation
The request injection operation provides Request Injection Data from a session.
The operation is based on the definitions from a specific
webPepId.