Repository navigation
feat(entitlements): account-provisioning show/set - #290
Merged
Merged
Conversation
…Policy.connector.account - entitlements account-provisioning show <entitlement-id> --app-id prints .provisionerPolicy alone (named show, not get: the policy has no id of its own to guarantee at the top level, matching the settings */show convention) - entitlements account-provisioning set <entitlement-id> --app-id --connector-id --field key=CEL... (--save-to-vault-id... | --do-not-save) [--test] always sends the complete connector.account policy with updateMask=provisionerPolicy, since a request that omits the policy under that mask still 200s and wipes it - --connector-id is read first, --dry-run included (unknown exits 4, deleted 2); --test evaluates every --field through policies test-provision's own route and aborts on the first one the server rejects, naming it - document the new flags/commands in README.md, cmd/agents.md, CHANGELOG.md
…ovisioning show
`show` unwrapped with `unwrapEnvelope` and printed "{}" for a 200 whose
response held no entitlement, so a broken response was indistinguishable from
"nothing configured". Route the entitlement through the same declared-path
guard `entitlements get` uses (`resourceAt`), which exits 6 when the object is
absent, null, or has no id, and keep "{}" only for an entitlement that really
has no provisionerPolicy. Tests cover the broken shapes and the unconfigured
policy.
Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
Live-verified: a raw update with `updateMask=provisionerPolicy` and no policy
object answers 200 and leaves the entitlement holding the explicit
`{"unconfigured": {}}` arm, which `show` then prints as sent -- not `{}`.
Say so in the help and both docs, replace the comment that recorded the arm
as unobserved, and pin the shape in the show table.
Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
The show help and the extractor comment described only "absent"; a stored
"provisionerPolicy": null takes the same "{}" path, so say so and leave no
input the sentence does not cover.
Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
leet-c1
marked this pull request as ready for review
November 19, 2026 21:16
Resolve the CHANGELOG "Added" entry and the readOnlyPOST registry against the entries merged from the connectors-sync and accounts-get branches; keep both sides. Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
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.
What
c1i entitlements account-provisioning show|set <entitlement-id> --app-id. This is the Console's App > Accounts management > Provisioning:provisionerPolicy.connector.account.setalways sends the complete policy withupdateMask=provisionerPolicy. A raw update that names the mask but omits the account object still answers 200 and wipes the stored policy; this command can't produce that body.--connector-idis pre-read: unknown exits4, deleted exits2. This runs under--dry-runtoo.--testevaluates each--fieldthrough the same route aspolicies test-provision, in order, and aborts on the first failure before writing, naming the field. The server answers a non-compiling expression with a 500, which exits6.2): duplicate or malformed--field, both storage modes, neither storage mode,--do-not-save=false.showrather thanget: the policy has no id of its own (the same convention as thesettings ... showcommands).Verified
showread a real connector-account policy.set --testre-applied identical values, and the re-showwas byte-identical. A bad CEL with--testaborted before writing, and the policy was untouched.--fieldson the mutation is exit2.updateMask=provisionerPolicyand no policy object answered 200 and replaced a stored connector policy, which is the hazardsetexists to avoid.Follow-ups in this branch
showrefuses a 200 whose response does not hold the entitlement (absent,null, or without anid) with exit6, through the same declared-path guardentitlements getuses, so a broken response cannot print the{}that means "nothing configured".{"unconfigured": {}}arm andshowprints that, not{}. Absent andnullboth print{}.