Documentation
¶
Overview ¶
* Copyright (c) 2022-2024 Intel Corporation * All rights reserved. * SPDX-License-Identifier: BSD-3-Clause
* Copyright (c) 2023 Intel Corporation * All rights reserved. * SPDX-License-Identifier: BSD-3-Clause
* Copyright (c) 2022-2024 Intel Corporation * All rights reserved. * SPDX-License-Identifier: BSD-3-Clause
* Copyright (c) 2022-2024 Intel Corporation * All rights reserved. * SPDX-License-Identifier: BSD-3-Clause
* Copyright (c) 2024 Intel Corporation * All rights reserved. * SPDX-License-Identifier: BSD-3-Clause
* Copyright (c) 2022-2023 Intel Corporation * All rights reserved. * SPDX-License-Identifier: BSD-3-Clause
* Copyright (c) 2022-2023 Intel Corporation * All rights reserved. * SPDX-License-Identifier: BSD-3-Clause
* Copyright (c) 2022-2023 Intel Corporation * All rights reserved. * SPDX-License-Identifier: BSD-3-Clause
Index ¶
- Constants
- func ValidateTokenSigningAlg(input string) bool
- type AttestArgs
- type AttestResponse
- type AttestationTokenResponse
- type Config
- type Connector
- type Evidence
- type EvidenceAdapter
- type EvidenceType
- type GetNonceArgs
- type GetNonceResponse
- type GetTokenArgs
- type GetTokenResponse
- type JwtAlg
- type RetryConfig
- type VerifierNonce
Constants ¶
const ( HeaderRequestId = "request-id" HeaderTraceId = "trace-id" AtsCertChainMaxLen = 10 MaxRetries = 2 DefaultRetryWaitMinSeconds = 2 DefaultRetryWaitMaxSeconds = 10 HttpsScheme = "https" )
Variables ¶
This section is empty.
Functions ¶
func ValidateTokenSigningAlg ¶ added in v1.4.0
Types ¶
type AttestArgs ¶
type AttestArgs struct { Adapter EvidenceAdapter PolicyIds []uuid.UUID RequestId string TokenSigningAlg string PolicyMustMatch bool }
AttestArgs holds the request parameters needed for attestation with Intel Trust Authority
type AttestResponse ¶
AttestResponse holds the response parameters recieved during attestation flow
type AttestationTokenResponse ¶
type AttestationTokenResponse struct {
Token string `json:"token"`
}
AttestationTokenResponse holds the token recieved from Intel Trust Authority
type Connector ¶
type Connector interface { GetTokenSigningCertificates() ([]byte, error) GetNonce(GetNonceArgs) (GetNonceResponse, error) GetToken(GetTokenArgs) (GetTokenResponse, error) Attest(AttestArgs) (AttestResponse, error) VerifyToken(string) (*jwt.Token, error) }
Connector is an interface which exposes methods for calling Intel Trust Authority REST APIs
type Evidence ¶
type Evidence struct { Type EvidenceType Evidence []byte UserData []byte EventLog []byte RuntimeData []byte }
Evidence is used to store Quote to be sent for Attestation
type EvidenceAdapter ¶
EvidenceAdapter is an interface which exposes methods for collecting Quote from Platform
type EvidenceType ¶ added in v1.6.0
type EvidenceType int
const ( Sgx EvidenceType = iota Tdx AzTdx )
func (EvidenceType) String ¶ added in v1.6.0
func (c EvidenceType) String() string
type GetNonceArgs ¶
type GetNonceArgs struct {
RequestId string
}
GetNonceArgs holds the request parameters needed for getting nonce from Intel Trust Authority
type GetNonceResponse ¶
type GetNonceResponse struct { Nonce *VerifierNonce Headers http.Header }
GetNonceResponse holds the response parameters recieved from nonce endpoint
type GetTokenArgs ¶
type GetTokenArgs struct { Nonce *VerifierNonce Evidence *Evidence PolicyIds []uuid.UUID RequestId string TokenSigningAlg string PolicyMustMatch bool // contains filtered or unexported fields }
GetTokenArgs holds the request parameters needed for getting token from Intel Trust Authority
type GetTokenResponse ¶
GetTokenResponse holds the response parameters recieved from attest endpoint
type RetryConfig ¶
type RetryConfig struct { RetryWaitMin *time.Duration // Minimum time to wait between retries RetryWaitMax *time.Duration // Maximum time to wait between retries RetryMax *int // Maximum number of retries CheckRetry retryablehttp.CheckRetry BackOff retryablehttp.Backoff }
RetryConfig holds the configuration for automatic retries to tolerate minor outages
type VerifierNonce ¶
type VerifierNonce struct { Val []byte `json:"val"` Iat []byte `json:"iat"` Signature []byte `json:"signature"` }
VerifierNonce holds the signed nonce issued from Intel Trust Authority