oidc_ssh
Diana Gudu
gudu@kit.edu
Goal
In a federated environment, enable users to ssh to a server
2
Goal
In a federated environment, enable users to ssh to a server
3
Goal
In a federated environment, enable users to ssh to a server
4
Main Issue
ssh privilege separation
5
Main Issue
ssh privilege separation
6
A system that can provide the full user context
to ssh before authentication is needed.
Approaches
7
Approaches
8
Issues
Both approaches have to address the same issues in practice:
9
Reservation Management
10
Reservation Management
Implemented a reservation system
11
UID handling
For reservations, it is necessary to solve the uid problem upfront:
which uids to assign to users
12
UID handling
For reservations, it is necessary to solve the uid problem upfront:
which uids to assign to users
13
Session Tracking
Ensure that the persisted user in PAM is consistent with the original user context claimed by ssh.
14
Session Tracking
Ensure that the persisted user in PAM is consistent with the original user context claimed by ssh.
15
Session Tracking
Prone to timing attacks that lead to user "impersonation"
16
alice
ssh: (alice, 1000)
res: (alice, 1000)
Session Tracking
Prone to timing attacks that lead to user "impersonation"
17
alice
bob
ssh: (alice, 1000)
res: (alice, 1000)
res expired
ssh: (bob, 1000)
res: (bob, 1000)
ssh successful, uid 1000
Session Tracking
Prone to timing attacks that lead to user "impersonation"
18
alice
bob
alice
ssh: (alice, 1000)
res: (alice, 1000)
res expired
ssh: (bob, 1000)
ssh successful, uid 1000
ssh: (alice, 1001)
ssh successful, uid 1001
res: (alice, 1001)
res: (bob, 1000)
Session Tracking
Prone to timing attacks that lead to user "impersonation"
19
alice
bob
alice
ssh: (alice, 1000)
res: (alice, 1000)
res expired
ssh: (bob, 1000)
ssh successful, uid 1000
ssh: (alice, 1001)
ssh successful, uid 1001
res: (alice, 1001)
res: (bob, 1000)
ssh successful, uid 1000
Session Tracking
Prone to timing attacks that lead to user "impersonation"
20
alice
bob
alice
ssh: (alice, 1000)
res: (alice, 1000)
res expired
ssh: (bob, 1000)
ssh successful, uid 1000
ssh: (alice, 1001)
ssh successful, uid 1001
res: (alice, 1001)
res: (bob, 1000)
ssh successful, uid 1000
Login Flow
ssh oidcname@oidcprovider@host
21
SSH
NSS
PAM
1
2
5
6
9
8
7
user
session
10
uid pool
res db
3
4
passwd
Login Flow (marcus version)
22
SSH
NSS
PAM
1
2
5
6
9
7
8
user
session
10
pool of temp UIDs
3
4
passwd
mapping user-username
pam-username
Advantages
Goal reached: secure, on-the-fly user creation without additional registration steps.
23
Username Issue
24
Username Issue
25
Username Issue
26
hash (sub + iss) [0:maxlen]
More Issues
27