azure

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 18, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package azureauth provides Azure Workload Identity Federation for simrun. When an Azure connector is configured with WIF, simrun sets environment variables that allow the Azure SDK and Terraform azurerm provider to exchange a Kubernetes service account token for Azure credentials.

Index

Constants

View Source
const DefaultTokenFile = "/var/run/secrets/eks.amazonaws.com/serviceaccount/token"

DefaultTokenFile is the standard OIDC token path on EKS. Azure WIF uses the Kubernetes service account token projected by IRSA for federation.

Variables

This section is empty.

Functions

func CredentialEnvVars

func CredentialEnvVars(cfg WIFConfig) map[string]string

CredentialEnvVars returns the environment variables needed for both the Terraform azurerm provider and the Azure SDK to use workload identity federation.

func TestConnection

func TestConnection(ctx context.Context, cfg WIFConfig) error

TestConnection validates WIF credentials by requesting a token from Azure.

Types

type WIFConfig

type WIFConfig struct {
	TenantID       string `json:"tenant_id"`
	ClientID       string `json:"client_id"`
	SubscriptionID string `json:"subscription_id"`
	TokenFile      string `json:"token_file"` // defaults to DefaultTokenFile
}

WIFConfig holds the Azure Workload Identity Federation configuration.

func (WIFConfig) EffectiveTokenFile

func (c WIFConfig) EffectiveTokenFile() string

EffectiveTokenFile returns the token file path, falling back to the default.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL