-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Migrate Identity Live tests deployment to Fed Auth. #42635
base: main
Are you sure you want to change the base?
Changes from 6 commits
d4356d4
402c03c
fc40de3
da2f6ee
3cd1232
e28ac1e
bd810b3
9672d4b
24df15f
0853563
ff9d5e1
7e9ffff
6d3fd72
e4daab6
9b9b203
15b0c57
9dd568c
1a63b29
074969a
5578c5e
fda32bb
d840be9
0bce75f
74bfc10
0fa2b06
839781c
4ec4dcf
7a1af04
9f3e0a9
d89d91c
7fc1c36
fbd0147
dfb7580
16bd8b0
786e940
af25b09
dea90b1
fa3caa0
e6dc78a
2c061d7
e079ac2
85d2a14
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,12 +71,29 @@ extends: | |
LiveTestStages: | ||
- template: /eng/pipelines/templates/stages/archetype-sdk-tests-isolated.yml | ||
parameters: | ||
PreSteps: | ||
- task: AzureCLI@2 | ||
displayName: Set OIDC variables | ||
env: | ||
ARM_OIDC_TOKEN: $(ARM_OIDC_TOKEN) | ||
ARM_CLIENT_ID: $(ARM_CLIENT_ID) | ||
ARM_TENANT_ID: $(ARM_TENANT_ID) | ||
inputs: | ||
azureSubscription: azure-sdk-tests | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See my other comment https://github.com/Azure/azure-sdk-for-java/pull/42635/files#r1819384979 but you should not need this PreStep and as it currently setup it will not work because we need to have the subscription match the deployment. |
||
scriptType: pscore | ||
scriptLocation: inlineScript | ||
addSpnToEnvironment: true | ||
inlineScript: | | ||
Write-Host "##vso[task.setvariable variable=ARM_CLIENT_ID;issecret=true]$($env:servicePrincipalId)" | ||
Write-Host "##vso[task.setvariable variable=ARM_TENANT_ID;issecret=true]$($env:tenantId)" | ||
Write-Host "##vso[task.setvariable variable=ARM_OIDC_TOKEN;issecret=true]$($env:idToken)" | ||
CalledFromClient: true | ||
ServiceDirectory: identity | ||
SupportedClouds: 'Public,UsGov,China' | ||
UseFederatedAuth: false | ||
EnvVars: | ||
SYSTEM_ACCESSTOKEN: $(System.AccessToken) | ||
ARM_OIDC_TOKEN: $(ARM_OIDC_TOKEN) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In order to get these variables I think you will need to plumb the PersistOidcToken token open similar to what @benbp is doing in js at Azure/azure-sdk-for-js#31335 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep, and we should revert usage of |
||
ARM_CLIENT_ID: $(ARM_CLIENT_ID) | ||
ARM_TENANT_ID: $(ARM_TENANT_ID) | ||
CloudConfig: | ||
Public: | ||
SubscriptionConfigurations: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You should remove There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does referencing There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't end up setting those variables so I had him switch to the ones we set for the azurepipelinecredential |
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to use this token at the running of the tests you will also need to set it as an env variable in the tests.yml file.