Documentation ¶
Overview ¶
Copyright 2022 Contributors to the Veraison project. SPDX-License-Identifier: Apache-2.0
Copyright 2022 Contributors to the Veraison project. SPDX-License-Identifier: Apache-2.0
Index ¶
- type AppraiseEvidenceArgs
- type ExtractVerifiedClaimsArgs
- type ExtractedClaims
- type IScheme
- type Plugin
- type RPCClient
- func (s *RPCClient) AppraiseEvidence(ec *proto.EvidenceContext, endorsements []string) (*proto.AppraisalContext, error)
- func (s *RPCClient) ExtractEvidence(token *proto.AttestationToken, trustAnchor string) (*ExtractedClaims, error)
- func (s *RPCClient) ExtractVerifiedClaims(token *proto.AttestationToken, trustAnchor string) (*ExtractedClaims, error)
- func (s *RPCClient) GetFormat() proto.AttestationFormat
- func (s *RPCClient) GetName() string
- func (s *RPCClient) GetSupportedMediaTypes() []string
- func (s *RPCClient) GetTrustAnchorID(token *proto.AttestationToken) (string, error)
- func (s *RPCClient) SynthKeysFromSwComponent(tenantID string, swComp *proto.Endorsement) ([]string, error)
- func (s *RPCClient) SynthKeysFromTrustAnchor(tenantID string, ta *proto.Endorsement) ([]string, error)
- type RPCServer
- func (s *RPCServer) AppraiseEvidence(args AppraiseEvidenceArgs, resp *[]byte) error
- func (s *RPCServer) ExtractVerifiedClaims(args ExtractVerifiedClaimsArgs, resp *[]byte) error
- func (s *RPCServer) GetFormat(args interface{}, resp *proto.AttestationFormat) error
- func (s *RPCServer) GetName(args interface{}, resp *string) error
- func (s *RPCServer) GetSupportedMediaTypes(args interface{}, resp *[]string) error
- func (s *RPCServer) GetTrustAnchorID(data []byte, resp *string) error
- func (s *RPCServer) SynthKeysFromSwComponent(args SynthKeysArgs, resp *[]string) error
- func (s *RPCServer) SynthKeysFromTrustAnchor(args SynthKeysArgs, resp *[]string) error
- type SchemeGoPlugin
- type SynthKeysArgs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppraiseEvidenceArgs ¶
type ExtractedClaims ¶
type ExtractedClaims struct { ClaimsSet map[string]interface{} `json:"claims-set"` SoftwareID string `json:"software-id"` }
ExtractedClaims contains a map of claims extracted from an attestation token along with the corresponding SoftwareID that is used to fetch the associated endorsements.
XXX(tho) -- not clear why SoftwareID is treated differently from TrustAnchorID
func NewExtractedClaims ¶
func NewExtractedClaims() *ExtractedClaims
type IScheme ¶
type IScheme interface { GetName() string GetFormat() proto.AttestationFormat GetSupportedMediaTypes() []string ExtractVerifiedClaims(token *proto.AttestationToken, trustAnchor string) (*ExtractedClaims, error) GetTrustAnchorID(token *proto.AttestationToken) (string, error) AppraiseEvidence(ec *proto.EvidenceContext, endorsements []string) (*proto.AppraisalContext, error) // endorsement lookup keys SynthKeysFromSwComponent(tenantID string, swComp *proto.Endorsement) ([]string, error) SynthKeysFromTrustAnchor(tenantID string, ta *proto.Endorsement) ([]string, error) }
IScheme defines the interface to attestation scheme specific functionality. An object implementing this interface encapsulates all functionality specific to a particular AttestationFormat, such as knowledge of evidence and endorsements structure.
type RPCClient ¶
type RPCClient struct {
// contains filtered or unexported fields
}
func (*RPCClient) AppraiseEvidence ¶
func (s *RPCClient) AppraiseEvidence(ec *proto.EvidenceContext, endorsements []string) (*proto.AppraisalContext, error)
func (*RPCClient) ExtractEvidence ¶
func (s *RPCClient) ExtractEvidence(token *proto.AttestationToken, trustAnchor string) (*ExtractedClaims, error)
func (*RPCClient) ExtractVerifiedClaims ¶
func (s *RPCClient) ExtractVerifiedClaims(token *proto.AttestationToken, trustAnchor string) (*ExtractedClaims, error)
func (*RPCClient) GetFormat ¶
func (s *RPCClient) GetFormat() proto.AttestationFormat
func (*RPCClient) GetSupportedMediaTypes ¶
func (*RPCClient) GetTrustAnchorID ¶
func (s *RPCClient) GetTrustAnchorID(token *proto.AttestationToken) (string, error)
func (*RPCClient) SynthKeysFromSwComponent ¶
func (*RPCClient) SynthKeysFromTrustAnchor ¶
type RPCServer ¶
type RPCServer struct {
Impl IScheme
}
func (*RPCServer) AppraiseEvidence ¶
func (s *RPCServer) AppraiseEvidence(args AppraiseEvidenceArgs, resp *[]byte) error
func (*RPCServer) ExtractVerifiedClaims ¶
func (s *RPCServer) ExtractVerifiedClaims(args ExtractVerifiedClaimsArgs, resp *[]byte) error
func (*RPCServer) GetFormat ¶
func (s *RPCServer) GetFormat(args interface{}, resp *proto.AttestationFormat) error
func (*RPCServer) GetSupportedMediaTypes ¶
func (*RPCServer) GetTrustAnchorID ¶
func (*RPCServer) SynthKeysFromSwComponent ¶
func (s *RPCServer) SynthKeysFromSwComponent(args SynthKeysArgs, resp *[]string) error
func (*RPCServer) SynthKeysFromTrustAnchor ¶
func (s *RPCServer) SynthKeysFromTrustAnchor(args SynthKeysArgs, resp *[]string) error
type SchemeGoPlugin ¶
type SchemeGoPlugin struct { Path string Name string SupportedMediaTypes []string Handle IScheme Client *plugin.Client }
func NewSchemeGoPlugin ¶
func NewSchemeGoPlugin(path string) (*SchemeGoPlugin, error)