Skip to content

Commit 93a8189

Browse files
Add access keys revoke and list
Signed-off-by: anastasia-nesterenko <anesterenko@nvidia.com>
1 parent 603b97b commit 93a8189

49 files changed

Lines changed: 2504 additions & 184 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/auth/authentication/using-authentication.mdx

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ the SDK's OIDC refresh flow:
109109

110110
```bash
111111
# Create a Scoped Access Key with the platform default expiry and print the token once.
112-
nemo auth access-keys create --name ci-build
112+
nemo auth access-keys create --name ci-build --description "CI build automation"
113113
```
114114

115115
Scoped Access Key management commands live under the `auth` namespace as
@@ -129,7 +129,18 @@ groups present when the key is created. By default, new keys use the platform's
129129
configured default expiry, which is 30 days unless the administrator changes it.
130130
Pass `--expires-in <seconds>` to request a specific finite lifetime. Pass
131131
`--expires-in none` only for deployments where the administrator has explicitly
132-
allowed unlimited keys. Revocation and rotation are not implemented.
132+
allowed unlimited keys.
133+
134+
List keys or revoke one by its stable `jti`:
135+
136+
```bash
137+
nemo auth access-keys list
138+
nemo auth access-keys revoke ak_example
139+
```
140+
141+
The list includes each key's `ACTIVE`, `EXPIRED`, or `REVOKED` status plus its
142+
description, issuer, audiences, creation time, and expiration time. Revocation takes
143+
effect on subsequent authenticated platform requests. Rotation is not implemented.
133144

134145
### Token Inspection
135146

docs/auth/deployment/configuration.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ Nested auth keys use a double underscore after `NMP_AUTH_`: for example,
8989

9090
Scoped Access Keys let an authenticated user create a scoped bearer token for
9191
non-SDK clients and automation. The implementation creates user-scoped signed
92-
JWT access keys and rejects service principals. Revocation and rotation are not
93-
implemented.
92+
JWT access keys, persists their lifecycle metadata, and rejects service principals.
93+
Users can list and revoke their own keys. Rotation is not implemented.
9494

9595
Scoped Access Keys are an auth-service feature exposed under the auth CLI
9696
namespace (`nemo auth access-keys ...`) and the `/apis/auth/v2/access-keys` API routes.

docs/cli/reference.mdx

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,8 @@ nemo auth access-keys [OPTIONS] COMMAND [ARGS]...
270270
**Commands:**
271271

272272
* `create`: Create a Scoped Access Key for the current authenticated...
273+
* `list`: List Scoped Access Keys owned by the current...
274+
* `revoke`: Revoke a Scoped Access Key owned by the current...
273275

274276
##### nemo auth access-keys create
275277

@@ -284,12 +286,45 @@ nemo auth access-keys create [OPTIONS]
284286
**Options:**
285287

286288
* `--name, -n`: Optional human-readable label for the Scoped Access Key.
289+
* `--description, -d`: Optional description for the Scoped Access Key.
287290
* `--expires-in`: Scoped Access Key lifetime in seconds. Use 'none' to request no expiration.
288291

289292
**Help:**
290293

291294
* `--help, -h`: Show this message and exit.
292295

296+
##### nemo auth access-keys list
297+
298+
List Scoped Access Keys owned by the current authenticated user.
299+
300+
**Usage:**
301+
302+
```shell
303+
nemo auth access-keys list [OPTIONS]
304+
```
305+
306+
**Help:**
307+
308+
* `--help, -h`: Show this message and exit.
309+
310+
##### nemo auth access-keys revoke
311+
312+
Revoke a Scoped Access Key owned by the current authenticated user.
313+
314+
**Usage:**
315+
316+
```shell
317+
nemo auth access-keys revoke [OPTIONS] JTI
318+
```
319+
320+
**Arguments:**
321+
322+
* `<JTI>`: Stable ID of the Scoped Access Key to revoke.
323+
324+
**Help:**
325+
326+
* `--help, -h`: Show this message and exit.
327+
293328
### nemo services
294329

295330
Run platform services locally.

openapi/ga/individual/platform.openapi.yaml

Lines changed: 87 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)