-
Notifications
You must be signed in to change notification settings - Fork 193
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update local tests and CI tests to use az login token or managed iden…
…tity, not service principal (#4003) * Update Taskfile to use az cli token rather than SP - Update az login step to use an interactive login, rather than an SP. Interactive login is good for 12 hours. - Remove SP-based kind cluster helpers and replace usages with workload-identity based. - Refactor make-mi-fic.sh to Python. This is required to manage the more limited permissions that an interactive token has with repsect to calling 'az role assignment list'. * HTTP Recording tests should use CLI or Env credentials Tested to ensure that az login allows tests to be re-recorded * Add unit tests with mocked azidentity calls The idea is that this will replace actual live testing of the various authentication modes. We trust that, if we call the azidentity SDK with the correct parameters, it does the correct thing. * Fix issue with credential format documentation We documented the AUTH_MODE: "workloadidentity" for workload identity, but in actuality the code doesn't require this be set for WI on any secret but the global secret. * Remove use of MULTITENANT secret Now using a dynamically created UserAssignedIdentity instead of a hardcoded static multitenant secret. There are two advantages here: 1. Less setup to run a test on a new subscription because fewer inputs to the CI job. 2. No static secrets that can possibly be leaked or compromised. * Use MSI for CI instead of service principal - Updated cipool BICEP to provision a managed identity and give it the required roles. - Updated Taskfile to support MSI-based az login when running in the context of a GitHub action. - Removed all reference to AZURE_CLIENT_ID and AZURE_CLIENT_SECRET from GitHub workflows. * Update documentation to be more clear about authentication mode Be explicit about which mode we're using in the various installation instructions, and provide links to the detailed authentication documentation so that users are more easily exposed to other authentication options (formats and scopes). Also update devcontainer raw cmdline to map azcli token into container to reduce number of required az logins * Fix docs
- Loading branch information
Showing
34 changed files
with
953 additions
and
448 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.