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
To create a RegistryAuthenticator instance, one should use RegistryAuthenticator.Initializer.initialize(). It may return null if the registry uses insecure HTTPS or plain HTTP.
publicRegistryAuthenticatorinitialize() throws ..., RegistryException {
...
} catch (InsecureRegistryExceptionex) {
// Cannot skip certificate validation or use HTTP, so just return null.returnnull;
}
There are two places where a RegistryAuthenticator instance is created: AuthenticatePushStep.call() and PullBaseImageStep.call(). And they handle null (insecure HTTPS or plain HTTP) differently.
PullBaseImageStep:
RegistryAuthenticatorregistryAuthenticator =
RegistryAuthenticator.initializer(...) ... .initialize();
if (registryAuthenticator == null) {
... .error(
"Failed to retrieve authentication challenge for registry that required token authentication");
throwregistryUnauthorizedException;
}
registryCredentials =
registryAuthenticator.setAuthorization(registryCredentials).authenticatePull();
Why? I'm trying to understand the difference of the steps for the logic.
Second Question
The core functionality of RegistryAuthenticator is the eventual method authenticate() which contacts the URL <realm>?service=<service>&scope=repository:<repository>:<scope>. I'm thinking <realm> would probably contain a protocol (e.g., https://), but I'm not so sure. Anyways, currently authenticate() is not being affected by allowInsecureRegistries, as it doesn't use RegistryEndpointCaller to make a call which handles allowInsecureRegistries. Instead, it establishes a Connection on its own.
Hence it isn't affected by the current HTTP-failover when allowInsecureRegistries is set. Is RegistryAuthenticator supposed to be affected? This, I'm not so sure.
The text was updated successfully, but these errors were encountered:
Alright, I think we do have a real issue with RegistryAuthenticator, which is another place that makes a Connection independent of RegistryEndpointCaller: #746 (comment)
Obviously, RegistryAuthenticator does not care about allowInsecureRegistries.
Alright, I think we do have a real issue with RegistryAuthenticator, which is another place that makes a Connection independent of RegistryEndpointCaller: #746 (comment)
Obviously, RegistryAuthenticator does not care about allowInsecureRegistries.
But at the same time, I think it would be pretty rare that an auth server is insecure. #746 (comment) may be a very special case where SSL validation fails unpredictably possibly due to some issue in the customer's local environment.
So, now I think we don't really need to try to apply allowInsecureRegistries to RegistryAuthenticator at least for now. If we find actual use-cases, we can consider it then.
First Question
To create a
RegistryAuthenticator
instance, one should useRegistryAuthenticator.Initializer.initialize()
. It may returnnull
if the registry uses insecure HTTPS or plain HTTP.There are two places where a
RegistryAuthenticator
instance is created:AuthenticatePushStep.call()
andPullBaseImageStep.call()
. And they handlenull
(insecure HTTPS or plain HTTP) differently.PullBaseImageStep
:AuthenticatePushStep
:Why? I'm trying to understand the difference of the steps for the logic.
Second Question
The core functionality of
RegistryAuthenticator
is the eventual methodauthenticate()
which contacts the URL<realm>?service=<service>&scope=repository:<repository>:<scope>
. I'm thinking<realm>
would probably contain a protocol (e.g.,https://
), but I'm not so sure. Anyways, currentlyauthenticate()
is not being affected byallowInsecureRegistries
, as it doesn't useRegistryEndpointCaller
to make a call which handlesallowInsecureRegistries
. Instead, it establishes aConnection
on its own.Hence it isn't affected by the current HTTP-failover when
allowInsecureRegistries
is set. IsRegistryAuthenticator
supposed to be affected? This, I'm not so sure.The text was updated successfully, but these errors were encountered: