Skip to content

Commit cd67a5b

Browse files
authored
Vault Export api changes to add first used timestamp column in query period docs change (#697)
Jira: https://hashicorp.atlassian.net/browse/VAULT-37796 Adds client_first_usage_time to export api Looks like token_creation_time ce changes are not present in this repo. Added those changes too https://github.com/hashicorp/vault/pull/31149/files
2 parents 4325da9 + 57a0ef0 commit cd67a5b

File tree

1 file changed

+28
-12
lines changed

1 file changed

+28
-12
lines changed

content/vault/v1.21.x (rc)/content/api-docs/system/internal-counters.mdx

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1322,6 +1322,16 @@ $ curl \
13221322
http://127.0.0.1:8200/v1/sys/internal/counters/activity/export
13231323
```
13241324

1325+
### Response fields
1326+
1327+
- `token_creation_time` - the creation time of the token used by the client to
1328+
perform the request (previously `timestamp`). Token creation time is distinct
1329+
from the time the client was created and may lie outside of the queried time
1330+
period.
1331+
1332+
- `client_first_usage_time` - timestamp representing the earliest usage of the
1333+
client during the queried time period.
1334+
13251335
### Sample JSON response
13261336

13271337
The entity alias names for userpass in the sample response records below are user-provided. They are
@@ -1354,7 +1364,8 @@ single line.
13541364
"mount_accessor": "auth_userpass_a005db73",
13551365
"mount_type": "userpass",
13561366
"mount_path": "auth/userpass/",
1357-
"timestamp": "2024-07-10T09:33:51Z",
1367+
"token_creation_time": "2022-07-10T09:33:51Z",
1368+
"client_first_used_time":"2024-08-03T12:00:00Z",
13581369
"policies": [
13591370
"secret-read",
13601371
"secret-list",
@@ -1386,7 +1397,8 @@ single line.
13861397
"mount_accessor": "auth_ns_token_e3119312",
13871398
"mount_type": "ns_token",
13881399
"mount_path": "auth/token/",
1389-
"timestamp": "2024-07-08T11:35:23Z",
1400+
"token_creation_time": "2022-07-08T11:35:23Z",
1401+
"client_first_used_time":"2024-08-03T12:00:00Z",
13901402
"policies": [],
13911403
"entity_metadata": {},
13921404
"entity_alias_metadata": {},
@@ -1405,7 +1417,8 @@ single line.
14051417
"mount_accessor": "auth_ldap_a005db73",
14061418
"mount_type": "ldap",
14071419
"mount_path": "auth/ldap/",
1408-
"timestamp": "2024-07-08T11:47:57Z",
1420+
"token_creation_time": "2022-07-08T11:47:57Z",
1421+
"client_first_used_time":"2024-08-03T12:00:00Z",
14091422
"policies": [
14101423
"secret-read"
14111424
],
@@ -1432,7 +1445,8 @@ single line.
14321445
"mount_accessor": "auth_userpass_01a6ea85",
14331446
"mount_type": "userpass",
14341447
"mount_path": "auth/userpass/",
1435-
"timestamp": "2024-07-21T14:51:36Z",
1448+
"token_creation_time": "2022-07-21T14:51:36Z",
1449+
"client_first_used_time":"2024-08-03T12:00:00Z",
14361450
"policies": [
14371451
"secret-read"
14381452
],
@@ -1458,7 +1472,8 @@ single line.
14581472
"mount_accessor": "auth_kubernetes_b596406f",
14591473
"mount_type": "kubernetes",
14601474
"mount_path": "auth/kubernetes/",
1461-
"timestamp": "2024-07-10T09:33:51Z",
1475+
"token_creation_time": "2022-07-10T09:33:51Z",
1476+
"client_first_used_time":"2024-08-03T12:00:00Z",
14621477
"policies": [
14631478
"secret-read"
14641479
],
@@ -1484,7 +1499,8 @@ single line.
14841499
"mount_accessor": "auth_aws_c223ff01",
14851500
"mount_type": "aws",
14861501
"mount_path": "auth/aws/",
1487-
"timestamp": "2024-07-10T09:33:51Z",
1502+
"token_creation_time": "2022-07-10T09:33:51Z",
1503+
"client_first_used_time":"2024-08-03T12:00:00Z",
14881504
"policies": [
14891505
"secret-read"
14901506
],
@@ -1505,16 +1521,16 @@ will be named using the field name and underlying index (e.g. `policies.0`, `pol
15051521
(e.g. `entity_metadata.email_address`, `entity_alias_metadata.region`). A flattened field will only be added if at least one record contains
15061522
it. If a top-level field (e.g. `entity_metadata`) is not populated in any of the
15071523
records then there will not be any flattened fields of prefix
1508-
`enttiy_metadata.`.
1524+
`entity_metadata.`.
15091525

15101526
<CodeBlockConfig hideClipboard>
15111527

15121528
```text
1513-
entity_name,entity_alias_name,client_id,client_type,local_entity_alias,namespace_id,namespace_path,mount_accessor,mount_path,mount_type,timestamp,entity_alias_custom_metadata.contact_email,entity_alias_custom_metadata.group,entity_alias_custom_metadata.region,entity_metadata.email_address,entity_group_ids.0,policies.0,policies.1,policies.2,policies.4
1514-
admin,admin,3f210722-7210-98e8-1f0d-e6a39ffb29c6,entity,false,root,,auth_userpass_a005db73,auth/userpass/,userpass,2024-07-10T09:33:51Z,[email protected],san_francisco,west,[email protected],746fbaf9-ffeb-62b9-7f0b-42d79ca0883f,secret-read,secret-list,secret-write,secret-delete
1515-
,,590198f7-9178-57d6-c345-48746bb438d8,non-entity-token,false,YWZzu,ns1/a/,auth_ns_token_e3119312,auth/token/,ns_token,2024-07-08T11:35:23Z,,,,,,,,,
1516-
jdoe,jdoe,665a54bf-8652-c0c5-8121-40adf0d9786a,entity,false,wOsmr,ns1/a,auth_ldap_a005db73,auth/ldap/,ldap,2024-07-08T11:47:57Z,[email protected],new_york,east,,9f18cd4a-4e64-a2b2-b001-7b6b0dfb1270,secret-read,,,
1517-
jdoe,jdoe,0640a8f0-b315-cc8a-c0c2-713f663774df,entity,false,oIiGy,ns1/b,auth_userpass_01a6ea85,auth/userpass/,userpass,2024-07-21T14:51:36Z,,new_york,east,,76a374a1-72fd-30ca-2455-f51dfeaa805e,secret-read,,,
1529+
entity_name,entity_alias_name,client_id,client_type,local_entity_alias,namespace_id,namespace_path,mount_accessor,mount_path,mount_type,token_creation_time,client_first_used_time,entity_alias_custom_metadata.contact_email,entity_alias_custom_metadata.group,entity_alias_custom_metadata.region,entity_metadata.email_address,entity_group_ids.0,policies.0,policies.1,policies.2,policies.4
1530+
admin,admin,3f210722-7210-98e8-1f0d-e6a39ffb29c6,entity,false,root,,auth_userpass_a005db73,auth/userpass/,userpass,2022-07-10T09:33:51Z,2024-08-03T12:00:00Z,[email protected],san_francisco,west,[email protected],746fbaf9-ffeb-62b9-7f0b-42d79ca0883f,secret-read,secret-list,secret-write,secret-delete
1531+
,,590198f7-9178-57d6-c345-48746bb438d8,non-entity-token,false,YWZzu,ns1/a/,auth_ns_token_e3119312,auth/token/,ns_token,2022-07-08T11:35:23Z,2024-08-03T12:00:00Z,,,,,,,,
1532+
jdoe,jdoe,665a54bf-8652-c0c5-8121-40adf0d9786a,entity,false,wOsmr,ns1/a,auth_ldap_a005db73,auth/ldap/,ldap,2022-07-08T11:47:57Z,2024-08-03T12:00:00Z,[email protected],new_york,east,,9f18cd4a-4e64-a2b2-b001-7b6b0dfb1270,secret-read,,,
1533+
jdoe,jdoe,0640a8f0-b315-cc8a-c0c2-713f663774df,entity,false,oIiGy,ns1/b,auth_userpass_01a6ea85,auth/userpass/,userpass,2022-07-21T14:51:36Z,2024-08-03T12:00:00Z,,new_york,east,,76a374a1-72fd-30ca-2455-f51dfeaa805e,secret-read,,,
15181534
```
15191535

15201536
</CodeBlockConfig>

0 commit comments

Comments
 (0)