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

Add experimental feature to AzureCLIV2 which keeps the session running in the background in the case of ARM service connections with workload identity federation scheme #19989

Merged
merged 13 commits into from
Jun 12, 2024

Conversation

kboom
Copy link
Collaborator

@kboom kboom commented Jun 12, 2024

Task name: AzureCLIV2

Description: Today, any attempts made to get the access token for a different resource than originally will fail with the Entra error AADSTS700024 after the IdToken expires, which is after 10 minutes. The same happens 60 minutes after the issuance date of the original access token, when it expires, and we cannot refresh. This change is a tactical solution to this problem that is to be used until az-cli supports this internally. This is an EXPERIMENTAL feature which means we provide no guarantees and no support for it. That said, it should work well for 99.9% of the cases. Please note that this feature can be removed at any point in time, particularly when az-cli delivers the long-term solution to this problem.

To activate the feature, provide a new input called keepAzSessionActive and set it to true. This change is no-op if you don't provide this input.

image

Documentation changes required: Y

Added unit tests: N

Attached related issue: N

Checklist:

  • Task version was bumped - please check instruction how to do it
  • Checked that applied changes work as expected

Before

image

After

image

Grzegorz Gurgul (from Dev Box) added 2 commits June 12, 2024 08:25
@kboom kboom requested review from manolerazvan and a team as code owners June 12, 2024 06:34
@kboom kboom enabled auto-merge (squash) June 12, 2024 10:52
@kboom
Copy link
Collaborator Author

kboom commented Jun 12, 2024

/azp run

Copy link

Azure Pipelines failed to run 3 pipeline(s).

@kboom
Copy link
Collaborator Author

kboom commented Jun 12, 2024

/azp run

Copy link

Azure Pipelines failed to run 3 pipeline(s).

@kboom kboom merged commit aacf013 into master Jun 12, 2024
11 checks passed
@kboom kboom deleted the users/ggurgul/azclisession branch June 12, 2024 14:34
@tobimax
Copy link

tobimax commented Dec 7, 2024

Does a similar option exist for AzurePowerShell@5, or is it planned?

@geekzter
Copy link
Member

geekzter commented Dec 9, 2024

@tobimax This is AzureCLI@2 and experimental only. We hope address this in a different way but have no timelime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants