Lukas Brocke, Diana Gudu, Marcus Hardt, Gabriel Zachmann
Mar 2024
ssh
<=> Enable using ssh
with
eduGAIN
loginssh-keys
ssh
vs federated-IDs
Feature | ssh / local-ID | eduGAIN / federated ID |
---|---|---|
Single Sign On | no | yes |
Home-Org Identity Management | no | yes |
Unix Shell Access | yes | no |
<=> HPC Access | yes | no |
git, rsync | yes | no |
Shared credentials | yes | no |
Permanent credential lifetime | yes | no |
Unencrypted ssh-keys | yes | undefined |
Federated (global) Authorisation (via VOs) | no | yes |
Revocation / Offboarding | no | yes |
Different credential per server | yes | no |
Why on earth?
motley-cue
: https://motley-cue.readthedocs.io
entitlement
(i.e. VO) + assurance
+ sub@iss
(user whitelist)ssh
ssh
ssh
would result in forking
=>
Nossh
use Access TokensPassword
->
Access Token
pam-ssh-oidc
+
pam-ssh-oidc-autoconfig
debian
, ubuntu
, centos
,
alma
, fedora
, rocky
,
SuSE
, Arch
$ ssh testuser@ssh-oidc-demo.data.kit.edu
(tetsuser@ssh-oidc-demo.data.kit.edu) Access Token:
oidc-agent
: https://indigo-dc.gitbook.io/oidc-agent
ssh-agent
motley-cue
:small>https://motley-cue.readthedocs.iomotley-cue
before sshusername
sshd
)
New tool: mccli
oidc-agent
motley-cue
REST interfaceOTP
into password fieldssh
works!!
web browser
mccli
to javascript
ssh
:
ssh
: rsync
,
git
dd if=/dev/sda | pbzip2 | ssh fileserver "cat - > backup.img.bz2"
mccli
: Find a way to drop itoidc-agent
: if needed once per month, a web
copy+paste
flow is viable.ssh-certificates
openssh-v5.3
in 2010host
keys + user
keysssh-ca
keysssh-certificates
principals
, => list of valid user namesforce-command
, => allowed command for
certificate-user$ ssh-keygen -L -f user-key-cert.pub
user-key-cert.pub:
Type: ssh-ed25519-cert-v01@openssh.com user certificate
Public key: ED25519-CERT SHA256:rkSKv...
Signing CA: ED25519 SHA256:xw9aV... (using ssh-ed25519)
Key ID: "whatever"
Serial: 0
Valid: from 2023-09-01T14:30:00 to 2023-09-02T14:30:00
Principals:
oinit
Critical Options:
force-command oinit-switch marcus
Extensions:
permit-X11-forwarding
permit-agent-forwarding
permit-port-forwarding
permit-pty
permit-user-rc
oinit
New components to integrate ssh-certificates with
motley-cue
oinit-ca
, an online ssh-ca
motley-cue
):
CA
: Authorisation based on OIDC claimsmotley-cue
: Find unix username for federated usersshd
: Ensure a local user exist for federated IDoinit-ca
supports provisioning via
motley-cue
oinit openssh
: serverside components to support
oinit
Developed by Lukas Brocke as part of his master thesis. (Details here).
oinit
client sideoinit
:
ssh
to use oinit
for selected ssh serversoinit
oinit-ca
to useoinit add <ssh-server>[:<port>] http[s]://<ssh-ca>[:<port>]
ssh-certificate
whenever needed
oinit
mechanism is then used via
~/.ssh/config
Match exec "oinit match %h %p"
User oinit
ssh
calloinit
-enables ssh-server,
openssh-client
will
oidc
credentials
oidc-agent
or mytoken
ssh-agent
ssh-certificate
lifetime:$ ssh ssh-server.edu
[1] https://aai-dev.egi.eu/auth/realms/egi
[2] https://aai.egi.eu/auth/realms/egi (Accounts: egi)
[3] https://accounts.google.com
[4] https://iam.deep-hybrid-datacloud.eu
[5] https://login-dev.helmholtz.de/oauth2
[6] https://login.helmholtz.de/oauth2
[7] https://oidc.scc.kit.edu/auth/realms/kit
[8] https://wlcg.cloud.cnaf.infn.it
? Please select a provider to use [1-8]: 2
✔ Received a certificate which is valid until 2024-03-08 14:04:20
debian
, ubuntu
, centos
,
alma
, fedora
, rocky
,
SuSE
, Arch
oidc-agent
forwardingxxx
-live?” list:
ssh
-daemons (or clients) were hurt in this project:
Important
We are working together
to make
things compatible
Orpheus
apt-get install motley-cue pam-ssh-oidc
pip install mccli
/etc/pam.d/sshd
/etc/motley-cue/motley-cue.conf
]/etc/motley-cue/feudal.conf
]