azure

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProviderName          = "ad"
	ProviderDisplayName   = "Azure AD"
	ProviderConnectorType = "microsoft"
	TenantIDKey           = "tenant-id"
	ClientIDKey           = "client-id"
	ClientSecretKey       = "client-secret"
	PermissionType        = "Scope"
	DefaultName           = "giantswarm-dex"
	Claim                 = "groups"
	Audience              = "AzureADMyOrg"
	DexOperatorName       = "dex-operator"
)

Variables

This section is empty.

Functions

func GetAllAppsContainingRequestConfig added in v0.5.0

func GetAllAppsContainingRequestConfig(name string) *applications.ApplicationsRequestBuilderGetRequestConfiguration

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidcConfig asserts invalidConfigError.

func IsNotFound

func IsNotFound(err error) bool

IsNotFound asserts notFoundError.

func IsRequestFailed

func IsRequestFailed(err error) bool

IsRequestFailed asserts requestFailedError.

func PrintOdataError

func PrintOdataError(err error) string

func ProviderScope

func ProviderScope() []string

Types

type Azure

type Azure struct {
	Name        string
	Description string
	Client      *msgraphsdk.GraphServiceClient
	Log         *logr.Logger
	Owner       string
	TenantID    string
	Type        string
	// contains filtered or unexported fields
}

func New

func (*Azure) CleanCredentialsForAuthenticatedApp

func (a *Azure) CleanCredentialsForAuthenticatedApp(config provider.AppConfig) error

func (*Azure) CreateOrUpdateApp

func (a *Azure) CreateOrUpdateApp(config provider.AppConfig, ctx context.Context, oldConnector dex.Connector) (provider.ProviderApp, error)

func (*Azure) CreateOrUpdateSecret

func (a *Azure) CreateOrUpdateSecret(id string, config provider.AppConfig, ctx context.Context, oldSecret string, skipDelete bool) (provider.ProviderSecret, error)

func (*Azure) DeleteApp

func (a *Azure) DeleteApp(name string, ctx context.Context) error

func (*Azure) DeleteAuthenticatedApp added in v0.5.0

func (a *Azure) DeleteAuthenticatedApp(config provider.AppConfig) error

func (*Azure) DeleteSecret

func (a *Azure) DeleteSecret(ctx context.Context, secretID *uuid.UUID, appID string) error

func (*Azure) GetApp

func (a *Azure) GetApp(name string) (models.Applicationable, error)

func (*Azure) GetAppID

func (a *Azure) GetAppID(name string) (string, error)

func (*Azure) GetCredentialsForAuthenticatedApp

func (a *Azure) GetCredentialsForAuthenticatedApp(config provider.AppConfig) (map[string]string, error)

TODO improve output include new service principal creation

func (*Azure) GetName

func (a *Azure) GetName() string

func (*Azure) GetOwner

func (a *Azure) GetOwner() string

func (*Azure) GetProviderName

func (a *Azure) GetProviderName() string

func (*Azure) GetType

func (a *Azure) GetType() string

type Config

type Config struct {
	TenantID     string
	ClientID     string
	ClientSecret string
}

Jump to

Keyboard shortcuts

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