@@ -3,14 +3,21 @@ DateReviewed: 2022-03-10
33Bearer Token Overview
44=====================
55
6- Bearer Tokens are a security method used for accessing compute and storage resources,
7- introduced as a replacement for X.509.
6+ Token-based Authentication and Authorization Infrastructure (AAI) is a security method
7+ that is intended as the replacement for X.509 for accessing compute and storage resources.
8+ This document will describe "bearer tokens," which are one of the components of Token AAI;
9+ bearer tokens are the type of token that server software such as HTCondor and XRootD will primarily interact with.
10+
11+ Bearer tokens are credential strings in the [ JSON Web Token (JWT)] ( https://jwt.io ) format.
12+ A JWT consists of a JSON header, a JSON payload, and a signature that can be verified.
13+ The payload contains a number of fields, called "claims", that describe the token and what it can access.
814
9- Bearer Tokens are credential strings in the [ JSON Web Token (JWT)] ( https://jwt.io ) format;
10- a JWT is a small piece of JSON data with a signature that can be verified.
1115There are two JWT-based token standards that can be used with OSG software: [ SciTokens] ( https://scitokens.org )
1216and [ WLCG Tokens] ( https://github.com/WLCG-AuthZ-WG/common-jwt-profile/blob/master/profile.md ) .
17+ These standards describe the claims that are used in the payload of the JWT.
1318
19+ A bearer token (sometimes called an "access token") is a short-lived credential,
20+ performing a similar role as a grid proxy did in X.509.
1421X.509 proxies established identity (the DN in your subject) and group membership (VOMS FQANs).
1522Servers made decisions about access based on those properties.
1623Tokens also have 'scope' which can restrict the actions that can be done with the token.
@@ -20,8 +27,23 @@ For example the job could have one token granting it the ability to be run;
2027it could have a token for read access to an input dataset, and a token for write access to a results directory.
2128
2229
30+ Token Components
31+ ----------------
32+ SciTokens and WLCG Tokens are similar standards and have some common fields (known as "claims"):
33+
34+ - Each token must have an issuer ("iss") claim.
35+ This identifies the organization that issued the token.
36+ An issuer looks like an HTTPS URL;
37+ this URL must be valid and publicly accessible because it is used by services to validate the token.
2338
39+ - Tokens should have a limited lifespan.
40+ This is described by the issued-at ("iat"), not-before ("nbf"), and expiration ("exp") claims,
41+ all of which are Unix timestamps.
2442
43+ - Tokens must have a subject ("sub") claim.
44+ The subject identifies an entity (which could be a human or a robot) that owns the token.
45+ Unlike the subject of an X.509 certificate, a token subject does not need to be globally unique,
46+ only unique to the issuer.
2547
2648Validating Tokens in Pilot Jobs
2749-------------------------------
0 commit comments