Azure OIDC for SSH certs: Fetch a list of user groups via Microsoft Graph API
I maintainer di solito rispondono entro 1 giorno
@hslatman ci sta già lavorando.
Dal 29/7/2025.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Hello!
- Vote on this issue by adding a 👍 reaction
- If you want to implement this feature, comment to let us know (we'll work with you on design, scheduling, etc.)
Issue details
Allow configuring an extra API endpoint to call as part of the SSH cert issuance process. This info could then be made available to the template file, e.g., as .Custom (here).
A concrete example would be calling the Microsoft Graph API to fetch a list of groups the user belongs to. Then, in the template, we could do something like "Principals": {{ toJson .Custom.groupIds }}.
I haven't looked at other OIDC providers, but this could potentially be generic?
Why is this needed?
Our specific example looks something like this:
- We have lots of servers (~300 or so)
- Each server has a single user account
- Staff are granted access server-by-server
To facilitate that, we're using an Azure OIDC provisioner, with a template like this:
{
"type": "{{ .Type }}",
"keyId": "{{ .KeyID }}",
// the principals will be a list of Azure group IDs
"principals": {{ toJson .Token.groups }},
"extensions": {{ toJson .Extensions }},
"criticalOptions": {{ toJson .CriticalOptions }}
}
Then, we create an Azure group for each server, and place the Object ID of that group into the AuthorizedPrincipalsFile on the server.
The result is: When a user first logs-in, they go through an OAuth login flow, which issues them an SSH cert containing a list of Object IDs of the groups they're in. When they connect to a server, they'll be allowed/denied based on those Group IDs.
This was actually working great, until we hit Azure's 200 group limit for JWTs.
Long story short, if the user has more than 200 groups, Azure will totally omit all groups, and instead suggests to fetch a list of user groups via the Microsoft Graph API (see the ~middle paragraph here). It seems our only option is to fetch a list of groups as a separate API call.
- Lingua principale
- Go
- Stelle
- 8.9k
- Fork
- 599
- Merge medio
- 21h 20m
- PR unite (30g)
- 15
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di smallstep/certificates
-
bug needs triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
smallstep/certificates#2863 ·
I maintainer di solito rispondono entro 1 giorno
-
needs triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 65/100
smallstep/certificates#2788 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
smallstep/certificates#2730 · 1 commento · 2 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
smallstep/certificates#2860 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: Tokens fail validation after the identity provider rotates its signing key until the JWKS cache expiresForse già presa @APWHY l’ha presa 100 giorni fa. Apertabug needs triage
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
smallstep/certificates#2831 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di smallstep/certificates
Issue simili
-
enhancement good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
I maintainer di solito rispondono entro 1 giorno
-
Windows系统上,希望复制路径增加 Unix 格式Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
-
go good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Azure/prometheus-collector#1828 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni