Repository navigation
Conversation
Honor the same static-entitlement precedence as sync. Unsupported, unknown, or explicitly empty static configurations must not execute an unrelated dynamic mapping's grant or revoke SQL. Keep valid static and dynamic-only provisioning unchanged. Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
Superseded — see the current review report for commit
|
Connector PR Review: Respect static-entitlement precedence during provisioningBlocking Issues: 0 | Suggestions: 0 | Threads Resolved: 0 Review Summary
The new table test covers grant and revoke across five modes. It asserts the actual row state in SQLite, so it shows both that nothing unwanted is mutated and that valid static and dynamic-only provisioning still works. I scanned the full PR diff for security and correctness issues. On criteria: the Provisioning P1-P6 and section F rules don't apply because entity sourcing is unchanged. No breaking changes under B1-B9: no IDs, slugs or schema changed, and none of the Operational note, not a finding: a deployed config that has both static entitlements and a dynamic mapping with provisioning will now get an error on Grant/Revoke. Before, it silently ran the dynamic SQL. That is the intended fix and it is stated in the PR. Security IssuesNone found. Correctness IssuesNone found. SuggestionsNone. Reviewed commit: |
There was a problem hiding this comment.
No blocking issues found — see the full review report
Summary
When a resource type declares
static_entitlements, sync uses that list instead of dynamic entitlements. Provisioning must use the same precedence.Previously, a static entitlement without provisioning—or an unknown entitlement while static mode was selected—fell through to the first dynamic mapping's grant/revoke SQL. For example, requesting an unsupported static Viewer entitlement could run an unrelated Admin assignment query and report success.
Stop the lookup after static resolution when static mode is configured, including an explicitly empty static list. Supported static operations and dynamic-only configuration retain their behavior.
Regression proof
TestStaticProvisioningDoesNotFallThroughcalls realEntitlements,Grant, andRevokepaths against an in-process SQLite database. Its ten cases cover both operations for unsupported static, unknown static, empty static, supported static, and dynamic-only modes.Before the fix, six forbidden-fallback cases execute the Admin SQL; four valid controls pass. With the fix, all ten pass. Assertions inspect the Admin and Viewer rows, proving both absence of unwanted mutation and continued execution of valid operations.
Scope
Related: CXP-1454. This fixes the static-to-dynamic fallthrough subcase only. It does not solve selection among multiple dynamic mappings or establish a durable producing-mapping identity.
No exported API, configuration schema, stable ID, dependency, or SQL-execution changes. The rejected calls now fail before SQL rather than executing an unrelated mapping. The README records the static precedence contract.
Proof is local SQLite fixture behavior, not a live database/provider or deployed connector. Native DB2-tagged builds and external database workflows were not exercised.
Checks
Worker full test/build/lint and binary-launch checks passed. Parent reviewed the exact source/tests and integrated this commit independently of the logging fix into the original checkout. Parent
make test,make build,make lint(zero issues), and rebuilt CLI--versionall passed on that independent branch.