Repository navigation
Description
Summary
Part of the tracking issue #1254 (line X6). The maintainer decided (2026-11-16) that every file under realms/<realm>/realm-config/agents/** is written in the wrapped shape ({ "inherited": false, "value": ... } per property), as the released trees have it, and that new kinds follow. The CIMD kind does not: pull oauth-cimd-profiles writes the plain shape, because it files the object as the library's list read returns it (src/ops/CIMDProfileConfigOps.ts, header comment and configManagerExportCIMDProfiles: cimd.readCIMDProfiles()). The issuer kind (pull oauth-issuers) and the generic pull oauth2-agents write the wrapped shape. A tree can therefore hold both. This issue aligns the CIMD kind.
What to do
pull oauth-cimd-profileswrites what a read of the profile by id returns (cimd.readCIMDProfile(id)in the library; the list read stays the way the kind discovers the ids), so the file equals whatpull oauth2-agentswrote for the same profile, byte for byte, like the issuer kind. Measure and say what it costs: one request per profile instead of one list request.push oauth-cimd-profilesalready accepts plain and wrapped values (the help says "plain and wrapped values are sent as they are"); add a test that a file written in the new shape is pushed unchanged, and that a file in the old plain shape (pulled with a 5.0.0 prerelease) still pushes.- Reword the entry of
MIGRATION.mdthat says the firstpull oauth-cimd-profilesover a file thatpull oauth2-agentswrote rewrites it in the plain form (it is added by the pull request of config-manager: oauth2-agents leaves trusted JWT issuers to oauth-issuers #1259 and config-manager: oauth2-agents leaves CIMD profiles to oauth-cimd-profiles #1249): after this change the file stays wrapped; a tree pulled with a 5.0.0 prerelease changes its CIMD files to wrapped on the next pull. - Update the unit tests of the kind and the fake tenant answers (
test/utils/FakeAm.mjs) so that the by-id read answers the wrapped shape. There is no recorded e2e test of the CIMD kind yet (config-manager: record e2e tests and run a live check for the CIMD kind #1252); nothing recorded changes.
Acceptance
pull oauth-cimd-profileswrites the wrapped shape; a test compares its file with the onepull oauth2-agentswrites for the same profile (stubbed library);pushof both shapes is tested; the migration entry is correct;npm run check,npx tsc --noEmit,npm testpass.
Depends on: #1259 and #1249 merged (the migration entry). Related: #1254, #1252, #1247 to #1251.
Activity
fix: config-manager pull oauth-cimd-profiles writes the wrapped shape…