azad

package
v0.7.2 Latest Latest
Warning

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

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

README

Hexa

Azure - Graph Client Package

This package is used by the azureProvider to make calls to the Azure Graph API.

It implements the following interface:

type AzureClient interface {
	GetAzureApplications(key []byte) ([]AzureWebApp, error)
	GetWebApplications(key []byte) ([]policyprovider.ApplicationInfo, error)
	GetServicePrincipals(key []byte, appId string) (AzureServicePrincipals, error)
	GetUserInfoFromPrincipalId(key []byte, principalId string) (AzureUser, error)
	GetPrincipalIdFromEmail(key []byte, email string) (string, error)
	GetAppRoleAssignedTo(key []byte, servicePrincipalId string) (AzureAppRoleAssignments, error)
	SetAppRoleAssignedTo(key []byte, servicePrincipalId string, assignments []AzureAppRoleAssignment) error
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AzureAccessToken added in v0.6.2

type AzureAccessToken struct {
	Token string `json:"access_token"`
}

type AzureAppRole added in v0.6.2

type AzureAppRole struct {
	AllowedMemberTypes []string `json:"allowedMemberTypes"`
	Description        string   `json:"description"`
	DisplayName        string   `json:"displayName"`
	ID                 string   `json:"id"`
	IsEnabled          bool     `json:"isEnabled"`
	Origin             string   `json:"origin"`
	Value              string   `json:"value"`
}

type AzureAppRoleAssignment added in v0.6.2

type AzureAppRoleAssignment struct {
	ID                   string `json:"id"`
	AppRoleId            string `json:"appRoleId" validate:"required"`
	PrincipalDisplayName string `json:"principalDisplayName"`
	PrincipalId          string `json:"principalId"`
	PrincipalType        string `json:"principalType"`
	ResourceDisplayName  string `json:"resourceDisplayName"`
	ResourceId           string `json:"resourceId" validate:"required"`
}

type AzureAppRoleAssignments added in v0.6.2

type AzureAppRoleAssignments struct {
	List []AzureAppRoleAssignment `json:"value"`
}

type AzureClient added in v0.6.2

type AzureClient interface {
	GetAzureApplications(key []byte) ([]AzureWebApp, error)
	GetWebApplications(key []byte) ([]policyprovider.ApplicationInfo, error)
	GetServicePrincipals(key []byte, appId string) (AzureServicePrincipals, error)
	GetUserInfoFromPrincipalId(key []byte, principalId string) (AzureUser, error)
	GetPrincipalIdFromEmail(key []byte, email string) (string, error)
	GetAppRoleAssignedTo(key []byte, servicePrincipalId string) (AzureAppRoleAssignments, error)
	SetAppRoleAssignedTo(key []byte, servicePrincipalId string, assignments []AzureAppRoleAssignment) error
}

func NewAzureClient added in v0.6.2

func NewAzureClient(httpClient azurecommon.HTTPClient) AzureClient

type AzureServicePrincipals added in v0.6.2

type AzureServicePrincipals struct {
	List []azureServicePrincipal `json:"value"`
}

type AzureUser added in v0.6.2

type AzureUser struct {
	PrincipalId string `json:"id"`
	Name        string `json:"userPrincipalName"`
	Email       string `json:"mail"`
}

type AzureUsers added in v0.6.2

type AzureUsers struct {
	List []AzureUser `json:"value"`
}

type AzureWebApp added in v0.6.2

type AzureWebApp struct {
	ID             string       `json:"id"`
	AppID          string       `json:"appId"`
	Name           string       `json:"displayName"`
	IdentifierUris []string     `json:"identifierUris"`
	Web            azureWebInfo `json:"web"`
}

Jump to

Keyboard shortcuts

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