Documentation ¶
Index ¶
Constants ¶
const DefaultIASUrl = "https://api.trustedservices.intel.com/sgx/dev/attestation/v4/report"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConvertFunction ¶
type Converter ¶
type Converter struct { Type string Converter ConvertFunction }
func NewEpidLinkableConverter ¶
func NewEpidLinkableConverter() *Converter
NewEpidLinkableConverter creates a new attestation converter for Intel SGX EPID (linkable) attestation
func NewEpidUnlinkableConverter ¶
func NewEpidUnlinkableConverter() *Converter
NewEpidUnlinkableConverter creates a new attestation converter for Intel SGX EPID (unlinkable) attestation
func NewSimulationConverter ¶
func NewSimulationConverter() *Converter
NewSimulationConverter creates a new attestation converter for Intel SGX simulation mode
type ConverterDispatcher ¶
type ConverterDispatcher struct {
// contains filtered or unexported fields
}
func NewConverterDispatcher ¶
func NewConverterDispatcher() *ConverterDispatcher
func (*ConverterDispatcher) Convert ¶
func (d *ConverterDispatcher) Convert(attestation *attestation) (*evidence, error)
Convert performs the attestation to evidence conversion with help of the registered Converter. If there is no matching Converter registered for the input attestation, an error is returned; If the invoked ConverterFunction fails, an error is returned; Otherwise an evidence struct is returned.
func (*ConverterDispatcher) Register ¶
func (d *ConverterDispatcher) Register(converter ...*Converter) error
Register adds new converters to the ConverterDispatcher
type CredentialConverter ¶
type CredentialConverter struct {
// contains filtered or unexported fields
}
func NewCredentialConverter ¶
func NewCredentialConverter() *CredentialConverter
func (*CredentialConverter) ConvertCredentials ¶
func (c *CredentialConverter) ConvertCredentials(credentialsOnlyAttestation string) (credentialsWithEvidence string, err error)
ConvertCredentials perform attestation evidence conversion (transformation) for a given credentials message (encoded as base64 string)
type IASClient ¶
type IASClient struct {
// contains filtered or unexported fields
}
func NewIASClient ¶
func NewIASClient(apiKey string, opts ...IASClientOption) *IASClient
NewIASClient returns a new IASClient instance using DefaultIASUrl as IAS endpoint This method requires an API Key as input in order to authenticate with the IAS. Optionally, IASClientOption can be provided to change the behavior of the IASClient.
func (*IASClient) RequestAttestationReport ¶
RequestAttestationReport submits a quote (provided as base64 encoded string) to the Intel Attestation Service (IAS) in order to verify it and generate an attestation report. The report returned by the attestation service is packaged as a IASReport and serialized as json string.
type IASClientOption ¶
type IASClientOption func(*IASClient)
func WithHttpClient ¶
func WithHttpClient(client HTTPClient) IASClientOption
WithHttpClient option allows to use a custom http client. Mainly used for testing
func WithUrl ¶
func WithUrl(url string) IASClientOption
WithUrl option allows to override the default IAS endpoint (DefaultIASUrl)
type IASRequest ¶
type IASResponseBody ¶
type IASResponseBody struct { Id string `json:"id"` Timestamp string `json:"timestamp"` Version int `json:"version"` IsvEnclaveQuoteStatus string `json:"ISVEnclaveQuoteStatus"` IsvEnclaveQuoteBody string `json:"ISVEnclaveQuoteBody"` RevocationReason string `json:"revocationReason"` PseManifestStatus string `json:"pseManifestStatus"` PseManifestHash string `json:"pseManifestHash"` PlatformInfoBlob string `json:"platformInfoBlob"` Nonce string `json:"nonce"` EpidPseudonym string `json:"epidPseudonym"` AdvisoryURL string `json:"advisoryURL"` AdvisoryIDs []string `json:"advisoryIDs"` }