Files
seaweedfs/weed/kms/local
f4290b5ec2 kms/local: resolve key and alias ARNs (#13331)
* kms/local: resolve key and alias ARNs

AWS KMS takes a key's or an alias's ARN wherever it takes a key ID or an
alias, and the local provider hands out ARNs in DescribeKey, but it looked
them up as plain names, so an ARN named no key. A local ARN now resolves to
the key or alias it names, in requests, in the keys list's key_id and
aliases, and in CreateKey's aliases. An ARN with an empty key ID names no
key.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* kms/local: register a key created by ARN under its key ID

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* kms/local: refuse a key ARN listed as an alias

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* kms/local: refuse a key ID that is an ARN of an ARN

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* kms/local: resolve a key ARN only to the key with that ID

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* kms/local: create an on-demand key under the ID its ARN names

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* kms/local: decrypt keeps the key ARN a ciphertext was wrapped under

A key configured by its ARN had that ARN as its ID before key ARNs
resolved, and S3 stored it with each object and compares it with the
ID Decrypt returns.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Chris Lu <chrislusf@users.noreply.github.com>
2026-12-03 01:12:44 -08:00
..