attestation

package
v55.3.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package attestation implements the Azure ARM Attestation service API version 2018-09-01-preview.

Describes the interface for the per-tenant enclave service.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UserAgent

func UserAgent() string

UserAgent returns the UserAgent string to use when sending http.Requests.

func Version

func Version() string

Version returns the semantic version (see http://semver.org) of the client.

Types

type BaseClient

type BaseClient struct {
	autorest.Client
}

BaseClient is the base client for Attestation.

func New

func New() BaseClient

New creates an instance of the BaseClient client.

func NewWithoutDefaults

func NewWithoutDefaults() BaseClient

NewWithoutDefaults creates an instance of the BaseClient client.

type CloudError

type CloudError struct {
	Error *CloudErrorBody `json:"error,omitempty"`
}

CloudError an error response from Attestation.

type CloudErrorBody

type CloudErrorBody struct {
	// Code - An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
	Code *string `json:"code,omitempty"`
	// Message - A message describing the error, intended to be suitable for displaying in a user interface.
	Message *string `json:"message,omitempty"`
}

CloudErrorBody an error response from Attestation.

type MetadataConfigurationClient

type MetadataConfigurationClient struct {
	BaseClient
}

MetadataConfigurationClient is the describes the interface for the per-tenant enclave service.

func NewMetadataConfigurationClient

func NewMetadataConfigurationClient() MetadataConfigurationClient

NewMetadataConfigurationClient creates an instance of the MetadataConfigurationClient client.

func (MetadataConfigurationClient) Get

func (client MetadataConfigurationClient) Get(ctx context.Context, tenantBaseURL string) (result SetObject, err error)

Get retrieves metadata about the attestation signing keys in use by the attestation service Parameters: tenantBaseURL - the tenant name, for example https://mytenant.attest.azure.net.

func (MetadataConfigurationClient) GetPreparer

func (client MetadataConfigurationClient) GetPreparer(ctx context.Context, tenantBaseURL string) (*http.Request, error)

GetPreparer prepares the Get request.

func (MetadataConfigurationClient) GetResponder

func (client MetadataConfigurationClient) GetResponder(resp *http.Response) (result SetObject, err error)

GetResponder handles the response to the Get request. The method always closes the http.Response Body.

func (MetadataConfigurationClient) GetSender

func (client MetadataConfigurationClient) GetSender(req *http.Request) (*http.Response, error)

GetSender sends the Get request. The method will close the http.Response Body if it receives an error.

type Policy

type Policy struct {
	// Policy - JSON Web Token whose body is an AttestationPolicyRequest definition.
	Policy *string `json:"policy,omitempty"`
}

Policy ...

type PolicyCertificatesClient

type PolicyCertificatesClient struct {
	BaseClient
}

PolicyCertificatesClient is the describes the interface for the per-tenant enclave service.

func NewPolicyCertificatesClient

func NewPolicyCertificatesClient() PolicyCertificatesClient

NewPolicyCertificatesClient creates an instance of the PolicyCertificatesClient client.

func (PolicyCertificatesClient) Add

func (client PolicyCertificatesClient) Add(ctx context.Context, tenantBaseURL string, policyCertificateToAdd string) (result SetObject, err error)

Add sends the add request. Parameters: tenantBaseURL - the tenant name, for example https://mytenant.attest.azure.net. policyCertificateToAdd - an RFC7519 JSON Web Token containing a claim named "maa-policyCertificate" whose value is an RFC7517 JSON Web Key which specifies a new key to add. The RFC7519 JWT must be signed with one of the existing signing certificates

func (PolicyCertificatesClient) AddPreparer

func (client PolicyCertificatesClient) AddPreparer(ctx context.Context, tenantBaseURL string, policyCertificateToAdd string) (*http.Request, error)

AddPreparer prepares the Add request.

func (PolicyCertificatesClient) AddResponder

func (client PolicyCertificatesClient) AddResponder(resp *http.Response) (result SetObject, err error)

AddResponder handles the response to the Add request. The method always closes the http.Response Body.

func (PolicyCertificatesClient) AddSender

func (client PolicyCertificatesClient) AddSender(req *http.Request) (*http.Response, error)

AddSender sends the Add request. The method will close the http.Response Body if it receives an error.

func (PolicyCertificatesClient) Get

func (client PolicyCertificatesClient) Get(ctx context.Context, tenantBaseURL string) (result SetObject, err error)

Get sends the get request. Parameters: tenantBaseURL - the tenant name, for example https://mytenant.attest.azure.net.

func (PolicyCertificatesClient) GetPreparer

func (client PolicyCertificatesClient) GetPreparer(ctx context.Context, tenantBaseURL string) (*http.Request, error)

GetPreparer prepares the Get request.

func (PolicyCertificatesClient) GetResponder

func (client PolicyCertificatesClient) GetResponder(resp *http.Response) (result SetObject, err error)

GetResponder handles the response to the Get request. The method always closes the http.Response Body.

func (PolicyCertificatesClient) GetSender

func (client PolicyCertificatesClient) GetSender(req *http.Request) (*http.Response, error)

GetSender sends the Get request. The method will close the http.Response Body if it receives an error.

func (PolicyCertificatesClient) Remove

func (client PolicyCertificatesClient) Remove(ctx context.Context, tenantBaseURL string, policyCertificateToRemove string) (result SetObject, err error)

Remove sends the remove request. Parameters: tenantBaseURL - the tenant name, for example https://mytenant.attest.azure.net. policyCertificateToRemove - an RFC7519 JSON Web Token containing a claim named "maa-policyCertificate" whose value is an RFC7517 JSON Web Key which specifies a new key to update. The RFC7519 JWT must be signed with one of the existing signing certificates

func (PolicyCertificatesClient) RemovePreparer

func (client PolicyCertificatesClient) RemovePreparer(ctx context.Context, tenantBaseURL string, policyCertificateToRemove string) (*http.Request, error)

RemovePreparer prepares the Remove request.

func (PolicyCertificatesClient) RemoveResponder

func (client PolicyCertificatesClient) RemoveResponder(resp *http.Response) (result SetObject, err error)

RemoveResponder handles the response to the Remove request. The method always closes the http.Response Body.

func (PolicyCertificatesClient) RemoveSender

func (client PolicyCertificatesClient) RemoveSender(req *http.Request) (*http.Response, error)

RemoveSender sends the Remove request. The method will close the http.Response Body if it receives an error.

type PolicyClient

type PolicyClient struct {
	BaseClient
}

PolicyClient is the describes the interface for the per-tenant enclave service.

func NewPolicyClient

func NewPolicyClient() PolicyClient

NewPolicyClient creates an instance of the PolicyClient client.

func (PolicyClient) Get

func (client PolicyClient) Get(ctx context.Context, tenantBaseURL string, tee TeeKind) (result SetObject, err error)

Get sends the get request. Parameters: tenantBaseURL - the tenant name, for example https://mytenant.attest.azure.net. tee - specifies the trusted execution environment to be used to validate the evidence

func (PolicyClient) GetPreparer

func (client PolicyClient) GetPreparer(ctx context.Context, tenantBaseURL string, tee TeeKind) (*http.Request, error)

GetPreparer prepares the Get request.

func (PolicyClient) GetResponder

func (client PolicyClient) GetResponder(resp *http.Response) (result SetObject, err error)

GetResponder handles the response to the Get request. The method always closes the http.Response Body.

func (PolicyClient) GetSender

func (client PolicyClient) GetSender(req *http.Request) (*http.Response, error)

GetSender sends the Get request. The method will close the http.Response Body if it receives an error.

func (PolicyClient) PrepareToSet

func (client PolicyClient) PrepareToSet(ctx context.Context, tenantBaseURL string, tee TeeKind, policyJws string) (result SetObject, err error)

PrepareToSet sends the prepare to set request. Parameters: tenantBaseURL - the tenant name, for example https://mytenant.attest.azure.net. tee - specifies the trusted execution environment to be used to validate the evidence policyJws - JSON Web Signature (See RFC7515) expressing the new policy

func (PolicyClient) PrepareToSetPreparer

func (client PolicyClient) PrepareToSetPreparer(ctx context.Context, tenantBaseURL string, tee TeeKind, policyJws string) (*http.Request, error)

PrepareToSetPreparer prepares the PrepareToSet request.

func (PolicyClient) PrepareToSetResponder

func (client PolicyClient) PrepareToSetResponder(resp *http.Response) (result SetObject, err error)

PrepareToSetResponder handles the response to the PrepareToSet request. The method always closes the http.Response Body.

func (PolicyClient) PrepareToSetSender

func (client PolicyClient) PrepareToSetSender(req *http.Request) (*http.Response, error)

PrepareToSetSender sends the PrepareToSet request. The method will close the http.Response Body if it receives an error.

func (PolicyClient) Reset

func (client PolicyClient) Reset(ctx context.Context, tenantBaseURL string, tee TeeKind, policyJws string) (result SetObject, err error)

Reset sends the reset request. Parameters: tenantBaseURL - the tenant name, for example https://mytenant.attest.azure.net. tee - specifies the trusted execution environment to be used to validate the evidence policyJws - JSON Web Signature with an empty policy document

func (PolicyClient) ResetPreparer

func (client PolicyClient) ResetPreparer(ctx context.Context, tenantBaseURL string, tee TeeKind, policyJws string) (*http.Request, error)

ResetPreparer prepares the Reset request.

func (PolicyClient) ResetResponder

func (client PolicyClient) ResetResponder(resp *http.Response) (result SetObject, err error)

ResetResponder handles the response to the Reset request. The method always closes the http.Response Body.

func (PolicyClient) ResetSender

func (client PolicyClient) ResetSender(req *http.Request) (*http.Response, error)

ResetSender sends the Reset request. The method will close the http.Response Body if it receives an error.

func (PolicyClient) Set

func (client PolicyClient) Set(ctx context.Context, tenantBaseURL string, tee TeeKind, newAttestationPolicy string) (result SetObject, err error)

Set sends the set request. Parameters: tenantBaseURL - the tenant name, for example https://mytenant.attest.azure.net. tee - specifies the trusted execution environment to be used to validate the evidence newAttestationPolicy - JWT Expressing the new policy

func (PolicyClient) SetPreparer

func (client PolicyClient) SetPreparer(ctx context.Context, tenantBaseURL string, tee TeeKind, newAttestationPolicy string) (*http.Request, error)

SetPreparer prepares the Set request.

func (PolicyClient) SetResponder

func (client PolicyClient) SetResponder(resp *http.Response) (result SetObject, err error)

SetResponder handles the response to the Set request. The method always closes the http.Response Body.

func (PolicyClient) SetSender

func (client PolicyClient) SetSender(req *http.Request) (*http.Response, error)

SetSender sends the Set request. The method will close the http.Response Body if it receives an error.

type SetObject

type SetObject struct {
	autorest.Response `json:"-"`
	Value             interface{} `json:"value,omitempty"`
}

SetObject ...

type SigningCertificatesClient

type SigningCertificatesClient struct {
	BaseClient
}

SigningCertificatesClient is the describes the interface for the per-tenant enclave service.

func NewSigningCertificatesClient

func NewSigningCertificatesClient() SigningCertificatesClient

NewSigningCertificatesClient creates an instance of the SigningCertificatesClient client.

func (SigningCertificatesClient) Get

func (client SigningCertificatesClient) Get(ctx context.Context, tenantBaseURL string) (result SetObject, err error)

Get retrieves metadata signing certificates in use by the attestation service Parameters: tenantBaseURL - the tenant name, for example https://mytenant.attest.azure.net.

func (SigningCertificatesClient) GetPreparer

func (client SigningCertificatesClient) GetPreparer(ctx context.Context, tenantBaseURL string) (*http.Request, error)

GetPreparer prepares the Get request.

func (SigningCertificatesClient) GetResponder

func (client SigningCertificatesClient) GetResponder(resp *http.Response) (result SetObject, err error)

GetResponder handles the response to the Get request. The method always closes the http.Response Body.

func (SigningCertificatesClient) GetSender

func (client SigningCertificatesClient) GetSender(req *http.Request) (*http.Response, error)

GetSender sends the Get request. The method will close the http.Response Body if it receives an error.

type TeeKind

type TeeKind string

TeeKind enumerates the values for tee kind.

const (
	// CyResComponent IoT Edge validation
	CyResComponent TeeKind = "CyResComponent"
	// OpenEnclave OpenEnclave extensions to SGX
	OpenEnclave TeeKind = "OpenEnclave"
	// SgxEnclave Intel Software Guard eXtensions
	SgxEnclave TeeKind = "SgxEnclave"
	// VSMEnclave VSM Enclave Attestation
	VSMEnclave TeeKind = "VSMEnclave"
)

func PossibleTeeKindValues

func PossibleTeeKindValues() []TeeKind

PossibleTeeKindValues returns an array of possible values for the TeeKind const type.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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