UAG - Secret Checkout and Checkin¶
Data Structures¶
Checkout Object Specification
Attribute |
Type |
Required |
Description |
|---|---|---|---|
|
string |
yes |
Account of which secret is retrieved. |
|
string |
When checkout session is ongoing, it can be reused. |
|
|
string |
Reason to checkout secret. Required when login_reason is set in the safe. |
|
|
boolean; default value |
Overrides exclusive checkout limit if configured. |
Retrieve Available Attributes of the CheckoutModel¶
Request
Method |
|
Path |
|
GET /api/v2/objspec/checkout
Example Request
curl -s -k -X GET \
-H 'Authorization: sgfeea6jsaz4mum9su8w6' \
'https://10.0.214.98/api/v2/objspec/checkout'
Checkin Object Specification
Attribute |
Type |
Required |
Description |
|---|---|---|---|
|
string |
yes |
Checkout session ID to stop. |
Retrieve Available Attributes of the CheckinModel¶
Request
Method |
|
Path |
|
GET /api/v2/objspec/checkin
Example Request
curl -s -k -X GET \
-H 'Authorization: sgfeea6jsaz4mum9su8w6' \
'https://10.0.214.98/api/v2/objspec/checkin'
Checkout Secret¶
Request
Method |
|
Path |
|
Headers |
|
Body |
|
POST /api/v2/secret/checkout
Example Request
curl -s -k -X POST \
-H 'Authorization: sgfeea6jsaz4mum9su8w6' \
-H 'Content-Type: application/json' \
https://10.0.0.1/api/v2/secret/checkout \
-d '{"account_id": "8169529724050079750", "reason": "emergency","force":false}'
Note
The
reasonfield is optional and depends on the safe configuration. If not required, you can pass"reason": null.The
forceflag allows you to override exclusive checkout restrictions. If set tofalseand the password is already checked out, the system will wait until it is returned. To bypass this, setforcetotrue.
Response
{
"status": "approved",
"session_id": "8169529724050079755",
"timeout": null,
"confirmation_timeout": null,
"reason": null,
"pwd": "password",
"login": "Administrator",
"domain": null,
"result": "success"
}
Note
In the following response, the password was revealed as
"pwd": "password"and checkout session ID as"session_id": "8169529724050079755".If there is a Password checkout time limit set for this specific account, the timeout will present the time (in seconds) after which the password is returned automatically (e.g.,
"timeout": 1800).If the Require approval option is enabled in the safe configuration, the
confirmation_timeoutspecifies the timeframe (in minutes) within which authorized users can approve or reject the access request.
Repeat Checkout in the Same Session¶
Note
This scenario is used if the Require approval option is enabled in the safe configuration. After the administrator approves the access request, the request must be sent once more with the session_id number included to reveal the password.
Example Request
curl -s -k -X POST \
-H 'Authorization: sgfeea6jsaz4mum9su8w6' \
-H 'Content-Type: application/json' \
https://10.0.0.1/api/v2/secret/checkout \
-d '{"account_id": "8169529724050079750", "reason": "emergency","force":false,"session_id": "8169529724050079755"}'
Response
{
"status": "approved",
"session_id": "8169529724050079755",
"timeout": null,
"confirmation_timeout": null,
"reason": null,
"pwd": "password",
"login": "Administrator",
"domain": null,
"result": "success"
}
Checkin Secret¶
To checkin the secret use sesion_id obtained in the checkout response.
Request
Method |
|
Path |
|
Headers |
|
Body |
|
POST /api/v2/secret/checkin
Example Request
curl -s -k -X POST \
-H 'Authorization: sgfeea6jsaz4mum9su8w6' \
-H 'Content-Type: application/json' \
https://10.0.0.1/api/v2/secret/checkin \
-d '{"session_id": "8169529724050079755"}'
Response
{
"result": "success"
}