# README

Intel® Trust Authority Client Go Connector

· 10/18/2024 ·

The Intel® Trust Authority go-connector module is the main component of the remote attestation client. The go-connector provides a set of Go modules for connecting to Intel Trust Authority services. The go-connector API is designed to be used by both attesters and relying parties, in either Passport or Background-check attestation mode. Go-connector relies on TEE adapters to interact with the underlying host platform.

There are two options for using go-connector: you can import the Go modules into your Go application, or you can execute the attestation client CLI from your application or workflow. The CLI is a wrapper around the go-connector that provides a command-line interface the core functionality of the go-connector, plus additional features exposed by TEE adapters.

go-connector requires configuration information to connect to the Intel Trust Authority service. The configuration information includes the URL of the Intel Trust Authority service for your region, the API key, TLS configuration, and optional connection retry parameters. For more information, see the sample configuration code.

For more information about go-connector and related topics, see the following resources:

Download go-connector

Download the latest version of the module with the following command.

go get github.com/intel/trustauthority-client/go-connector

Go Requirement

Use Go 1.22 or newer. See https://go.dev/doc/install for installation of Go.

Unit Tests

To run the tests, run cd go-connector && go test ./.... See the example test in go-connector/token_test.go for an example of a test.

Usage

For usage information, see the Intel Trust Authority Go Connector Reference.

Code of Conduct and Contributing

See the CONTRIBUTING file for information on how to contribute to this project. The project follows the Code of Conduct.

License

This library is distributed under the BSD-style license found in the LICENSE file.

# Functions

New returns a new Connector instance.
NewEvidenceBuilder creates a new EvidenceBuilder instance with the specified options.
No description provided by the author
WithEvidenceAdapter adds an EvidenceAdapter to the EvidenceBuilder.
WithPoliciesMustMatch determines whether the Trust Authority will fail if policies do not match.
WithPolicyIds sets the policy IDs that will be evaluated remotely by the Trust Authority.
WithTokenSigningAlgorithm determines which signing algorithm will be applied when ITA creates an attestation token.
WithUserData includes user defined data ('userData') into the attestation request's payload.
WithVerifierNonce sets the verifier nonce to be used when building evidence data.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

AttestArgs holds the request parameters needed for attestation with Intel Trust Authority.
AttestationTokenResponse holds the token recieved from Intel Trust Authority.
AttestResponse holds the response parameters recieved during attestation flow.
Config holds the Intel Trust Authority configuration for Connector.
Evidence is used to store Quote to be sent for Attestation.
GetNonceArgs holds the request parameters needed for getting nonce from Intel Trust Authority.
GetNonceResponse holds the response parameters recieved from nonce endpoint.
GetTokenArgs holds the request parameters needed for getting token from Intel Trust Authority.
GetTokenResponse holds the response parameters recieved from attest endpoint.
RetryConfig holds the configuration for automatic retries to tolerate minor outages.
VerifierNonce holds the signed nonce issued from Intel Trust Authority.

# Interfaces

CompositeEvidenceAdapter is an interface that facilitates the collection of composite attestation requests (i.e., that have multiple evidence types like TDX+TPM).
Connector is an interface which exposes methods for calling Intel Trust Authority REST APIs.
EvidenceAdapter is an interface which exposes methods for collecting Quote from Platform.
EvidenceBuilder is a utility for creating attestation evidence request payloads.

# Type aliases

No description provided by the author
No description provided by the author
No description provided by the author