Skip to content

fix(auth): expose registered users to signing backend - #63

Merged
lorenzocorallo merged 2 commits into
mainfrom
fix/esign-directory-signers
Oct 17, 2026
Merged

lorenzocorallo merged 2 commits into
mainfrom
fix/esign-directory-signers

Conversation

@lorenzocorallo

Copy link
Copy Markdown
Member

Summary

  • Expose registered IdP users to the backend through a service-token-protected endpoint.
  • Return user ID, name, and email, including people who have never opened Signatures.
  • Keep signer permission and drive-rule decisions in the backend's access snapshot.

Verification

  • pnpm exec tsc --noEmit
  • pnpm exec vp test (305 passed, 115 skipped)
  • pnpm exec vp check src/auth/access-snapshot.integration.test.ts src/routes/api/internal/esign-users.ts
  • pnpm run build

Rollout

Deploy before the backend signer-directory change. The new endpoint's HTTP integration test needs the configured integration database and URL to run.

Allow the backend service token to read registered user identities for signer selection. The backend applies its access snapshot and drive rules to this directory.
@coderabbitai

coderabbitai Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8a0e91b9-065d-4e31-883b-12c3fb78b312
📥 Commits

Reviewing files that changed from the base of the PR and between dddb4ec and 74c844c.

📒 Files selected for processing: 4
  • src/auth/access-snapshot.integration.test.ts
  • src/dev/personas.ts
  • src/routeTree.gen.ts
  • src/routes/api/internal/esign-users.ts

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Walkthrough

The pull request adds a protected /api/internal/esign-users endpoint, registers it in the route tree, and adds integration coverage. It also changes the formatting of the empty DevFixtureConflict class without changing its behavior.

Changes

E-sign user endpoint

Layer / File(s) Summary
Endpoint authorization and response
src/routes/api/internal/esign-users.ts
The GET handler checks backend OAuth configuration and client projection. It returns user IDs, names, and emails ordered by name and ID, with private no-store caching and Vary: Authorization.
Route registration and integration coverage
src/routeTree.gen.ts, src/auth/access-snapshot.integration.test.ts
The generated route tree includes /api/internal/esign-users. The integration test checks unauthenticated and wrong-scope responses, then verifies a valid token response and its cache header.
Empty class formatting
src/dev/personas.ts
The empty DevFixtureConflict class formatting changes. Its behavior remains unchanged.

Priority: ➖ Normal

Change: Feature

Merge Risk: ⚪ Minimal · up to 74c84

The endpoint is ready to merge after normal checks.

Pre-merge checks: Passed 3 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 4 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: exposing registered users to the signing backend through the new protected endpoint.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Keeps the repository-wide Vite+ check green for the signer directory change.
@lorenzocorallo
lorenzocorallo marked this pull request as ready for review October 17, 2026 16:00
@lorenzocorallo
lorenzocorallo merged commit f013796 into main Oct 17, 2026
2 checks passed
@lorenzocorallo
lorenzocorallo deleted the fix/esign-directory-signers branch October 17, 2026 16:04
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