Documentation ¶
Overview ¶
* Copyright (c) 2022-2023 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-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
* 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 ¶
const ( HeaderRequestId = "request-id" HeaderTraceId = "trace-id" AtsCertChainMaxLen = 10 MaxRetries = 2 DefaultRetryWaitMinSeconds = 2 DefaultRetryWaitMaxSeconds = 10 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttestArgs ¶
type AttestArgs struct { Adapter EvidenceAdapter PolicyIds []uuid.UUID RequestId string }
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 Config ¶
type Config struct { BaseUrl string TlsCfg *tls.Config ApiUrl string ApiKey string *RetryConfig // contains filtered or unexported fields }
Config holds the Intel Trust Authority configuration for Connector
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 EvidenceAdapter ¶
EvidenceAdapter is an interface which exposes methods for collecting Quote from Platform
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 }
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