testcontainers / testcontainers/testcontainers-java
[Enhancement]: Allow varying the OS credential key and the registry name independently
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Java
- Estrellas
- 8.7k
- Forks
- 1.9k
- Merge medio
- 2 d 17 h
- PR fusionados (30 d)
- 9
Descripción
Module
Core
Proposal
Within my corporate network, we use an internal image repository. Federated authentication of some form is active, after which the Windows Credential store contains a key/val pair, keyed on "https://index.docker.io/v1/". A problem arises when I attempt to resolve an internal image - the method org.testcontainers.utility.RegistryAuthLocator#effectiveRegistryName assumes that where a registry name is present in the DockerImageName (for arguments sake, corporate-image-repo.corp.com), this should be used as the lookup key in the credential store -
Windows Cred Store - "https://index.docker.io/v1/" : some-auth-token
final String registry = dockerImageName.getRegistry();
if (!StringUtils.isEmpty(registry)) {
//corporate-image-repo.corp.com <- lookup fails
return registry;
}
//lookup would succeed...
return StringUtils.defaultString(
DockerClientFactory.instance().getInfo().getIndexServerAddress(),
DEFAULT_REGISTRY_NAME
);
}
This results in being unable to resolve the access token from the Windows Credential store, and thus fails to pull the image from our internal repo.
I'm unsure whether this is a quirk of how our corporate federated login works, but it would be ideal to either :
- Allow override of the entire RegistryAuthLocator implementation so I can sub-class it (via testcontainers.properties) for example
- Add a field to DockerImageName allowing specification of the lookup key independent of the registry host
- Provide an option to force the default registry name for Credential store lookups
Guía de contribución
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.
Línea de trabajo
Comienza con RegistryAuthLocator#effectiveRegistryName y DockerImageName, y luego sigue cómo la búsqueda en Windows Credential store utiliza el valor del registro. Compara las opciones de override propuesto, clave de búsqueda independiente y nombre predeterminado forzado; el trabajo estará completo cuando una imagen interna pueda resolver las credenciales utilizando una clave distinta de su host de registro.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- docker, java
- Área
- authentication, devops
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 30/100