Skip to content

config-manager: pull oauth-cimd-profiles writes the wrapped shape like the other agent kinds #1349

Closed

Description

@vscheuber

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

  1. pull oauth-cimd-profiles writes 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 what pull oauth2-agents wrote 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.
  2. push oauth-cimd-profiles already 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.
  3. Reword the entry of MIGRATION.md that says the first pull oauth-cimd-profiles over a file that pull oauth2-agents wrote 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.
  4. 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-profiles writes the wrapped shape; a test compares its file with the one pull oauth2-agents writes for the same profile (stubbed library); push of both shapes is tested; the migration entry is correct; npm run check, npx tsc --noEmit, npm test pass.

Depends on: #1259 and #1249 merged (the migration entry). Related: #1254, #1252, #1247 to #1251.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestno-auto-processingConcierge never touches this item; remove the label to hand it over

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions