Authenticating from CI/CD when using OIDC + Azure AD #6039
-
Hello, Running Apicurio Registry and UI v3.0.4 What are the options for a CI/CD job, e.g. Jenkins, to authenticate when the registry is set up to use Azure AD via OIDC? I have seen that:
We have implemented the readonly, developer and admin roles and users log in via the browser using their Azure AD accounts. What are our options to authenticate a script running on CI in this scenario? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Hi, You can read https://www.apicur.io/blog/2024/09/23/registry-azure-entraid-tutorial for creating a second azure app for machine-to-machine. It has helped me a lot. Then you can with a curl obtain a token and interact with the API :
And you can then interact with the API using an "Authorization" header |
Beta Was this translation helpful? Give feedback.
-
Thank you @seb2020. I have implemented the following to make it work:
|
Beta Was this translation helpful? Give feedback.
-
hey @jurajseffer @seb2020 i see that you are also familliar / setting up apicurio for your use case, i have a quick question and i would appreciate your thoughts:
Question: we have multiple teams and each team wants to only manage / see there own schemas, and since we only have the 3 default roles to use however as a next step i'm aiming to try the feature that state that only the creator can have access to the artifacts.. it may works but yeah not sure.. |
Beta Was this translation helpful? Give feedback.
Hi,
You can read https://www.apicur.io/blog/2024/09/23/registry-azure-entraid-tutorial for creating a second azure app for machine-to-machine. It has helped me a lot.
Then you can with a curl obtain a token and interact with the API :
curl --request POST \ --url https://login.microsoftonline.com/<id>/oauth2/v2.0/token \ --header 'content-type: application/x-www-form-urlencoded' \ --data client_id=<client_id> \ --data 'client_secret=<client_secret>' \ --data grant_type=client_credentials \ --data scope=<app>/.default
And you can then interact with the API using an "Authorization" header