Skip to content
This repository was archived by the owner on May 14, 2025. It is now read-only.

Colon (port) in docker registry URI brokes detection of WWW-Authorization URL in DockerConfigJsonSecretToRegistryConfigurationConverter #5111

Closed
Nirvandil opened this issue Oct 10, 2022 · 2 comments
Assignees
Labels
type/bug Is a bug report
Milestone

Comments

@Nirvandil
Copy link

Description:
Hi there.
I'm using scdf in k8s.
Having something like this in .dockerjson secret
{ "auths": { "registry.somedomain.com:5050": { "username": "kubernetes-puller", "password": "somePassword" } } }
leads to org.springframework.cloud.dataflow.container.registry.authorization.DockerConfigJsonSecretToRegistryConfigurationConverter#getDockerTokenServiceUri fail to detect right URL.
Especially, it passes registry.somedomain.com:5050 (with port!) as host variable to UriComponentsBuilder, so later it detected as IPv6 address in URI.java:
image
which leads to adding brackets to the URI and then (on build URI) throwing exception because it's invalid IPv6 address obviously. This exception then is swallowed here org/springframework/cloud/dataflow/container/registry/authorization/DockerConfigJsonSecretToRegistryConfigurationConverter.java:212 silently returning Optional.empty().
Release versions:
2.9.6
Steps to reproduce:
Just add custom docker registry with port in his address and see DockerConfigJsonSecretToRegistryConfigurationConverter detects it as basicauth instead of dockeroauth2

@github-actions github-actions bot added the status/need-triage Team needs to triage and take a first look label Oct 10, 2022
@Nirvandil Nirvandil changed the title Semicoln in docker registry brokes detection of WWW-Authorization URL in DockerConfigJsonSecretToRegistryConfigurationConverter Semicolon (port) in docker registry URI brokes detection of WWW-Authorization URL in DockerConfigJsonSecretToRegistryConfigurationConverter Oct 10, 2022
@Nirvandil Nirvandil changed the title Semicolon (port) in docker registry URI brokes detection of WWW-Authorization URL in DockerConfigJsonSecretToRegistryConfigurationConverter Colon (port) in docker registry URI brokes detection of WWW-Authorization URL in DockerConfigJsonSecretToRegistryConfigurationConverter Oct 11, 2022
@corneil corneil added type/bug Is a bug report status/need-investigation Oh need to look under a hood and removed status/need-triage Team needs to triage and take a first look labels Oct 19, 2022
@corneil
Copy link
Contributor

corneil commented Oct 19, 2022

@Nirvandil We've identified this is a bug and we will need to ensure the name is handled properly.

@corneil corneil added status/in-progress Something is happening and removed status/need-investigation Oh need to look under a hood labels Nov 4, 2022
@corneil corneil added this to the 2.10.0-RC2 milestone Nov 10, 2022
onobc pushed a commit that referenced this issue Nov 14, 2022
- Addresses docker uri that have colon in the port. 

See #5111
@onobc
Copy link
Contributor

onobc commented Nov 14, 2022

Closed via 167132d

@onobc onobc closed this as completed Nov 14, 2022
@onobc onobc removed the status/in-progress Something is happening label Nov 14, 2022
onobc pushed a commit that referenced this issue Nov 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/bug Is a bug report
Development

No branches or pull requests

3 participants