You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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
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 :
The text was updated successfully, but these errors were encountered: