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

FR: oci_pull support identity tokens #129

Closed
thesayyn opened this issue Mar 29, 2023 · 5 comments
Closed

FR: oci_pull support identity tokens #129

thesayyn opened this issue Mar 29, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@thesayyn
Copy link
Collaborator

credHelper response with {"Username": "<token>"} should be handled differently.

See moby/moby#36926

@thesayyn thesayyn added the enhancement New feature or request label Dec 12, 2023
@wingsofovnia
Copy link

Any updates? Is there any priority assigned to this issue or perhaps there are blockers?

@thesayyn
Copy link
Collaborator Author

No, PRs are welcome.

@BradHolmes
Copy link

BradHolmes commented Jun 3, 2024

This small change in authn.bzl coupled with a custom credential-helper got things working for me. Anything else needed?

     if response["Username"] == "<token>":
-        fail("Identity tokens are not supported at the moment. See: https://github.com/bazel-contrib/rules_oci/issues/129")
+        return {
+            "type": "pattern",
+            "pattern": "Bearer <password>",
+            "password": response["Secret"],
+        }

I don't really have a good idea about adding an example or test though.

@wingsofovnia
Copy link

Should be fixed by #626

@thesayyn
Copy link
Collaborator Author

Closing as fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants