Skip to content

docs: correct the automation step for enable_user and disable_user - #147

Open
carolinaroncaglia wants to merge 1 commit into
mainfrom
cxp-972/update-docs
Open

docs: correct the automation step for enable_user and disable_user#147
carolinaroncaglia wants to merge 1 commit into
mainfrom
cxp-972/update-docs

Conversation

@carolinaroncaglia

Copy link
Copy Markdown

Summary

The Connector actions section named the Perform connector action automation step. enable_user and disable_user are not offered there — both are account-lifecycle actions and are reached from the Account lifecycle action step. A reader following the page selected the connector in a Perform connector action step and found an empty action list, with nothing on the page pointing anywhere else.

This rewrites the section on the pattern baton-okta's page already uses: name the step that offers each action, and state that the routing is not selectable.

Findings addressed

1. Wrong automation step named — measured. In the Perform connector action step with the connector selected, the Action name dropdown returns zero options; typing user, able, a, e each return zero. The control is in the same panel: Select a connector populates without typing, so the empty list is not the autocomplete awaiting input. Both actions execute from the Account lifecycle action step, with the effect verified in Snowflake by SQL. A stale action-schema ingest is excluded — that fails with dynamo: no item found, and both executions succeeded.

Which step offers an action is determined by the action's ActionType, not by registration scope. pkg/connector/actions.go:40,51 declares [ACCOUNT, ACCOUNT_DISABLE] and [ACCOUNT, ACCOUNT_ENABLE]. baton-ldap registers create_ou globally with RESOURCE_CREATE and it does appear in the generic step, so global-vs-resource-scoped is not the discriminator. In baton-sdk v0.24.6, pkg/actions/actions.go:274-286 keeps the two kinds in separate maps and the resource-type-filtered ListActionSchemas at :514-545 reads only the resource-scoped one.

2. Required privilege overstated — measured. The note asked for OWNERSHIP. Snowflake's error asks for MODIFY: Insufficient privileges to operate on user '<name>'. Your primary role USERADMIN must have MODIFY granted on USER <name>. MODIFY can be granted without transferring ownership, so the documented remedy was stricter than required.

3. Missing condition on that restriction — measured. It does not surface when the service account keeps Snowflake's default DEFAULT_SECONDARY_ROLES = ALL: a higher secondary role such as ACCOUNTADMIN stays active alongside the forced USERADMIN primary role and supplies the privilege. Reproducing the documented failure required ALTER USER <svc> SET DEFAULT_SECONDARY_ROLES = ().

The enable_user lockout note was already accurate and is unchanged.

Why it mattered

The page was added with the actions themselves, so the first readers of the feature would have been the ones to hit it. The published page has no Connector actions section yet, so the correction lands before it reaches customers.

Not changed

README.md documents no actions at all. That is a separate gap and is out of scope here.

Measured on a live tenant against v0.1.24 on channel latest.

Both actions are account-lifecycle actions and are reached from the Account
lifecycle action step. The page named the Perform connector action step, where
they do not appear -- that step lists actions scoped to a resource type.

Also corrects the privilege note: Snowflake requires MODIFY on the target user,
not OWNERSHIP, and MODIFY can be granted without transferring ownership. Adds
the condition under which the restriction surfaces at all, since a service
account on the default DEFAULT_SECONDARY_ROLES = ALL never hits it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@linear-code

linear-code Bot commented Aug 21, 2026

Copy link
Copy Markdown

CXP-972

@github-actions

Copy link
Copy Markdown
Contributor

Connector PR Review: docs: correct the automation step for enable_user and disable_user

Blocking Issues: 0 | Suggestions: 0 | Threads Resolved: 0
Criteria: Criteria status: loaded .claude/skills/ci-review.md from trusted base 9dc018f285fd.
Review mode: full
View review run

Review Summary

This is a docs-only change to the Connector actions section of docs/connector.mdx (no Go, go.mod, or go.sum changes); the full PR diff was still scanned for security and correctness. Every claim added to the page checks out against the code: pkg/connector/actions.go:40,51 declares ACTION_TYPE_ACCOUNT_DISABLE/ACTION_TYPE_ACCOUNT_ENABLE, consistent with the actions being surfaced by the account-lifecycle step rather than the resource-scoped one; pkg/snowflake/user.go:294 issues ALTER USER ... SET DISABLED through PostStatementRequestWithRole(..., UserAdminRole) and its doc comment records the same idempotency the page now states; and the user resource ID is user.Username (pkg/connector/users.go:76-80), matching the new "pass the Snowflake username as user_id" guidance. No prior findings existed and no new issues were found.

Security Issues

None found.

Correctness Issues

None found.

Suggestions

None.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No blocking issues found.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant