Velocity • Durability

7. PanFS Users

Per-tenant PanFS identities, with POSIX uid/gid, used for S3 object ownership, distinct from the tenant users who sign in to PanAPI itself.

Endpoint Summary

Path Summary Method
/api/v1/tenants/{tenant_id}/fs-users List PanFS users GET
/api/v1/tenants/{tenant_id}/fs-users Create PanFS user POST
/api/v1/tenants/{tenant_id}/fs-users/{fs_user_id} Get PanFS user GET
/api/v1/tenants/{tenant_id}/fs-users/{fs_user_id} Update PanFS user PATCH
/api/v1/tenants/{tenant_id}/fs-users/{fs_user_id} Delete PanFS user DELETE
/api/v1/tenants/{tenant_id}/fs-users/{fs_user_id}/s3/secret Reveal a PanFS user S3 secret GET
/api/v1/tenants/{tenant_id}/fs-users/{fs_user_id}/s3/secret/rotate Rotate a PanFS user S3 secret POST

GET /api/v1/tenants/{tenant_id}/fs-users

List PanFS users

Every PanFS user in the tenant, sorted by name. No secrets.

Authentication: required (PasswordLogin or BearerJWT).

Parameters

Name In Type Required Description
tenant_id path string (uuid) yes Tenant identifier (UUID).

Responses

Status Description Schema
200 PanFS users listed. FsUserListResponse
401 Unauthorized. Authentication required. -
403 Forbidden. Insufficient permissions. -
422 Validation Error HTTPValidationError
500 Internal server error. -

Response Body (200, FsUserListResponse)

Field Type Required Default Example Description
fs_users array of FsUser object yes n/a
total integer yes n/a How many users the listing carries.

POST /api/v1/tenants/{tenant_id}/fs-users

Create PanFS user

Create a PanFS user in the tenant. The name must be unique within the tenant, and so must the S3 access key, which defaults to the name. The S3 secret is minted here and is not returned: read it through the reveal route, which gates on a stronger permission.

Authentication: required (PasswordLogin or BearerJWT).

Parameters

Name In Type Required Description
tenant_id path string (uuid) yes Tenant identifier (UUID).

Request Body (application/json, required)

Schema: FsUserCreateRequest

Request payload for creating a PanFS user.

Field Type Required Default Example Description
access_key string, nullable no null S3 access key. Defaults to name, which is why both carry the same charset rule.
gid integer, nullable no null POSIX group id. Same defaulting and bounds as uid.
name string yes n/a Unique handle within the tenant.
profile S3Profile (disabled, user, privileged) no user S3 access profile.
uid integer, nullable no null POSIX user id. Omit to take the tenant’s configured default, or nobody (65534) when it has none or when that default is not a usable id, 0 included. The resolved value is written onto the record, so a later change to the tenant default does not move this identity. 0 is not accepted: it would name root. Nor is anything above 4294967294, the last id a 32-bit uid_t can hold.

Example

{
   "gid" : 1000,
   "name" : "alice",
   "uid" : 1000
}

Responses

Status Description Schema
201 PanFS user created. FsUserResponse
401 Unauthorized. Authentication required. -
403 Forbidden. Insufficient permissions. -
404 Tenant not found. -
409 name or access_key already in use, or reserved by the S3 config. -
422 Validation error. -
500 Internal server error. -

Response Body (201, FsUserResponse)

Field Type Required Default Example Description
fs_user FsUser object yes n/a A PanFS user as published.

GET /api/v1/tenants/{tenant_id}/fs-users/{fs_user_id}

Get PanFS user

Fetch one PanFS user.

Authentication: required (PasswordLogin or BearerJWT).

Parameters

Name In Type Required Description
tenant_id path string (uuid) yes Tenant identifier (UUID).
fs_user_id path string (uuid) yes

Responses

Status Description Schema
200 PanFS user returned. FsUserResponse
401 Unauthorized. Authentication required. -
403 Forbidden. Insufficient permissions. -
404 No such PanFS user in this tenant. -
422 Validation Error HTTPValidationError
500 Internal server error. -

Response Body (200, FsUserResponse)

Field Type Required Default Example Description
fs_user FsUser object yes n/a A PanFS user as published.

