Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document authentication via environment variables #486

Closed
baronfel opened this issue Jul 31, 2023 · 2 comments · Fixed by #489
Closed

Document authentication via environment variables #486

baronfel opened this issue Jul 31, 2023 · 2 comments · Fixed by #489
Assignees
Labels
documentation Improvements or additions to documentation
Milestone

Comments

@baronfel
Copy link
Member

In #484 @richlander used these environment variables to enable a novel use case for our tooling: containerizing and pushing an application that was AOT'd inside the SDK container.

In such a container, users can't just volume mount their Docker config.json if they're using a credential helper - that helper may not be usable inside the container. So the only viable config mechanism is the hard-coded auths in config.json, which aren't great or easy to tool around.

We should instead document the existing env vars (SDK_CONTAINER_REGISTRY_UNAME and SDK_CONTAINER_REGISTRY_PWORD) for this use case and others.

@baronfel baronfel self-assigned this Jul 31, 2023
@baronfel baronfel added the documentation Improvements or additions to documentation label Jul 31, 2023
@baronfel baronfel added this to the 8.0.100 milestone Jul 31, 2023
@alexeyzimarev
Copy link

Maybe it would be clearer after the docs are updated, but how would it work with credentials providers? Like when the username is _json_key?

@baronfel
Copy link
Member Author

It basically doesn't - this environment variable mechanism was specifically created to make it easier for Visual Studio to pass credentials to the container tooling, because VS at the time could authenticate to Azure Container Registry in ways that this tooling couldn't. We've closed that gap now so the original reason for the escape hatch is less valid.

Separately, this escape hatch is flawed in that it applies the same username/password information to both the source registry and the destination registry - tools like Jib that explicitly designed for this use case have separate settings for each end of the pipeline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants