-
Notifications
You must be signed in to change notification settings - Fork 10
feat: add auth package #219
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
Merged
Merged
Conversation
This file contains hidden or 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
Bumps the go_modules group with 1 update in the / directory: [github.com/ulikunitz/xz](https://github.com/ulikunitz/xz). Updates `github.com/ulikunitz/xz` from 0.5.12 to 0.5.14 - [Commits](ulikunitz/xz@v0.5.12...v0.5.14) --- updated-dependencies: - dependency-name: github.com/ulikunitz/xz dependency-version: 0.5.14 dependency-type: indirect dependency-group: go_modules ... Signed-off-by: dependabot[bot] <support@github.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main Azure/alzlib#219 +/- ##
==========================================
- Coverage 45.46% 45.07% -0.39%
==========================================
Files 48 49 +1
Lines 4342 4417 +75
==========================================
+ Hits 1974 1991 +17
- Misses 2129 2187 +58
Partials 239 239 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
jtracey93
approved these changes
Sep 3, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes Azure/Azure-Landing-Zones#1492
This pull request introduces a new internal authentication helper package, refactors all authentication logic to use this new helper, and adds tests and documentation for it. Additionally, it updates the Go version, modifies CI to support 32-bit builds, and adjusts build targets.
Authentication Refactor and Improvements
internal/authwith a helper functionNewToken()to create Azure credentials using well-known Azure/Terraform environment variables and conventions. This centralizes and simplifies authentication logic for the entire codebase. [1] [2]azidentity.NewDefaultAzureCredentialwith the newauth.NewToken()helper throughout the codebase and tests, ensuring consistent and maintainable authentication handling. [1] [2] [3] [4] [5] [6] [7] [8] [9]Testing and Documentation
internal/auth/auth_test.go) to ensure correct environment variable parsing and logic.internal/auth/doc.go) explaining usage, supported environment variables, and behavior of the new authentication helper.Build and CI Enhancements
go.modto 1.25.0 and added a dependency ongithub.com/Azure/entrauth..github/workflows/go-test.yml) and excluded unsupported build targets in.goreleaser.yml. [1] [2]Imports and Code Cleanup
internal/authpackage instead of importingazidentitydirectly. [1] [2] [3] [4] [5] [6]These changes collectively improve maintainability, testability, and CI support for the project.