You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Go SDK: ErrForbidden has no Help — list its likely causes, and say why the exact cause is not given #1893
The Go SDK is in languages/golang in this repository. It encrypts values in a Go program, and gets its keys from ZeroKMS, CipherStash's key management service. In November 2026 we audited version v0.1.0-rc.7 by building programs against a dev workspace and PostgreSQL 17 with EQL (Encrypt Query Language) v4.
Problem
Three different causes give the same ErrForbidden, with the same code and an empty Help:
a tenant mismatch;
a client without access;
the right keyset with the wrong scope. This gives code stack_kms::retrieve_key_failed, and never mentions the scope.
A developer cannot tell which one they hit.
Proposal
Give ErrForbidden a Help that lists its likely causes, and names the keyset where the SDK has it.
Say in the docs why the SDK cannot name the exact cause, and what to do instead.
Scope
This issue was narrowed on 2026-11-27. It first asked for a separate Help for each cause. That is not possible. It is also not wanted:
ZeroKMS refuses a data key with HTTP 403 for three causes: another context, a disabled keyset, or a token without the scope to retrieve keys. Its answer does not say which cause applies.
This is intentional. A refusal that named its cause would tell an attacker which part of a request to change.
changed the title [-]Go SDK: `ErrForbidden` has no Help, and does not say whether the tenant, the scope, or access is wrong[/-][+]Go SDK: `ErrForbidden` has no Help — list its likely causes, and say why the exact cause is not given[/+]on Nov 27, 2026
Activity
fix(golang): name the causes ZeroKMS answers 403 for, not a missing g…
[-]Go SDK: `ErrForbidden` has no Help, and does not say whether the tenant, the scope, or access is wrong[/-][+]Go SDK: `ErrForbidden` has no Help — list its likely causes, and say why the exact cause is not given[/+]fix(golang): say which cause a ZeroKMS refusal has, and name the keyset
fix(golang): name the causes ZeroKMS answers 403 for, not a missing g…