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

Couldn't authorize OIDC with curl. #10563

Closed
KimMJ opened this issue Jan 22, 2020 · 1 comment
Closed

Couldn't authorize OIDC with curl. #10563

KimMJ opened this issue Jan 22, 2020 · 1 comment
Labels

Comments

@KimMJ
Copy link

KimMJ commented Jan 22, 2020

Hi. I tried to retagging some images in harbor repository.
I use OIDC in harbor and I have developer role in my repository.
So I read API spec and when I tested on API Explorer, it was succeed.
And then, I try to use cURL command to use API.

curl -X POST "https://<harbor url>/api/repositories/test/test/tags" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"override\": true, \"src_image\":\"test/test:123\", \"tag\": \"123-retaged\"}" --noproxy "*" --user <ID>:<CLI Secret>

then it produces error

{"code":401,"message":"UnAuthorize"}

NOTE: The CLI secret is associated with the OIDC ID token. Harbor will try to refresh the token, so the CLI secret will be valid after the ID token expires. However, if the OIDC Provider does not provide a refresh token or the refresh fails, the CLI secret becomes invalid. In this case, log out and log back in to Harbor via your OIDC provider so that Harbor can get a new ID token. The CLI secret will then work again.

So I also re-login into harbor but result is same.

Versions:

  • harbor version: [1.10.0]
@stale
Copy link

stale bot commented Apr 23, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Stale label Apr 23, 2020
@stale stale bot closed this as completed May 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant