Skip to content

Add opt-in v2 user handle passthrough#639

Open
michael-richey wants to merge 1 commit into
mainfrom
add-saml-nameid-handle-flag
Open

Add opt-in v2 user handle passthrough#639
michael-richey wants to merge 1 commit into
mainfrom
add-saml-nameid-handle-flag

Conversation

@michael-richey

@michael-richey michael-richey commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

Add an opt-in --preserve-user-handle flag (environment variable DD_PRESERVE_USER_HANDLE) that passes a non-empty source user handle through during v2 user creation when the destination API supports explicit handles.

  • Off by default; existing behavior is unchanged.
  • Leaves the existing --use-v1-user-api path unchanged in this PR.
  • Omits the field when the source handle is missing or empty, allowing the destination to derive it normally.
  • Applies only to net-new v2 user creation. The v2 update endpoint does not accept handle, so existing mapped users are not renamed.
  • Relies on the destination API response for handle validation.

See the README section "Preserving a source handle during v2 user creation" for usage and limitations.

Test plan

  • Added red/green unit coverage for enabled, disabled, and missing-handle payloads
  • Covered configuration, CLI parsing, environment wiring, and help output
  • Verified v2 update payloads continue to exclude handle
  • Full Python 3.11 unit suite passes

@michael-richey
michael-richey marked this pull request as ready for review July 24, 2026 20:25
@michael-richey
michael-richey requested a review from a team as a code owner July 24, 2026 20:25
@michael-richey
michael-richey deleted the add-saml-nameid-handle-flag branch July 24, 2026 21:02
@michael-richey
michael-richey restored the add-saml-nameid-handle-flag branch July 24, 2026 21:05
@michael-richey michael-richey changed the title Add --saml-nameid-handle flag for v2 user creation Add opt-in v2 user handle passthrough Jul 24, 2026
Add --preserve-user-handle and DD_PRESERVE_USER_HANDLE so compatible destination APIs can receive a non-empty source handle during v2 user creation. Keep the default behavior unchanged, omit empty handles, and continue excluding handles from v2 updates.
@michael-richey
michael-richey force-pushed the add-saml-nameid-handle-flag branch from be63b9b to 8627230 Compare July 24, 2026 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant