Diana Gudu, Marcus Hardt, Gabriel Zachmann
Mar 2023
flaatoidc-agent + curlflaatoidc-agentmytokenmytoken, maybe
vaultssh-oidc/motley-cueoidc-agent (think
“ssh-agent”)# Example:
# Step 1: Obtain a refresh token from your issuer:
oidc-gen --pub --iss https://wlcg.cloud.cnaf.infn.it --scope "eduperson_entitlement email" wlcg-demo
<follow the flow in your browser ...>
# Step 2: Get access tokens:
oidc-token wlcg-demo
# Step 3: Take a look at the token, and the userinfo endpoint:
for T in $(oidc-token wlcg-demo| tr '.' '\n' ); do
echo $T | base64 -di 2>/dev/null | jq --indent 4 2>/dev/null
done

Information stored inside the access token:
{
"body": {
"aud": "https://wlcg.cern.ch/jwt/v1/any",
"client_id": "c44fc787-b3f8-483d-a78b-22c29fd4e524",
"exp": 1679973409,
"iat": 1679969809,
"iss": "https://wlcg.cloud.cnaf.infn.it/",
"jti": "36932e6e-44d9-4688-b867-f7a4fd76f2ad",
"nbf": 1679969809,
"scope": "openid offline_access profile eduperson_scoped_affiliation eduperson_entitlement email wlcg wlcg.groups",
"sub": "61a5aa12-27c8-41c1-b05b-9eb6f724d29f",
"wlcg.groups": [ "/wlcg" ],
"wlcg.ver": "1.0"
},
"header": { "alg": "RS256", "kid": "rsa1" },
"signature": "Jysd5TXn0iTbaPkjXKjjnVdM9ae5y8J4LK_jdUX-m5JmvE1d_njzq151tE629lmYjKqC0AOF88dShG2efJ7d1saFBIQ3sV50otvbSSDC81BAFLqznecS_FmbpI33GIt0gsSmcpSVbcibMum4lT_S0MUbCL-cmx_M5TvmhI2wbMk",
"verification": {
"algorithm": "RS256"
}
}
Information retrieved from userinfo endpoint:
{
"email": "marcus.hardt@kit.edu",
"email_verified": true,
"family_name": "Hardt",
"given_name": "Marcus",
"iss": "https://wlcg.cloud.cnaf.infn.it/",
"name": "Marcus Hardt",
"preferred_username": "marcus2",
"sub": "61a5aa12-27c8-41c1-b05b-9eb6f724d29f",
"updated_at": 1595850339,
"wlcg.groups": [
"/wlcg"
]
}flaat# Example call and response
marcus@nemo:~$ http http://localhost:8080/authorized_vo "Authorization: Bearer `oidc-token wlcg-demo-delme`"
HTTP/1.1 200 OK
Content-Length: 46
Content-Type: text/plain; charset=utf-8
Date: Tue, 28 Mar 2023 02:40:39 GMT
Server: Python/3.11 aiohttp/3.8.3
This worked: user has the required entitlement
mytoken (think “myProxy”
done right)mytoken-server:
refresh token (typical web-flow)refresh token with
mytokenmytoken-token to useruser (client):
mytoken with mytoken-server to get
access tokenrefresh-tokens with the job?mytoken client from the
cmdlineKind of holy grail, because:
entitlement)sub + iss)flaat + pam-modulepam-ssh-oidc developed by
PSNC (in Pracelab.PL)pam-ssh-oidc enables two things:
pam-module uses flaat for
authorisationflaat + pam-module +
motley_cuehttps://motley-cue.readthedocs.io
motley-cue: Server-side daemon
developed in HIFIS (Germany)motley-cue fixes 4 things:
entitlement (i.e. VO)assurancesub@iss (user whitelist)motley_cue creates a one-time-password
(OTP)
ssh-daemons (or clients) were hurt in this project:
mccli



Important
We are working together
to make
things compatible

Orpheus
apt-get install motley-cue pam-ssh-oidcpip install mccli/etc/pam.d/sshd/etc/motley-cue/motley-cue.conf]/etc/motley-cue/feudal.conf]