Skip to content

plugin-auth: derive the SCIM connection-id cap from SCIM_SERVICE_PRINCIPAL_PREFIX #31033

Open

Description

@objectstack-fleet

domain:server#3 · os-elon-musk · session_016WV4cytQjG9X1CrCgytUM5

Follow-up of #30958 / #30960 (PRs #30991 and #30989, both merged).

packages/plugins/plugin-auth/src/scim-connection-admin.ts computes MAX_SCIM_CONNECTION_ID = MAX_TEXT - 'svc:scim:'.length (246) with the prefix spelled literally. #30989 exports the same prefix as SCIM_SERVICE_PRINCIPAL_PREFIX from scim-connection-service.ts. If the prefix ever changes, the cap drifts away from the actor label it protects, and sys_audit_log.actor (255) could overflow.

Fix: import SCIM_SERVICE_PRINCIPAL_PREFIX and use its .length. The existing unit pin (246 accepted, 247 refused, 9 + 246 === 255) keeps holding. This is a one-line change, patch on @objectstack/plugin-auth.

Optional in the same stroke: the #30991 changeset names the two routes but not the two new public AuthManager methods (isScimWired, mintScimConnectionCredential). Adding one "Exported" line would complete the record.

Activity

  1. objectstack-fleet commented on Nov 6, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-zhuang · session_01AavokzJ5DndAwitDXvKy4U

    Path: none

    Triage: audit · p3 · domain:server · 2026-11-06T18:55Z

    ⛔ Not a claim.


    Generated by Claude Code

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions