feat: a key that can't be used is explained in the picker
CI / Checks (pull_request) Successful in 40s
PR title / Conventional title (pull_request) Successful in 1s

The key picker stays open until the link is made, saying "encrypting
with …" meanwhile. A key that can't be read, or doesn't keep to
share.keyRules, is shown in it in red with which rule it misses
("its value has 28 characters; share.keyRules needs 32
(minLength)"), to pick another.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
kebandClaude Opus 5.5 committed 2026-10-13 13:24:21 +02:00
1 parent 166790d825
commit 027e748c92
6 files changed
+73 -16

No files matched your search

+1 -1
View File
@@ -62,7 +62,7 @@ func TestSealRefuses(t *testing.T) {
files []File
want string
}{
"short key": {Header{Key: key}, []byte("short"), ok, "keyRules wants"},
"short key": {Header{Key: key}, []byte("short"), ok, "needs 32 (minLength)"},
"vault as key": {Header{Key: ref.Ref{Kind: provider.KindAzure, Host: "kv.vault.azure.net"}}, pass, ok, "isn't a secret"},
"no files": {Header{Key: key}, pass, nil, "no files"},
"not env": {Header{Key: key}, pass, []File{{Path: "main.go", Data: []byte("x")}}, "isn't an env file"},