rekor

package
v0.0.0-...-6d23e20 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 14, 2026 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Overview

Package rekor is a stub implementation of Rekord

Index

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

func ClearRekorEntries(ctx context.Context) error

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

func ComputeLogID(publicKey []byte) (string, error)

ComputeLogID returns a hex-encoded SHA-256 digest of the SubjectPublicKeyInfo ASN.1 structure for the given PEM-encoded public key

func IsRunning

func IsRunning(ctx context.Context) bool

func JsonPathFromSignature

func JsonPathFromSignature(data []byte) (string, error)

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 PublicKey

func PublicKey(ctx context.Context) []byte

PublicKey returns the public key of the Rekor signing key

func StubRekor

func StubRekor(ctx context.Context) (string, error)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL