rucio / rucio/documentation

Document default JWT token storage location and logout procedure in `using_the_client.md`

Open
#705 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Discussion needed enhancement
Dominant language
Python
Stars
4
Forks
71
Avg merge
2d 1h
Merged PRs (30d)
11

Description

Description

After successful OIDC authentication via rucio whoami, users may want to:

  1. Locate their JWT token for debugging or external use
  2. Log out / invalidate their session
  3. Re-authenticate with different credentials

Currently, this information is not documented in the official Rucio client documentation.

Proposed Documentation Addition

Location: docs/user/using_the_client.md (after the OIDC authentication section)

JWT Token Storage

After successful OIDC authentication, Rucio stores the JWT token locally:

# Default location
/tmp/root/.rucio_<account>/auth_token_for_account_<account>

# Example for 'root' account
cat /tmp/root/.rucio_root/auth_token_for_account_root

Token Format: The file contains a base64-encoded JWT with three parts separated by dots:

<header>.<payload>.<signature>

Decode Token (for debugging):

# View token payload
TOKEN=$(cat /tmp/root/.rucio_root/auth_token_for_account_root)
echo $TOKEN | cut -d'.' -f2 | base64 -d 2>/dev/null | python3 -m json.tool

# Shows: exp (expiration), iat (issued at), sub (subject), iss (issuer), scope, etc.
Logout / Session Management

Logout (delete cached token):

# Remove all cached tokens
rm -rf /tmp/root/.rucio_*/

# Remove specific account token
rm -rf /tmp/root/.rucio_<account>/

# Verify logout
rucio whoami
# Will prompt for re-authentication

Switch Accounts:

# Logout from current account
rm -rf /tmp/root/.rucio_root/

# Authenticate with different account
export RUCIO_ACCOUNT=user
rucio whoami

Custom Token Location:

You can specify a custom token storage location in rucio.cfg:

[client]
auth_token_file_path = /path/to/custom/token/file

Security Note: Token files contain sensitive credentials. Ensure proper file permissions:

chmod 600 /tmp/root/.rucio_root/auth_token_for_account_root
Additional Context
  • Token lifetime is controlled by the Identity Provider (typically 1-24 hours)
  • Expired tokens are automatically refreshed if auth_oidc_refresh_active = true in config
  • Tokens are account-specific (one token per Rucio account)
Files to Update
  1. docs/user/using_the_client.md - Add new section after OIDC examples

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read the OIDC authentication section in docs/user/using_the_client.md and verify the proposed token paths, logout commands, configuration setting, and security notes against the client documentation. Add the JWT storage and session-management section after the OIDC examples, then build or preview the documentation to confirm the new content renders correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
authentication, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
Half a day
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.