Documentation
¶
Overview ¶
Copyright 2024 Contributors to the Veraison project. SPDX-License-Identifier: Apache-2.0
Copyright 2022-2024 Contributors to the Veraison project. SPDX-License-Identifier: Apache-2.0
Copyright 2021-2024 Contributors to the Veraison project. SPDX-License-Identifier: Apache-2.0
Index ¶
- func ClaimsToMap(mapper ClaimMapper) (map[string]interface{}, error)
- func DecodePemSubjectPubKeyInfo(key []byte) (crypto.PublicKey, error)
- func GetImplID(scheme string, attr json.RawMessage) (string, error)
- func GetInstID(scheme string, attr json.RawMessage) (string, error)
- func MapToClaims(in map[string]interface{}) (psatoken.IClaims, error)
- func UnsignedCorimDecoder(data []byte, xtr IExtractor) (*handler.EndorsementHandlerResponse, error)
- type ClaimMapper
- type IExtractor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClaimsToMap ¶
func ClaimsToMap(mapper ClaimMapper) (map[string]interface{}, error)
func DecodePemSubjectPubKeyInfo ¶
DecodePemSubjectPubKeyInfo decodes a PEM encoded SubjectPublicKeyInfo
func UnsignedCorimDecoder ¶
func UnsignedCorimDecoder( data []byte, xtr IExtractor, ) (*handler.EndorsementHandlerResponse, error)
Types ¶
type ClaimMapper ¶
type IExtractor ¶
type IExtractor interface {
RefValExtractor(comid.ReferenceValue) ([]*handler.Endorsement, error)
TaExtractor(comid.AttestVerifKey) (*handler.Endorsement, error)
SetProfile(string)
}
IExtractor is the interface that CoRIM plugins need to implement to hook into the UnsignedCorimDecoder logics. Each extractor consumes a specific CoMID triple and produces a corresponding Veraison Endorsement format (or an error).
Note: At the moment the interface is limited by the known use cases. We anticipate that in the future there will to be an extractor for each of the defined CoMID triples, plus maybe a way to handle cross-triples checks as well as extraction from the "global" CoRIM context. See also https://github.com/veraison/services/issues/70