redisconn: add an Azure Entra ID credentials provider for Azure Managed Redis
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 54/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- azure, go
- Área
- authentication, backend
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Go
- Estrellas
- 2
- Forks
- 6
- Merge medio
- 23 h 44 min
- PR fusionados (30 d)
- 133
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de stacklok/toolhive-core
-
needs-triage
Dificultad 3/5 1-2 días Aptitud para principiantes 66/100
stacklok/toolhive-core#426 ·
Los mantenedores suelen responder en 1 día
-
mcpcompat/server: refuse dispatch of a request whose per-request context is gonePosiblemente ocupada @jhrozek la tomó hace 13 días. Abiertoneeds-triage
Dificultad 4/5 3-5 días Aptitud para principiantes 54/100
stacklok/toolhive-core#414 ·
Los mantenedores suelen responder en 1 día
-
needs-triage
Dificultad 5/5 Más de una semana Aptitud para principiantes 8/100
stacklok/toolhive-core#343 ·
Los mantenedores suelen responder en 1 día
-
needs-triage
Dificultad 5/5 Más de una semana Aptitud para principiantes 12/100
stacklok/toolhive-core#342 ·
Los mantenedores suelen responder en 1 día
-
needs-triage
Dificultad 5/5 Más de una semana Aptitud para principiantes 15/100
stacklok/toolhive-core#341 ·
Los mantenedores suelen responder en 1 día
Todos los issues de stacklok/toolhive-core
Issues similares
-
govulncheck reports 7 reachable vulnerabilities in dependenciesPosiblemente ocupada @dwisiswant0 la tomó hoy. AbiertoType: Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
projectdiscovery/rawhttp#558 ·
-
govulncheck reports 8 vulnerabilities in called codePosiblemente ocupada @dwisiswant0 la tomó hoy. AbiertoType: Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
projectdiscovery/vulnx#517 ·
-
routing: the tray panel's stage stands still with motion reduced while a request is in flightAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
-
Type: Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
rubys/roundhouse#1946 ·