Documents GCP refusals and outage cost - #119
Merged
Merged
Conversation
The GCP key store guide gains a section on what a GCP row answers
when Cloud KMS refuses or does not answer. A permanent Decrypt
refusal (a destroyed version, a binding mismatch, a missing grant)
answers the retryable {:key_unavailable, selector}, as an outage
does, and the section says what each callback does when the newest
or an older row refuses. During an outage each GCP row waits out the
provider's request timeout, one row after another, so
decryption_keys/2 waits about N timeouts for N GCP rows.
The shred section no longer calls ADR-0005 Amendment A5 proposed:
that record's Note of 2026-09-24 accepted it.
Refs: ece-0f6
johnnyt
force-pushed
the
ece-0f6-gcp-permanent-failure-and-outage-docs
branch
from
September 30, 2026 05:56
3149456 to
89e498c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Documents two behaviours of a GCP row in
Encryptor.Ecto.KeyStorethat were true and unwritten. Documentation only: no code, no changelog fragment (the fragment rules exclude documentation).What changes
docs/guides/gcp-kms-key-store.mdgains a section, "When Cloud KMS refuses, or does not answer", with two parts:{:key_unavailable, selector}. A destroyed key version, a row whose binding no longer matches its wrapping, and a missing or revoked decrypt grant all answer the retryable term, as an outage does. The section says whatencryption_key/2anddecryption_keys/2do when the newest row refuses and when an older row does, and what a retrying caller should check.Decryptrequest bounded by the provider's:timeout(default 5,000 ms), and the store tries every row in turn, sodecryption_keys/2waits about N timeouts for N GCP rows andencryption_key/2about one.The text is worded for
encryptor0.5.0, the version this package pins, and names no future term.Provenance
Review (in-turn)
I re-read the diff against the bead and checked each claim against the code. The KeyStore claims were read at
4722b05and the provider claims inencryptor0.5.0. Every failedDecryptbecomes{:key_unavailable, selector}: see the{:error, _failure}arm ofEncryptor.Provider.GcpKms.unwrap/3, andhandle/2inEncryptor.Provider.GcpKms.Api, which maps any non-2xx status to{:http_status, status}and a transport failure to{:transport, :request_failed}. The store returns that term unrelabelled (Encryptor.Ecto.KeyStore.unwrap_row/4, the delegating clause). Rows are unwrapped one after another and every row is tried (Encryptor.Ecto.KeyStore.unwrap_all/3, anEnum.mapover all rows).encryption_key/2unwraps the newest row only (Encryptor.Ecto.KeyStore.encryption_key/2). The default timeout is 5,000 ms and is handed to the host's HTTP client astimeout:(@default_timeoutinEncryptor.Provider.GcpKms, andrequest/5in itsApi). The cited moduledoc heading## Configurationexists inEncryptor.Provider.GcpKms. Gate: the change touches no Elixir code, so under this repo's rule it has no gate to run and commits on review of the diff alone.Refs: ece-0f6