PATCH /api/v1/tenants/{tenant_id}/fs-users/{fs_user_id}

Update PanFS user

Partial update of uid, gid, profile and/or access_key. The secret cannot be changed here - rotation is its own operation, because it is destructive.

Authentication: required (PasswordLogin or BearerJWT).

Parameters

Name In Type Required Description
tenant_id path string (uuid) yes Tenant identifier (UUID).
fs_user_id path string (uuid) yes

Request Body (application/json, required)

Schema: FsUserPatchRequest

Request payload for updating a PanFS user. The secret is not among the fields.

Field Type Required Default Example Description
access_key string, nullable no null Updated S3 access key.
gid integer, nullable no null Updated POSIX group id.
profile S3Profile (disabled, user, privileged), nullable no null Updated S3 access profile.
uid integer, nullable no null Updated POSIX user id.

Responses

Status Description Schema
200 PanFS user updated. FsUserResponse
401 Unauthorized. Authentication required. -
403 Forbidden. Insufficient permissions. -
404 No such PanFS user in this tenant. -
409 access_key already in use, or reserved by the S3 config. -
422 Validation error. -
500 Internal server error. -

Response Body (200, FsUserResponse)

Field Type Required Default Example Description
fs_user FsUser object yes n/a A PanFS user as published.

DELETE /api/v1/tenants/{tenant_id}/fs-users/{fs_user_id}

Delete PanFS user

Idempotent: deleting a user that is already gone succeeds, so a retry resumes.

Authentication: required (PasswordLogin or BearerJWT).

Parameters

Name In Type Required Description
tenant_id path string (uuid) yes Tenant identifier (UUID).
fs_user_id path string (uuid) yes

Responses

Status Description Schema
204 PanFS user deleted. -
401 Unauthorized. Authentication required. -
403 Forbidden. Insufficient permissions. -
422 Validation Error HTTPValidationError
500 Internal server error. -

GET /api/v1/tenants/{tenant_id}/fs-users/{fs_user_id}/s3/secret

Reveal a PanFS user S3 secret

Return the S3 secret. Gated on fs-users:read-s3-secret rather than fs-users:view, because it hands over a credential rather than describing one. The S3 gateway resolves a secret by access key instead, through POST /s3/gateway/s3-credentials/{access_key}/reveal.

Authentication: required (PasswordLogin or BearerJWT).

Parameters

Name In Type Required Description
tenant_id path string (uuid) yes Tenant identifier (UUID).
fs_user_id path string (uuid) yes

Responses

Status Description Schema
200 Secret returned. FsUserSecretResponse
401 Unauthorized. Authentication required. -
403 Forbidden. Insufficient permissions. -
404 No such PanFS user, or the user has no S3 credential. -
422 Validation Error HTTPValidationError
500 Internal server error. -

Response Body (200, FsUserSecretResponse)

Field Type Required Default Example Description
access_key string yes n/a The access key the secret belongs to.
secret_key string yes n/a The S3 secret key.

Example

{
   "access_key" : "alice",
   "secret_key" : "..."
}

POST /api/v1/tenants/{tenant_id}/fs-users/{fs_user_id}/s3/secret/rotate

Rotate a PanFS user S3 secret

Mint a new secret and return it once. The access key is left standing: it is what bucket owner fields and audit lines name. Permitted regardless of profile, so an operator can prepare a disabled user before re-enabling it.

Authentication: required (PasswordLogin or BearerJWT).

Parameters

Name In Type Required Description
tenant_id path string (uuid) yes Tenant identifier (UUID).
fs_user_id path string (uuid) yes

Responses

Status Description Schema
200 Secret rotated. FsUserSecretResponse
401 Unauthorized. Authentication required. -
403 Forbidden. Insufficient permissions. -
404 No such PanFS user in this tenant. -
409 The user has no S3 credential to rotate. -
422 Validation Error HTTPValidationError
500 Internal server error. -

Response Body (200, FsUserSecretResponse)

Field Type Required Default Example Description
access_key string yes n/a The access key the secret belongs to.
secret_key string yes n/a The S3 secret key.

Example

{
   "access_key" : "alice",
   "secret_key" : "..."
}