Documentation
¶
Overview ¶
Package rekor is a stub implementation of Rekord
Index ¶
- func AddStepsTo(sc *godog.ScenarioContext)
- func ClearRekorEntries(ctx context.Context) error
- func ComputeEntryTimestamp(privateKey, password []byte, logEntry models.LogEntryAnon) ([]byte, error)
- func ComputeLogID(publicKey []byte) (string, error)
- func IsRunning(ctx context.Context) bool
- func JsonPathFromSignature(data []byte) (string, error)
- func PublicKey(ctx context.Context) []byte
- func StubRekor(ctx context.Context) (string, error)
- func StubRekorEntryCreationForAttestation(ctx context.Context, attestationData []byte, publicKey []byte) error
- func StubRekorEntryCreationForSignature(ctx context.Context, data []byte, signature []byte, signatureJSON []byte, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddStepsTo ¶
func AddStepsTo(sc *godog.ScenarioContext)
AddStepsTo adds Gherkin steps to the godog ScenarioContext
func ClearRekorEntries ¶
ClearRekorEntries removes all Rekor entries by overriding the retrieval endpoint to return an error
func ComputeEntryTimestamp ¶
func ComputeEntryTimestamp(privateKey, password []byte, logEntry models.LogEntryAnon) ([]byte, error)
ComputeEntryTimestamp signs Rekor log entryies body, integrated timestam, log index and log ID with the provided private key encrypted by the given password
func ComputeLogID ¶
ComputeLogID returns a hex-encoded SHA-256 digest of the SubjectPublicKeyInfo ASN.1 structure for the given PEM-encoded public key
func JsonPathFromSignature ¶
JsonPathFromSignature returns the JSON Path expression to be used in the wiremock stub for a signature query. The expression matches the value of the signature's content.
func StubRekor ¶
StubRekor returns the `http://host:port` of the stubbed Rekord
func StubRekorEntryCreationForAttestation ¶
func StubRekorEntryCreationForAttestation(ctx context.Context, attestationData []byte, publicKey []byte) error
StubRekorEntryCreationForAttestation creates WireMock stubs for both Rekor entry creation and retrieval endpoints specifically for attestations using intoto entry type
func StubRekorEntryCreationForSignature ¶
func StubRekorEntryCreationForSignature(ctx context.Context, data []byte, signature []byte, signatureJSON []byte, publicKey []byte) error
StubRekorEntryCreationForSignature creates WireMock stubs for both Rekor entry creation and retrieval endpoints This handles both POST /api/v1/log/entries (creation) and POST /api/v1/log/entries/retrieve (retrieval)
Types ¶
This section is empty.