Repository navigation
feat(auth): capture requester contact details and email approval notifications (#142) - #144
Open
danielnaab wants to merge 10 commits into
Open
danielnaab wants to merge 10 commits into
danielnaab wants to merge 10 commits into
Conversation
…al email Pot-Run: 7979
…mplate Isolates @aws-sdk/client-sesv2 to services/email/ses-sender.ts. Falls back to a logging sender when EMAIL_FROM is unset. Pulumi adds an SES domain identity with DKIM records and a send-only role policy; main's .env gets EMAIL_FROM. Refs #142 Pot-Run: 7979
Saves every GitHub email (with primary/verified/visibility flags) and the public profile fields at sign-in for all users. Adds an optional note to the request-access form and includes contact details in the Slack alert, with user text escaped for Slack. Refs #142 Pot-Run: 7979
Approving a pending or revoked user sends the access-approved email to their primary verified address and records the outcome, which the admin page shows. Pending and approved rows show contact email, all emails with flags, profile details and the request note. Extracts getExternalOrigin and getDeploymentName into shared/. Threat model covers the new personal data and the SES boundary. Refs #142 Pot-Run: 7979
Requests made before contact capture would otherwise never get emails stored, so their approval email could not be sent. Refs #142 Pot-Run: 7979
Links are only built for plain email addresses and valid X handles. Refs #142 Pot-Run: 7979
Signed-in pending users are sent to a status page showing when they asked, where we'll email them, and their note, which they can edit. Only an actual change is stored and posts an access.request-updated Slack alert; repeat submissions no longer post alerts. Users who already have an entry no longer see the blank request form. Refs #142 Pot-Run: 7979
Builds on the central approval check: the status page reads the requester session, and the session is kept after a request so they can come back. Revoked users are signed out by the session reader. Refs #142 Pot-Run: 7979
Pot-Run: 7979
Pot-Run: 7979
danielnaab
force-pushed
the
story-142/access-request-contact-details
branch
from
December 5, 2026 05:46
eb22b02 to
7ff381a
Compare
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #142. Builds on #143 (merged), the central approval check.
Context
When an outside user requested access, we kept only their GitHub login, name and avatar. Approving them notified no one. Admins had no way to reach requesters, and requesters never learned they'd been let in.
Design:
notes/story-142-access-request-contact-details/design.mdChanges
Capturing contact details
Request flow
access.requestednow includes the contact email, company and note. Editing the note postsaccess.request-updated, but only if the note actually changed. User text is escaped for Slack.Admin and email
/admin/usersshows each pending and approved user's contact email as amailto:link, all their emails with Primary/Verified tags, their profile details and their note.http(s)URLs, plain email addresses and valid handles.src/services/email/service.@aws-sdk/client-sesv2is used only inses-sender.ts. WithoutEMAIL_FROMset, the app logs the email instead of sending it.Infrastructure and docs
ses:SendEmailpermission scoped to that identity.deploy.nixwritesEMAIL_FROMinto the.envformainonly.catalog/architecture/deployment.md.Testing
bun run checkpasses (1533 tests, 0 failures)<script>andjavascript:input, approval with email not configured, and an axe check (no new issues).deploy.nixparsesAfter merge
bun run cli infra up(flexion_marketing stack) creates the SES identity, DKIM records and IAM permission.bun run cli nixos apply, becausedeploy.nixchanged.