public static String toSafeString(AuthConfig authConfig) { if (authConfig == null) { return "null"; } return MoreObjects.toStringHelper(authConfig) .add("username", authConfig.getUsername()) .add("password", obfuscated(authConfig.getPassword())) .add("auth", obfuscated(authConfig.getAuth())) .add("email", authConfig.getEmail()) .add("registryAddress", authConfig.getRegistryAddress()) .add("registryToken", obfuscated(authConfig.getRegistrytoken())) .toString(); }
log.debug("found helper auth config [{}]", toSafeString(helperAuthConfig)); return helperAuthConfig; log.debug("found creds store auth config [{}]", toSafeString(storeAuthConfig)); return storeAuthConfig; log.debug("found existing auth config [{}]", toSafeString(existingAuthConfig)); return existingAuthConfig; log.debug("no matching Auth Configs - falling back to defaultAuthConfig [{}]", toSafeString(defaultAuthConfig));
public AuthConfig effectiveAuthConfig(String imageName) { // allow docker-java auth config to be used as a fallback AuthConfig fallbackAuthConfig; try { fallbackAuthConfig = delegate.effectiveAuthConfig(imageName); } catch (Exception e) { log.debug("Delegate call to effectiveAuthConfig failed with cause: '{}'. " + "Resolution of auth config will continue using RegistryAuthLocator.", e.getMessage()); fallbackAuthConfig = new AuthConfig(); } // try and obtain more accurate auth config using our resolution final DockerImageName parsed = new DockerImageName(imageName); final AuthConfig effectiveAuthConfig = RegistryAuthLocator.instance() .lookupAuthConfig(parsed, fallbackAuthConfig); log.debug("Effective auth config [{}]", toSafeString(effectiveAuthConfig)); return effectiveAuthConfig; }
public static String toSafeString(AuthConfig authConfig) { if (authConfig == null) { return "null"; } return MoreObjects.toStringHelper(authConfig).add("username", authConfig.getUsername()).add("password", obfuscated(authConfig.getPassword())).add("auth", obfuscated(authConfig.getAuth())).add("email", authConfig.getEmail()).add("registryAddress", authConfig.getRegistryAddress()).add("registryToken", obfuscated(authConfig.getRegistrytoken())).toString(); }
log.debug("found helper auth config [{}]", toSafeString(helperAuthConfig)); return helperAuthConfig; log.debug("found creds store auth config [{}]", toSafeString(storeAuthConfig)); return storeAuthConfig; log.debug("found existing auth config [{}]", toSafeString(existingAuthConfig)); return existingAuthConfig; log.debug("no matching Auth Configs - falling back to defaultAuthConfig [{}]", toSafeString(defaultAuthConfig));
public AuthConfig effectiveAuthConfig(String imageName) { // allow docker-java auth config to be used as a fallback AuthConfig fallbackAuthConfig; try { fallbackAuthConfig = delegate.effectiveAuthConfig(imageName); } catch (Exception e) { log.debug("Delegate call to effectiveAuthConfig failed with cause: \'{}\'. Resolution of auth config will continue using RegistryAuthLocator.", e.getMessage()); fallbackAuthConfig = new AuthConfig(); } // try and obtain more accurate auth config using our resolution final DockerImageName parsed = new DockerImageName(imageName); final AuthConfig effectiveAuthConfig = RegistryAuthLocator.instance().lookupAuthConfig(parsed, fallbackAuthConfig); log.debug("Effective auth config [{}]", toSafeString(effectiveAuthConfig)); return effectiveAuthConfig; }