workloadidentity

package
v1.38.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AzureServicePrincipalHelper

type AzureServicePrincipalHelper struct {
	// contains filtered or unexported fields
}

func NewAzureServicePrincipalHelper

func NewAzureServicePrincipalHelper(credential azcore.TokenCredential) (*AzureServicePrincipalHelper, error)

func (*AzureServicePrincipalHelper) GetServicePrincipal

func (g *AzureServicePrincipalHelper) GetServicePrincipal(ctx context.Context, clientId string) (*ServicePrincipal, error)

GetServicePrincipalDetails resolves a service principal appId and fetches the backing resource details as either a managed identity or app registration.

type FederatedCredential

type FederatedCredential struct {
	Name      string   `json:"name"`
	Issuer    string   `json:"issuer"`
	Subject   string   `json:"subject"`
	Audiences []string `json:"audiences"`
}

type ServicePrincipal

type ServicePrincipal struct {
	ClientID             string                `json:"clientID"`
	Type                 ServicePrincipalType  `json:"type"`
	DisplayName          string                `json:"displayName"`
	SubscriptionID       string                `json:"subscriptionID,omitempty"`
	ResourceGroup        string                `json:"resourceGroup,omitempty"`
	FederatedCredentials []FederatedCredential `json:"existingFederatedCredentials"`
}

type ServicePrincipalType

type ServicePrincipalType string
const (
	ManagedIdentity ServicePrincipalType = "managed-identity"
	AppRegistration ServicePrincipalType = "app-registration"
)

Jump to

Keyboard shortcuts

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