cosign keyless "getting Fulcio ... 403" / OIDC signer error in CI
Keyless cosign exchanges a workflow OIDC token for a short-lived Fulcio certificate. A 403 or "getting signer" error means the OIDC token was missing or rejected, usually because id-token: write was not granted.
What this error means
cosign fails with "error getting signer: getting key from Fulcio" and an HTTP 403, or "fetching ambient OIDC token" errors, during a keyless sign or attest.
Error: signing [image]: getting signer: getting key from Fulcio:
POST https://fulcio.sigstore.dev/api/v2/signingCert: 403Common causes
Missing id-token: write permission
Without id-token: write, GitHub does not issue an OIDC token, so cosign has nothing to present to Fulcio and the certificate request is rejected.
The wrong OIDC provider or issuer for the environment
Running outside the expected provider (or a self-hosted context without ambient OIDC) means cosign cannot detect a token to exchange.
How to fix it
Grant id-token: write to the job
- Add
id-token: writeto the workflow or job permissions. - Ensure cosign runs in a context that has ambient OIDC (GitHub-hosted or an OIDC-enabled runner).
- Re-run so cosign mints a token and Fulcio issues the certificate.
permissions:
id-token: write
packages: writeConfirm connectivity to Fulcio
On restricted networks, allow outbound access to fulcio.sigstore.dev (and rekor.sigstore.dev) so the certificate exchange can complete.
cosign sign --yes ghcr.io/acme/app@sha256:... # keyless, needs Fulcio reachableHow to prevent it
- Always set
id-token: writefor keyless cosign jobs. - Allow outbound access to Fulcio and Rekor from the runner network.
- Test keyless signing on a throwaway digest before gating releases on it.