feat(iam): email-based login for Datum Cloud#720
Open
drewr wants to merge 4 commits into
Open
Conversation
Add a provisional enhancement document for adding email/password login to Datum Cloud. The platform currently requires Google or GitHub OAuth for all user accounts. Key design decisions: - Enable Zitadel's native email/password provider via LoginPolicy change in the existing Pulumi-managed datum-iam-system setup - Extend the Milo AuthProvider enum (github, google) to include email - Fix the auth-provider-zitadel actions server to handle the Zitadel local-provider idpintent.succeeded event shape - Wire the cloud-portal account security settings card to live UserIdentity API data for provider linking/unlinking
- Mark Zitadel email provider as a blocking pre-requisite: confirmed no SMTP, DefaultEmailProvider, or email credentials exist anywhere in datum-cloud/infra. Clarify this is separate from the Milo notification.miloapis.com path used by the waitlist controller. - Resolve the registration approval open question: email signups go through the existing waitlist/approval gate at launch, with the fraud-check toggle designed to be easily activated once anti-fraud infrastructure is validated. - Add email provider provisioning as step 0 in implementation sequence. - Promote SMTP risk to High/Blocking in the risk table.
Context diagram shows the new SMTP email delivery service as a distinct external system separate from the Milo notification path. Container diagram zooms into datum-iam-system and auth-provider-zitadel, marking the Zitadel DefaultEmailProvider as a blocking pre-requisite (red) and clarifying that the UserWaitlistController uses a separate notification pipeline.
- Resolve SMTP open question: use Resend via smtp.resend.com:587 with a dedicated API key, sender noreply@mail.datum.net (domain already verified). No external-secret.yaml change needed; secret lives in Pulumi ESC as zitadel-setup:smtp-password. - Add Design Details section with exact config.ts addition and zitadel.SmtpConfig Pulumi resource, including staging validation checklist. - Update Dependencies to reflect resolved status and correct path.
Contributor
|
Is this something we want to do? We intentionally avoided password based logins in the past because of the security risks they bring to the platform. We've talked about supporting passkeys as an alternative to identity provider based logins. |
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.
Summary
Architecture
DefaultEmailProvider(red) was the blocking pre-requisite. Two independent email paths are shown.What this proposes
Minimal changes, maximum leverage of existing infrastructure:
datum-cloud/infra(step 0) — Add azitadel.SmtpConfigPulumi resource pointing at Resend's SMTP relay (smtp.resend.com:587) with a dedicated API key, sendernoreply@mail.datum.net. Store the API key in Pulumi ESC aszitadel-setup:smtp-password. Validate end-to-end email delivery in staging before proceeding.datum-cloud/infra— Update the Pulumi-managedLoginPolicyto setdisableLoginWithEmail: false,allowRegister: true, andhidePasswordReset: false. Add aPasswordComplexityPolicyfor the Datum Cloud organization. Depends on step 1.datum-cloud/milo-os(upstream) — Extend theAuthProviderenum onUser.Status.LastLoginProviderfrom[github, google]to[github, google, email]. Regenerate CRDs.datum-cloud/auth-provider-zitadel— FixparseIDPUserDatain the actions server to returnAuthProviderEmailinstead of an error when Zitadel's local provider fires anidpintent.succeededevent.datum-cloud/cloud-portal— Replace hardcoded mock data inAccountSignInMethodSettingsCardwith liveUserIdentityAPI data. Add "Manage" / "Connect" / "Set password" actions for each provider.Nothing in
auth-uineeds to change. The login v2 app already has all the required routes (/register,/register/password,/password,/verify,/password/set,/password/change). They are currently gated byloginSettings.allowUsernamePassword, which this proposal enables.Resolved: SMTP provider
Zitadel will use Resend via
smtp.resend.com:587— the same delivery service already used by the Milo notification system. A dedicated Resend API key will be provisioned for Zitadel (separate from the one held byemail-provider-resend) so credentials can be rotated independently. Themail.datum.netsending domain is already verified in Resend. Secret lives in Pulumi ESC; noexternal-secret.yamlchange is needed.Resolved: registration approval
Email self-registration will go through the existing waitlist/approval gate at launch (no code change needed — the
UserWaitlistControlleralready handles this). Once anti-fraud infrastructure is validated in production, open registration can be activated by toggling a single flag in the fraud-check service. The LoginPolicy does not change between modes.Test plan
zitadel-setup:smtp-passwordin Pulumi ESC (staging); runpulumi upUser.Status.LastLoginProvideris set toemailafter email loginPendingwaitlist state