mytoken – secure, long-lived tokens for you
everywhere!
Gabriel Zachmann, Xavier Mol, Marcus Hardt
Jun 2023
Recap mytoken
- Goal: Ensure availability of Access Tokens at any
time
- Allow short AT lifetime
- No user interaction
- On any remote machine (Bearer Tokens)
- But secure
- Just like
oidc-agent
, but mostly
serverside
- (i.e. Refresh Token stored serverside)
- Access protected via
mytoken
token
(which is given to the user)
mytoken
tokens are essentially “full
of policies”
- Capabilities
- Restrictions
Basics
Skipped
For concept and security of the tokens itself
Security (of the hosted mytok.eu service)
- https://mytok.eu is
operated inside a Credential
Store
- Definition by

- Secured environment (locked room, logged access, secured cabinet,
…)
- Pro active logging, system updates, …
- Incident response, audits, traceability, …
- Equivalent to requirements of
RCAuth-Masterportal
- Exceeds security requirements of some IdPs
“Eternal Life”
Refresh Tokens
often have a limited
lifetime
- Goal: Reduce human interaction to “once” (create, and maybe:
revoke)
- Suggested technical workaround:
- Use short lived (1 month)
Refresh Tokens
- Enable “Token Rotation” for
Refresh Tokens
- New RT on every use
- Legitimate user will notice, if token was used elsewhere
- Renew lifetime for every new RT
- Unused tokens expire automatically in this
scenario
- Addresses use cases such as “monitoring” or “ci/cd”
Hierarchies
- mytokens can be used to create
- Other mytokens (with less privileges)
- Access Tokens
- …
- Only the mytoken is needed for this
- Typical scenario:
- One “Master” mytoken on personal device
- Subtokens for sending out to the infrastructure
Creating mytokens
- Command line
- Web Interface https://mytok.eu
- Mytoken APP (Android + Apple OS)
- Existing Mytoken
- Create sub-token from mytoken
- Specific capabilities
- Individual restrictions
- Btw: Transfer-Codes allow transferring tokens between device
- Btw:
oidc-agent
also has support for mytoken
Using mytokens
- Commandline:
mytoken
client
command
- Commandline: fancy
curl
command
- Web
Long running compute
(Longer than lifetime of Access Token)
- Load data at the beginning
- Run computation, access other resources in between
- Store data at the end
Problem:
- Access Tokens expire during the job
- Access Tokens cannot be revoked
- Access Tokens are difficult to be limited
-
Emerging Antipattern:
Monitoring
Check health of token-based infrastructure services.
Also: CI/CD style cases.
- Obtain long living
mytoken
- Regularly use
mytoken
to obtain
Access Token
to test services
=> Boils down to requirement “eternal life”