redisconn: add an Azure Entra ID credentials provider for Azure Managed Redis
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 54/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- azure, go
- Ambito
- authentication, backend
Direzione di ricerca
Start with redisconn's DynamicAuth.CredentialsProviderContext and postgres/azuread.go, then read the existing credential-provider tests and cluster and sentinel client builders. Implement and test the Azure provider against the listed acceptance criteria, including token scope, username, token errors, and static password validation. Done means those unit tests pass and package docs cover TLS, port 10000, and access policy assignment.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
Add an Azure Entra ID credential provider to redisconn, so clients can authenticate to Azure Managed Redis with a short-lived Entra token instead of a static password.
Why
Azure Managed Redis does not support static Redis ACL users. Per-identity permissions (custom data access policies) are only available to Entra identities, whose "password" is an access token that expires (about an hour). A static Password stops working once the token expires, so the only static option is the instance access key, which grants full access to the whole instance.
redisconn already has the seam for this: DynamicAuth.CredentialsProviderContext is called for every new connection and is threaded through the standalone, cluster and sentinel clients. What is missing is an Azure implementation. postgres/azuread.go already does the equivalent for Azure Database for PostgreSQL and is the pattern to follow.
Proposed shape
- A constructor (or a
DynamicAuthbackend field mirroringpostgres.DynamicAuthConfig.AzureAD) built onazidentity.DefaultAzureCredential: workload identity, managed identity,AZURE_CLIENT_IDfor a user-assigned identity. - Token scope
https://redis.azure.com/.default. - Username: the object ID of the identity, which Azure Managed Redis requires. Allow an explicit override, and derive it from the token's
oidclaim when unset. - Construct the credential once;
azidentitycaches and refreshes the token, so the per-connection cost is a cachedGetToken. ConnMaxLifetimeset below the token lifetime so pooled connections re-authenticate before the token expires.
Acceptance criteria
- Unit: the provider returns the identity's object ID as username and a token minted for
https://redis.azure.com/.defaultas password, using a fakeazcore.TokenCredential. No AT because the token exchange with Azure cannot run in CI; the connection path is covered by the existingCredentialsProviderContexttests. - Unit: an error from
GetTokensurfaces as a wrapped auth error and fails the dial, never a silent fallback to no auth. - Unit: setting both a static
Passwordand the Azure provider is refused byConfig.Validate, as it is for any otherDynamicAuth. - Unit: the cluster and sentinel client builders carry the Azure provider through, matching the existing
CredentialsProviderContextcoverage. - Package docs describe the Azure Managed Redis requirements: TLS, port 10000, and an access policy assignment for the identity.
- Lingua principale
- Go
- Stelle
- 2
- Fork
- 6
- Merge medio
- 23h 44m
- PR unite (30g)
- 133
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 stacklok/toolhive-core
-
needs-triage
Difficoltà 3/5 1-2 giorni Idoneità per principianti 66/100
stacklok/toolhive-core#426 ·
I maintainer di solito rispondono entro 1 giorno
-
mcpcompat/server: refuse dispatch of a request whose per-request context is goneForse già presa @jhrozek l’ha presa 13 giorni fa. Apertaneeds-triage
Difficoltà 4/5 3-5 giorni Idoneità per principianti 54/100
stacklok/toolhive-core#414 ·
I maintainer di solito rispondono entro 1 giorno
-
needs-triage
Difficoltà 5/5 Più di una settimana Idoneità per principianti 8/100
stacklok/toolhive-core#343 ·
I maintainer di solito rispondono entro 1 giorno
-
needs-triage
Difficoltà 5/5 Più di una settimana Idoneità per principianti 12/100
stacklok/toolhive-core#342 ·
I maintainer di solito rispondono entro 1 giorno
-
needs-triage
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
stacklok/toolhive-core#341 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di stacklok/toolhive-core
Issue simili
-
govulncheck reports 7 reachable vulnerabilities in dependenciesForse già presa @dwisiswant0 l’ha presa oggi. ApertaType: Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
projectdiscovery/rawhttp#558 ·
-
govulncheck reports 8 vulnerabilities in called codeForse già presa @dwisiswant0 l’ha presa oggi. ApertaType: Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
projectdiscovery/vulnx#517 ·
-
routing: the tray panel's stage stands still with motion reduced while a request is in flightAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
-
Type: Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
rubys/roundhouse#1946 ·