API v2: Secret Access Management 🆕¶
Overview¶
Secret access management tracks and controls who accesses secrets in collections. It provides audit trails, exclusive checkout capabilities, time-based access control, and the ability to mark accesses as safe for exposure monitoring.
Data Structures¶
Attribute |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Read-only. Unique secret access identifier. |
|
|
string |
yes |
Read-only. User identifier. |
|
string |
yes |
Read-only. Secret identifier. |
|
string |
Read-only. Hidden; expensive to use. Secret name. |
|
|
boolean |
Read-only; expensive to use. Indicates whether the secret has been removed. |
|
|
string |
yes |
Read-only. Secret value version identifier. |
|
string |
yes |
Read-only; expensive to use. Collection identifier. |
|
string |
Read-only. Hidden; expensive to use. Collection name. |
|
|
boolean |
Read-only; expensive to use. Indicates whether the collection has been removed. |
|
|
string |
Read-only. Client IP address at checkout time. |
|
|
number |
Read-only. Client port at checkout time. |
|
|
datetime |
yes |
Read-only. When the checkout started. |
|
datetime |
Read-only. When user checked in. |
|
|
datetime |
Read-only. When access was set to expire. Uses secret checkout_time_limit attribute. |
|
|
boolean |
yes |
Read-only. Whether this was an exclusive checkout that locks the secret. Uses secret checkout_exclusive attribute. |
|
boolean |
yes |
Read-only. Whether user forced checkout while another user had exclusive access. |
|
string |
Read-only; expensive to use. User name. |
|
|
boolean |
yes |
Read-only; expensive to use. Whether the checkout is still active and can be checkin. |
|
boolean |
Read-only; expensive to use. Whether the this access was marked as safe. |
|
|
string |
Read-only. User ID who marked this access as safe. |
|
|
string |
Read-only; expensive to use. Name of the user who marked this access as safe. |
|
|
datetime |
Read-only. Timestamp when access was marked as safe. |
|
|
boolean |
Read-only; expensive to use. Indicates whether the user who accessed the secret is blocked. |
|
|
boolean |
Read-only; expensive to use. Indicates whether the user who accessed the secret is removed. |
|
|
boolean |
Read-only; expensive to use. Indicates whether the user who accessed the secret has lost access to the collection. |
|
|
boolean |
Read-only. Hidden; expensive to use. Boolean sum of user_blocked, user_removed and user_lost_access fields. |
|
|
datetime |
Read-only. Timestamp of creation. |
|
|
datetime |
Read-only. Timestamp of modification. |
|
|
boolean |
Read-only. |
Retrieve Available Attributes of the SecretAccessModel¶
Request
Method |
|
Path |
|
GET /api/v2/objspec/secret_access
Note
This endpoint may not be available if secret_access doesn’t have a separate object specification.
List Secret Access Records¶
Request
Method |
|
Path |
|
GET /api/v2/secret/access
Example Request
curl -s -k -X GET \
-H 'Authorization: <token>' \
'https://10.31.135.179/api/v2/secret/access'
Response
{
"result": "success",
"secret_access": [
{
"id": "1",
"user_id": "8754997675608244225",
"secret_id": "8754997675608244229",
"secret_removed": false,
"secret_history_id": "8754997675608244228",
"collection_id": "8754997675608244227",
"collection_removed": false,
"source_ip": "10.2.0.182",
"source_port": 55033,
"accessed_at": "2026-04-02T23:56:21Z",
"checked_in_at": "2026-04-02T23:56:21Z",
"exclusive": false,
"forced": false,
"user_name": "admin",
"active": false,
"marked_safe": false,
"user_blocked": false,
"user_removed": false,
"user_lost_access": false
}
]
}
Get Secret Access for Specific Secret¶
Request
Method |
|
Path |
|
GET /api/v2/secret/<secret_id>/access
Example Request
curl -s -k -X GET \
-H 'Authorization: <token>' \
'https://10.31.135.179/api/v2/secret/8754997675608244229/access'
Response
{
"result": "success",
"secret_access": [
{
"id": "1",
"user_id": "8754997675608244225",
"secret_id": "8754997675608244229",
"secret_removed": false,
"secret_history_id": "8754997675608244228",
"collection_id": "8754997675608244227",
"source_ip": "10.2.0.182",
"source_port": 55033,
"accessed_at": "2026-04-02T23:56:21Z",
"checked_in_at": "2026-04-02T23:56:21Z",
"exclusive": false,
"forced": false,
"user_name": "admin",
"active": false,
"marked_safe": false,
"user_blocked": false,
"user_removed": false,
"user_lost_access": false
}
]
}
Check In Secret Access¶
Request
Method |
|
Path |
|
POST /api/v2/secret/access/<access_id>/checkin
Example Request
curl -s -k -X POST \
-H 'Authorization: <token>' \
'https://10.31.135.179/api/v2/secret/access/1/checkin'
Response
{
"result": "success",
"secret_access": [
{
"id": "1",
"checked_in_at": "2026-04-02T23:56:21Z",
"active": false
}
]
}
Mark Secret as Safe¶
Request
Method |
|
Path |
|
POST /api/v2/secret/<secret_id>/mark_safe
Example Request
curl -s -k -X POST \
-H 'Authorization: <token>' \
'https://10.31.135.179/api/v2/secret/8754997675608244229/mark_safe'
Response
{
"result": "success"
}
Note
The mark_safe endpoint is used to mark a secret as safe after it has been reviewed for potential exposure. This updates the secret’s exposure status and clears any exposure alerts.