Coding Examples
The following sections walk through the process of executing various Fuzzball operations using the Python SDK. Usage in other programming languages will follow similar conventions. See the language-specific documentation included in your SDK directory for more information.
Cluster administrators can programmatically obtain a JWT for any user in any organization using the AdminAuthService.AssumeUserIdentity RPC. This is useful for automated troubleshooting scripts or administrative tooling.
Request Parameters:
organization_id(string, required): UUID of the target organizationuser_id(string, required): UUID of the target user
Response:
jwt(string): A JWT token for the target user, with the admin’s identity embedded in an RFC 8693actclaim
Example (Go):
import "fuzzball/fbapi"
// Initialize the admin auth service
svc := fbapi.NewAdminAuthService(address, dialOptions...)
// Assume user identity
resp, err := svc.AssumeUserIdentity(ctx, &fbapi.AssumeUserIdentityRequest{
OrganizationId: "550e8400-e29b-41d4-a716-446655440000",
UserId: "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
})
if err != nil {
// handle error
}
userJWT := resp.Jwt
// Use the JWT for subsequent API calls as the impersonated user
Consult your language-specific SDK documentation for client initialization and session management patterns. For more details on user impersonation workflows, see the Cluster Admin Guide: Impersonating Users.