-
Notifications
You must be signed in to change notification settings - Fork 10
MS Entra Workload Identities implementation #39
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
MS Entra Workload Identities implementation #39
Conversation
config/config_test.go
Outdated
|
||
require.True(t, cfg.UseEphemeralStorage, "UseEphemeralStorage is not as expected") | ||
require.Equal(t, "10.10.0.0/24", cfg.VirtualNetworkCIDR, "VirtualNetworkCIDR is not as expected") | ||
require.Equal(t, "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-Network/providers/Microsoft.Network/virtualNetworks/vnet-Default/subnets/snet-default", cfg.VnetSubnetID, "VnetSubnetID is not as expected") | ||
require.True(t, cfg.UseAcceleratedNetworking, "UseAcceleratedNetworking is not as expected") | ||
require.True(t, cfg.DisableIsolatedNetworks, "DisableIsolatedNetworks is not as expected") | ||
} | ||
|
||
func TestAbsentTokenFile(t *testing.T) { | ||
mockData := ` |
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 it's easier, you can actually use the file in the testdata
folder. That config.toml
serves as an example, but also as a valid test config file. You can also add more config.toml
files with various settings for testing.
More details on using testdata
: https://tutorialedge.net/golang/advanced-go-testing-tutorial/#use-the-testdata-directory
TenantID string `toml:"tenant_id"` | ||
ClientID string `toml:"client_id"` | ||
FederatedTokenFile string `toml:"federated_token_file"` | ||
// AuthorityHost is not handled yet. |
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 we don't need this now, we can just remove the commented code and add it later.
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.
This is great. Thanks!
This PR introduces ability to authenticate over Azure using Workload Identity workflow.
This workflow is needed for example if garm is deployed inside an AKS (Azure managed kubernetes cluster), where a User Assigned identity or a System managed identity cannot be used.