hashicorp/packer · error

signing_mode %q is not implemented

Error message

signing_mode %q is not implemented

What it means

Config error from NewSigner: the configured signing_mode string has no registered signer factory in signerFactories, i.e. it is not one of the built-in modes (file, kms, keyless...). Pure map-lookup guard against a typo'd or unsupported mode.

Source

Thrown at internal/attestation/signer.go:58

	RekorURL          string
	UploadTlog        bool
	TrustedRootPath   string
	KeylessIdentity   string
	KeylessOIDCIssuer string
}

type signerFactory func(context.Context, BackendConfig) (Signer, error)

var signerFactories = map[string]signerFactory{}

func RegisterSigner(mode string, factory signerFactory) {
	signerFactories[mode] = factory
}

func NewSigner(ctx context.Context, cfg BackendConfig) (Signer, error) {
	factory, ok := signerFactories[cfg.Mode]
	if !ok {
		return nil, fmt.Errorf("signing_mode %q is not implemented", cfg.Mode)
	}

	return factory(ctx, cfg)
}

func NewVerifier(ctx context.Context, cfg BackendConfig, signer Signer) (Verifier, error) {
	if cfg.VerifierRef != "" {
		return LoadPEMVerifier(cfg.VerifierRef)
	}

	return signer.Verifier(ctx, cfg)
}

func VerifyEnvelope(ctx context.Context, envelope Envelope, verifier Verifier) error {
	if len(envelope.Signatures) == 0 {
		return fmt.Errorf("envelope has no signatures")
	}

View on GitHub (pinned to eb36e3c3e4)

Solutions

  1. Set signing_mode to a supported value such as "file" (PEM), "kms", or "keyless"
  2. Check for typos in the signing_mode attribute of the provenance post-processor
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at internal/attestation/signer.go:58 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of hashicorp/packer@eb36e3c3e4 (2026-09-05). Data as JSON: /api/errors/eb11e40bb02ee634. Report an issue: GitHub.