Repository navigation
feat: a config-manager pull replaces a key set with private key material by a placeholder - #1362
Merged
Merged
Conversation
…t file
Proposed record 0055: a key set (jwkSet) that holds a private or symmetric key
is replaced by ${<ID>_JWKSET} on pull and filled from that variable on push.
It applies core record 0013 to the agent files of config-manager.
Refs #1355
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ial by a placeholder
A jwkSet that holds a private or symmetric key (d, p, q, dp, dq, qi, oth, k) is
not written to the agent file of an issuer, a software publisher, a remote
consent agent or an OAuth2 client: the file has ${<ID>_JWKSET} and one warning
names the object, the property and the variable. A push fills the variable from
the key set as JSON text and fails the file, naming the variable, when it has no
value. Applies record 0055 and core record 0013.
Refs #1355
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…e agent files real The test replaces every relative import of the modules under test by spies except the pure ones; AgentKeySets is pure like AgentFileShape. Refs #1355 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This was referenced Nov 17, 2026
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.
Summary
A key set (
jwkSet) of an issuer, a software publisher, a remote consent agent or an OAuth2 client is meant to hold public keys, but nothing stops a person from storing a private or symmetric key in it. The config-manager pulls wrote such a key set as it was, with a warning that never printed it, so the key reached files that are meant to be committed. This applies core 0013, secrets are never exported in the clear to them. The maintainer chose "redact and warn" over a refusal flag and over keeping the key.jwkSetwith a private or symmetric JWK member (d,p,q,dp,dq,qi,oth,k) is not written. The file has${<ID>_JWKSET}in its place (id in upper case,-as_, the way record 0054 names a password variable) and one warning names the object, the realm, the property and the variable. A key set with public keys only is written as before. A set with one private key among public ones is replaced as a whole. The rule runs after the overrides are merged, so a key in an overrides file is replaced as well, and an override that is a placeholder of the user's own is kept.-E,--env-file, process environment). The library puts a value into the text of the file before it parses it, so a key set (JSON text with quotes) in a variable broke the file. A push now puts the key set into the string correctly, only for ajwkSetthat is a single placeholder; a value that somebody already escaped by hand still works. A variable without a value fails that file, names the variable, sends nothing for it and never stores the placeholder.src/ops/AgentKeySets.ts), used by the shared kind module (issuers, software publishers, CIMD profiles) and by the genericoauth2-agentskind (remote consent agents, OAuth2 clients).-hsnapshots (diffs read: only the new sentences).Part of #1355.
Not covered
The OAuth2 client file of an application folder (
oauth2-client.json) has its own variable convention for the client secret (APP_<NAME>_CLIENT_SECRET) and its own reader. It still writes a key set as it is. A decision on its variable name is needed before it follows this rule.Decisions taken (maintainer: change on review)
<ID>_JWKSET; a second key set in one object would get_2. Two objects with the same id in different realms share a variable.proposed: the choice was made in conversation, not in an issue.Verification
npx tsc --noEmitexit 0;npm run checkexit 0 (0 errors; 8 warnings, none in a changed file); Prettier clean on the new and changed tests.npm run test:guidance: 699 passed. The first whole run failed 6 tests of one file (a test that replaces the imports of the modules under test by spies and did not know the new pure module); the third commit fixes that file and nothing else.-E, the second pull writes the same file, a push without the variable names it and sends nothing).othnot a secret member 2 failed; value not JSON-escaped 6 failed; state not put back 2 failed; mixed set keeps its public keys 1 failed; warning names something else than the text pins 1 failed; variable without the_JWKSETsuffix 12 failed.-hsnapshots: four updated (pull and push of issuers and software publishers), every diff is the added sentence. The text ofpull|push oauth2-agentsshows only with-hhh, which no snapshot covers; checked by hand.🤖 Generated with Claude Code