Documentation ¶
Index ¶
- Constants
- func GetServicePrincipalTokenFromMSI(ctx context.Context, endpoint string) (*adal.ServicePrincipalToken, error)
- func InvokeSignFunction(publicKey *ssh.PublicKey, funcHost string, oauthConfig *oauth2.Config, ...) (*ssh.Certificate, error)
- type FunctionPayload
- type FunctionResponse
- type KeyVaultSigner
- type MSIResourceToken
Constants ¶
View Source
const KeyVaultRequestTimeout = 20 * time.Second
Timeout for all calls to Azure Key Vault
Variables ¶
This section is empty.
Functions ¶
func GetServicePrincipalTokenFromMSI ¶
func GetServicePrincipalTokenFromMSI(ctx context.Context, endpoint string) (*adal.ServicePrincipalToken, error)
GetServicePrincipalTokenFromMSI gets a standard Service Principal Token from a Managed Service Identity that's assigned to an Azure Function.
Types ¶
type FunctionPayload ¶
type FunctionPayload struct {
PublicKey string `json:"public_key"`
}
FunctionPayload is the payload structure for the Azure Function
type FunctionResponse ¶
type FunctionResponse struct {
Response string `json:"response"`
}
FunctionResponse is the structure for a response from the Azure Function
type KeyVaultSigner ¶
KeyVaultSigner an Azure Key Vault signer
func NewKeyVaultSigner ¶
func NewKeyVaultSigner(client *keyvault.BaseClient, keyVaultName string, key string) *KeyVaultSigner
NewKeyVaultSigner returns a new instance of a KeyVaultSigner
func (*KeyVaultSigner) Public ¶
func (s *KeyVaultSigner) Public() crypto.PublicKey
Public returns the PublicKey from an Azure Key Vault Key
func (*KeyVaultSigner) Sign ¶
func (s *KeyVaultSigner) Sign(rand io.Reader, digest []byte, opts crypto.SignerOpts) ([]byte, error)
Sign a digest with the private key in Azure Key Vault
type MSIResourceToken ¶
type MSIResourceToken struct { AccessToken string `json:"access_token"` ExpiresOn json.Number `json:"expires_on"` Resource string `json:"resource"` TokenType string `json:"token_type"` ClientID string `json:"client_id"` }
MSIResourceToken represents an Identity Token provided by an Azure Managed Service Identity
Click to show internal directories.
Click to hide internal directories.