-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Disable CSRF check for "/c/oidc/onboard" API for authenticating and Onboarding a User via API from Custom CLI #16966
Comments
… and Onboarding a User via API from Custom CLI Closes goharbor#16966
… and Onboarding a User via API from Custom CLI Closes goharbor#16966 Fixes goharbor#16966 Signed-off-by: Pratik Raj <[email protected]>
… and Onboarding a User via API from Custom CLI Closes goharbor#16966 Fixes goharbor#16966 Signed-off-by: Pratik Raj <[email protected]>
This issue is being marked stale due to a period of inactivity. If this issue is still relevant, please comment or remove the stale label. Otherwise, this issue will close in 30 days. |
@ywk253100 @wy65701436 @stonezdj @zyyw @daixiang0 @heww can we address this issue and fix at #16969 |
This issue is being marked stale due to a period of inactivity. If this issue is still relevant, please comment or remove the stale label. Otherwise, this issue will close in 30 days. |
This issue was closed because it has been stalled for 30 days with no activity. If this issue is still relevant, please re-open a new issue. |
This issue is being marked stale due to a period of inactivity. If this issue is still relevant, please comment or remove the stale label. Otherwise, this issue will close in 30 days. |
… and Onboarding a User via API from Custom CLI Closes goharbor#16966 Fixes goharbor#16966 Signed-off-by: Pratik Raj <[email protected]>
This issue was closed because it has been stalled for 30 days with no activity. If this issue is still relevant, please re-open a new issue. |
We are facing an issue when we are trying to onboard the OIDC user in the harbor via API.
https://goharbor.io/docs/edge/administration/configure-authentication/oidc-auth/
Via UI it works perfectly fine.
The same functionality is not working via the API. Getting CSRF error.
As per online research CSRF is only checked when you do activity via browser i.e. where there is some sessions.
Issue is only with this particular API. Other APIs are working fine.
Without onboarding an OIDC user we won’t be able to set secret and therefore docker login will not work.
curl -X 'POST' 'https://xxxx-registry-xxxx-xxx.xxxxxx.com/c/oidc/onboard' \ -H 'Content-Type: application/json' \ -H 'Authorization: Basic YWRtaW46cXNlYSvhcnRpZmFjdG9yeS1hZG1pbg==' \ -d '{"username": [email protected] }'
{"errors":[{"code":"FORBIDDEN","message":"CSRF token invalid"}]}
The text was updated successfully, but these errors were encountered: