In #GitLab, you don't need to request a GitLab-issued token from some token endpoint. Instead, you just specify in your id_tokens
section that you want a token for a certain audience, and GitLab hosts the #JWT token in the environment variable you specify.
In this example, GitLab issues a token for the audience api://AzureADTokenExchange
and makes it available in the environment variable ID_TOKEN_FOR_AZURE
.
Demo how to access an Azure resource, in this example read a secret from KeyVault (az keyvault secret show
).