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

Support Azure OIDC testing #1127

Draft
wants to merge 65 commits into
base: main
Choose a base branch
from
Draft

Support Azure OIDC testing #1127

wants to merge 65 commits into from

Conversation

veochen-octopus
Copy link
Contributor

@veochen-octopus veochen-octopus commented Sep 13, 2023

This PR does 2 main things:

  • Adds the instance discovery endpoint so it can be tested from the server side.
  • Adds a mock test for the token exchange.

Also some minor code improvements I found along the way.

IsaacCalligeros95 and others added 30 commits August 31, 2023 14:34
Base automatically changed from isaac/azure-oidc-auth to master September 13, 2023 08:15
@veochen-octopus veochen-octopus changed the title OIDC test Support Azure OIDC testing Sep 22, 2023
@@ -44,7 +44,7 @@ function setup_context {

if [ -n $Octopus_Open_Id_Jwt ]
then
echo "Azure CLI: Authenticating with OpenID Connect Access Token"
echo "Azure CLI: Authenticating with OpenID Connect Federated Token"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing this to be consistent with the other messages.

Comment on lines +39 to +40
? await (account as AzureOidcAccount).GetAuthorizationToken(CancellationToken.None)
: await (account as AzureServicePrincipalAccount).GetAuthorizationToken();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simplifies the method calls. Also makes it easier for the discovery endpoint to travel downstream.

@veochen-octopus veochen-octopus marked this pull request as ready for review September 22, 2023 05:40
@veochen-octopus veochen-octopus marked this pull request as draft November 7, 2023 20:17
This reverts commit 6cbe7bc.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants