rampart serve.
Usage
Subcommands
show
rotate
Skip confirmation prompt
Token storage
Tokens are stored in:0600 (owner read/write only)
How tokens work
Generation
Tokens are 64-character hex strings generated from 32 bytes of cryptographically secure random data:Authentication
The token is used in theAuthorization header for all API requests to rampart serve:
When to rotate
- Token leaked or exposed
- Regular security rotation (recommended: quarterly)
- Suspicious activity detected
- After firing a team member with access
Examples
Show current token
Rotate token (interactive)
Rotate token (non-interactive)
Save to environment variable
Copy to clipboard (macOS)
Copy to clipboard (Linux)
Token priority
Rampart checks for tokens in this order:RAMPART_TOKENenvironment variable~/.rampart/tokenfile
Use cases
CI/CD integration
Manual API testing
Rotate after leak
Team token management
Security best practices
DO
- Rotate tokens regularly (quarterly minimum)
- Use
0600permissions on~/.rampart/token - Store tokens in environment variables (not shell history)
- Revoke tokens when access is no longer needed
DON’T
- Commit tokens to version control
- Share tokens over unencrypted channels
- Log tokens in application logs
- Reuse tokens across environments
Troubleshooting
No token found
~/.rampart/token and starts the service.
Token authentication failed
Permission denied
Token not in environment
API usage
Policy reload
List approvals
Approve a request
See also
- rampart serve - Start approval + dashboard server
- rampart approve - Approve pending requests
- rampart doctor - Verify token is set up correctly