spring-cloud-dataflow
spring-cloud-dataflow copied to clipboard
Lookup of docker ApplicationConfigurationMetadataResolver from Azure Container Registry with dockeroauth2
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.
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.
@tzolov: thoughts?
Have a look at https://github.com/spring-cloud/spring-cloud-dataflow/issues/4412 , which is closed to see if it is related.