Master thesis
Cite …

mytoken - OpenID Connect Tokens for Long-term Authorization

Gabriel Zachmann ORCID iD icon 1
1 Scientific Computing Center (SCC), Karlsruhe Institute of Technology (KIT)
Abstract

OpenID Connect is an important key component of many modern Authentication and

Authorization Infrastructures. It is mostly used within web browsers, but command line

and API usages see rising adoption. From this emerges the need for good command line

tooling. In previous work we developed a local tool for managing OpenID Connect access

tokens on the command line. However, this tool is less suitable if access tokens need to

be used over extended periods of time from multiple hosts. This need arises especially

with compute jobs which typically do not run on the user’s computer. In scenarios in

which compute jobs need to authenticate via OpenID Connect access tokens to load and

store data or to access other resources, the short lifetime of OpenID Connect access tokens

may pose a problem. It is very common that compute jobs run longer than the lifetime

of a single access token. Current mechanisms provided by OpenID Connect and existing

software tools do not address this problem sufficiently.

In this thesis we designed and implemented a token service called mytoken that ad-

dresses this problem by providing a mechanism to provide fresh OpenID Connect access

tokens over an extended period of time. The mytoken service introduces a new token type

called mytoken. These mytokens can be used for easily obtaining access tokens on any

internet-connected device via the mytoken server. Mytokens can be transferred easily to

other devices. Mytokens may be used instead of OpenID Connect access tokens to start

compute jobs. They then can be used by job submission systems as well as from inside

running compute jobs to obtain as many access tokens as specified in the mytoken. For a

fine grained balance between security and usefulness, we have implemented capabilities

and restrictions. These can be used to restrict each mytoken so that it has exactly the

power it needs, and to limit the impact if stolen. Restrictions allow limiting the usage of

a mytoken to a set of time spans, to certain locations (countries as well as ip addresses

or subnets), in the number of usages, and the scopes and audiences of access tokens that

can be obtained. By using multiple restriction clauses, a single mytoken can be used even

in complex use cases that demand different privileges over time. A typical example for

this is job submission, where initially privileges for starting a job and reading input data

are required. Throughout the run-time of a job, usually no privileges are required. At the

end of the job output data needs to be written. Using the introduced restrictions, a single

mytoken can be used for all of these steps, while in each step only the required privileges

are active, which reduces the attack surface greatly, and thereby poses a promising solution

for long running jobs.