Ashish
Ashish

Reputation: 188

Harbor Onboard oidc user via API

We are facing the issue while doing onboarding of a oidc user via API. We are calling the same API which called from the UI when we do the same activity from UI.

/c/oidc/onboard

Api is always throwing csrf error. Other APis working fine. We are using admin credential in basic auth in api invokation. After onboarding there will be another application which will be using access token of the onboard user. But we are stuck at onboard.

Upvotes: 0

Views: 796

Answers (1)

Vad1mo
Vad1mo

Reputation: 5543

A CSRF token is a unique, secret, unpredictable value created by the server-side application and transmitted to the client for subsequent HTTP request made by the client application. The server-side application validates the CSRF token in the subsequence request, and rejects the request if the token is missing or invalid.

So make sure that when you send the request to Harbor you send also the CSRF token.

Upvotes: 0

Related Questions