spring-cloud-dataflow icon indicating copy to clipboard operation
spring-cloud-dataflow copied to clipboard

Lookup of docker ApplicationConfigurationMetadataResolver from Azure Container Registry with dockeroauth2

Open aphethean1 opened this issue 3 years ago • 3 comments

Problem description:

Lookup of docker ApplicationConfigurationMetadataResolver from Azure Container Registry doesn’t work with dockerauth2

This configuration almost works, but the response from the token request has an ‘access_token’ property in the response payload. Whereas the DockerOAuth2RegistryAuthorizer expects a token key response with a ‘token’ property.

As reported in issue 4412 basicauth doesn't currently work with Azure container registries.

Solution description:

Support for dockeroauth2 with Azure Container Registry configuring a property to control the token property i.e. access_token for azure.

spring.cloud.dataflow.container.registry-configurations[azurecr].authorization-type=dockeroauth2 spring.cloud.dataflow.container.registry-configurations[azurecr].oauth2-token-response-property=access_token

Or with environment variables

export SPRING_CLOUD_DATAFLOW_CONTAINER_REGISTRY-CONFIGURATIONS_AZURECR__AUTHORIZATION-TYPE=dockeroauth2 export SPRING_CLOUD_DATAFLOW_CONTAINER_REGISTRY-CONFIGURATIONS_AZURECR__OAUTH2_TOKEN_RESPONSE_PROPERTY=access_token

Description of alternatives:

According to the documentation (https://dataflow.spring.io/docs/2.6.x/feature-guides/general/application-metadata/#using-metadata-container-image-labels), basicauth authorization type can be used to lookup this metadata from Azure Container Registry. As reported in issue 4412 this doesn't currently work.

Additional context: None.

aphethean1 avatar Feb 27 '21 10:02 aphethean1

Once when we get some validation on https://github.com/spring-cloud/spring-cloud-dataflow/issues/4412, we can jump at this one, as well.

sabbyanandan avatar Mar 29 '21 15:03 sabbyanandan

@tzolov: thoughts?

sabbyanandan avatar Oct 19 '21 22:10 sabbyanandan

Have a look at https://github.com/spring-cloud/spring-cloud-dataflow/issues/4412 , which is closed to see if it is related.

markpollack avatar Sep 20 '22 15:09 markpollack