Skip to content

fix(core): validate one-time token organizations at creation - #10027

Open
charIeszhao wants to merge 1 commit into
masterfrom
charles-validate-one-time-token-organizations
Open

charIeszhao wants to merge 1 commit into
masterfrom
charles-validate-one-time-token-organizations

Conversation

@charIeszhao

Copy link
Copy Markdown
Member

Summary

Closes #10026.

Creating a one-time token with a nonexistent organization ID currently succeeds, then silently skips that organization when the user signs in. Validate all distinct jitOrganizationIds at creation and reject the whole request with 400 request.invalid_input, identifying missing IDs. This also covers organizations referenced by jitOrganizationRoles, whose entries must belong to that list.

Organizations deleted after token creation continue to be skipped when the token is used. Add API and provisioning regression coverage, replace placeholder organization IDs in existing tests with real organizations, and document the stricter creation-time behavior in OpenAPI and a patch changeset.

Depends on #9981. This draft is stacked on its current head (b958529b6); review only the follow-up fix. Rebase onto master after #9981 merges before marking ready.

Testing

Unit tests (40 passed)

Integration regression tests added; execution left to CI, not run locally.

Checklist

  • .changeset
  • unit tests
  • integration tests
  • necessary TSDoc comments

@charIeszhao
charIeszhao force-pushed the charles-validate-one-time-token-organizations branch from 08c4dc4 to 30b499b Compare November 16, 2026 09:06
@github-actions github-actions Bot added size/xl and removed size/xl labels Nov 16, 2026
@charIeszhao
charIeszhao force-pushed the charles-validate-one-time-token-organizations branch from 30b499b to f860f18 Compare November 17, 2026 03:08
@charIeszhao
charIeszhao marked this pull request as ready for review November 17, 2026 03:08
@github-actions github-actions Bot added size/l and removed size/xl labels Nov 17, 2026

This branch has not been deployed

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

Development

Successfully merging this pull request may close these issues.

Validate organization existence when creating one-time tokens

3 participants