azureclient

package
v0.0.0-...-37f2402 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 11 Imported by: 26

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// PublicCloud contains additional ARO information for the public Azure cloud environment.
	PublicCloud = AROEnvironment{
		Environment:              azure.PublicCloud,
		ActualCloudName:          "AzureCloud",
		GenevaMonitoringEndpoint: "https://gcs.prod.monitoring.core.windows.net/",
		AppSuffix:                "aro.azure.com",
		AppLensEndpoint:          "https://diag-runtimehost-prod.trafficmanager.net/api/invoke",
		AppLensScope:             "0d7b6142-46a3-426a-ad6d-eed97c2a48ee",
		AppLensTenantID:          "33e01921-4d64-4f8c-a055-5bdaffd5e33d",
		PkiIssuerUrlTemplate:     "https://issuer.pki.azure.com/dsms/issuercertificates?getissuersv3&caName=%s",
		PkiCaName:                "ame",
		Cloud:                    cloud.AzurePublic,
		AzureRbacPDPEnvironment: AzureRbacPDPEnvironment{
			Endpoint:   "https://%s.authorization.azure.net/providers/Microsoft.Authorization/checkAccess?api-version=2021-06-01-preview",
			OAuthScope: "https://authorization.azure.net/.default",
		},
		ResourceManagerScope: azure.PublicCloud.ResourceManagerEndpoint + "/.default",
		KeyVaultScope:        azure.PublicCloud.ResourceIdentifiers.KeyVault + "/.default",
		MicrosoftGraphScope:  azure.PublicCloud.MicrosoftGraphEndpoint + "/.default",
	}

	// USGovernmentCloud contains additional ARO information for the US Gov cloud environment.
	USGovernmentCloud = AROEnvironment{
		Environment:              azure.USGovernmentCloud,
		ActualCloudName:          "AzureUSGovernment",
		GenevaMonitoringEndpoint: "https://gcs.monitoring.core.usgovcloudapi.net/",
		AppSuffix:                "aro.azure.us",
		AppLensEndpoint:          "https://diag-runtimehost-prod-bn1-001.azurewebsites.us/api/invoke",
		AppLensScope:             "https://microsoft.onmicrosoft.com/runtimehost",
		AppLensTenantID:          "cab8a31a-1906-4287-a0d8-4eef66b95f6e",
		Cloud:                    cloud.AzureGovernment,

		PkiIssuerUrlTemplate: "",
		PkiCaName:            "",
		AzureRbacPDPEnvironment: AzureRbacPDPEnvironment{
			Endpoint:   "https://%s.authorization.azure.us/providers/Microsoft.Authorization/checkAccess?api-version=2021-06-01-preview",
			OAuthScope: "https://authorization.azure.us/.default",
		},
		ResourceManagerScope: azure.USGovernmentCloud.ResourceManagerEndpoint + "/.default",
		KeyVaultScope:        azure.USGovernmentCloud.ResourceIdentifiers.KeyVault + "/.default",
		MicrosoftGraphScope:  azure.USGovernmentCloud.MicrosoftGraphEndpoint + "/.default",
	}
)

Functions

func APIVersion

func APIVersion(typ string) string

APIVersion gets the APIVersion from a full resource type

Types

type AROEnvironment

type AROEnvironment struct {
	azure.Environment
	ActualCloudName          string
	GenevaMonitoringEndpoint string
	AppSuffix                string
	AppLensEndpoint          string
	AppLensScope             string
	AppLensTenantID          string
	PkiIssuerUrlTemplate     string
	PkiCaName                string
	AuthzRemotePDPEndPoint   string
	AzureRbacPDPEnvironment
	Cloud cloud.Configuration
	// Microsoft identity platform scopes used by ARO
	// See https://learn.microsoft.com/EN-US/azure/active-directory/develop/scopes-oidc#the-default-scope
	ResourceManagerScope string
	KeyVaultScope        string
	MicrosoftGraphScope  string
}

AROEnvironment contains additional, cloud-specific information needed by ARO.

func EnvironmentFromName

func EnvironmentFromName(name string) (AROEnvironment, error)

EnvironmentFromName returns the AROEnvironment corresponding to the common name specified.

func (*AROEnvironment) ClientCertificateCredentialOptions

func (e *AROEnvironment) ClientCertificateCredentialOptions() *azidentity.ClientCertificateCredentialOptions

func (*AROEnvironment) ClientSecretCredentialOptions

func (e *AROEnvironment) ClientSecretCredentialOptions() *azidentity.ClientSecretCredentialOptions

func (*AROEnvironment) DefaultAzureCredentialOptions

func (e *AROEnvironment) DefaultAzureCredentialOptions() *azidentity.DefaultAzureCredentialOptions

func (*AROEnvironment) EnvironmentCredentialOptions

func (e *AROEnvironment) EnvironmentCredentialOptions() *azidentity.EnvironmentCredentialOptions

func (*AROEnvironment) ManagedIdentityCredentialOptions

func (e *AROEnvironment) ManagedIdentityCredentialOptions() *azidentity.ManagedIdentityCredentialOptions

func (*AROEnvironment) NewGraphServiceClient

func (e *AROEnvironment) NewGraphServiceClient(tokenCredential azcore.TokenCredential) (*utilgraph.GraphServiceClient, error)

type AzureRbacPDPEnvironment

type AzureRbacPDPEnvironment struct {
	Endpoint   string
	OAuthScope string
}

AzureRbacPDPEnvironment contains cloud specific instance of Authz RBAC PDP Remote Server

type LoggingSender

type LoggingSender struct {
	autorest.Sender
}

LoggingSender intercepts requests and logs them out. Usage: client.Sender = &LoggingSender{client.Sender}

func (*LoggingSender) Do

func (ls *LoggingSender) Do(req *http.Request) (*http.Response, error)

Jump to

Keyboard shortcuts

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