Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

chore(dev): temporarily allow all email signups in dev (#7561)

teo90956182cedb
diff --git a/docs/AGENT_GUIDE/login.md b/docs/AGENT_GUIDE/login.md
index 9ea4772b82..e21dc9ae76 100644
--- a/docs/AGENT_GUIDE/login.md
+++ b/docs/AGENT_GUIDE/login.md
@@ -18,6 +18,15 @@
failure does not block the remaining content; signup retries repair tags
without resetting task priorities. The guide waits until its tag IDs resolve.
+## Temporary open signup in Develop
+
+Once the temporary authentication-service override is deployed, Develop accepts
+new accounts with any email address regardless of signup allowlist membership or
+the configured bypass flag. Verify with an authorized test account outside
+`macro.com` that is absent from the allowlist. Email verification and provider
+sign-in still apply. See the [authentication-service configuration guide](../../services/authentication_service/README.md#temporary-open-signup-override)
+for restoring allowlist enforcement.
+
## Hosted-dev proxy SSO
On an allowed OAuth origin such as `https://localhost:<port>`, Google/SSO
diff --git a/services/authentication_service/README.md b/services/authentication_service/README.md
index b64ded4c7b..01b63ae228 100644
--- a/services/authentication_service/README.md
+++ b/services/authentication_service/README.md
@@ -2,6 +2,20 @@
## Development signup allowlist
+### Temporary open signup override
+
+Develop currently allows every public signup, even when
+`DEVELOPMENT_BYPASS_SIGNUP_ALLOWLIST` is `false` or absent. The temporary override
+in `Config::signup_policy_for_environment` skips the allowlist for both runtime
+startup and Doppler validation. Production and Local behavior is unchanged.
+
+Deploy the authentication service to apply this change. To restore allowlist
+enforcement, remove the temporary override, confirm the Develop allowlist is
+valid and the bypass flag is `false`, and redeploy. Changing Doppler alone cannot
+disable this override. Existing accounts remain after enforcement is restored.
+
+The configuration behavior described below applies once the override is removed.
+
The authentication service gates new signups with a startup-built `SignupPolicy`.
The policy is enforced authoritatively by the existing FusionAuth `user.create`
webhook at `/webhooks/user`. FusionAuth is configured for `user.create` with
diff --git a/services/authentication_service/src/config.rs b/services/authentication_service/src/config.rs
index 0e399813f5..5afdaa6beb 100644
--- a/services/authentication_service/src/config.rs
+++ b/services/authentication_service/src/config.rs
@@ -292,9 +292,13 @@ impl Config {
&self,
environment: Environment,
) -> anyhow::Result<SignupPolicy> {
+ // Temporarily open Develop signups even when Doppler disables the bypass.
+ // Remove this override to restore the configured allowlist policy.
+ let bypass_allowlist =
+ self.development_bypass_signup_allowlist || matches!(environment, Environment::Develop);
resolve_signup_policy(
environment,
- self.development_bypass_signup_allowlist,
+ bypass_allowlist,
&self.development_signup_allowlist_json,
)
}
diff --git a/services/authentication_service/src/config/test.rs b/services/authentication_service/src/config/test.rs
index 485de8f052..7430e009a6 100644
--- a/services/authentication_service/src/config/test.rs
+++ b/services/authentication_service/src/config/test.rs
@@ -279,6 +279,34 @@ const ALLOWLIST_SETTING_CASES: [Option<&str>; 5] = [
const UNLISTED_PUBLIC_EMAIL: &str = "[email protected]";
+#[test]
+fn develop_config_temporarily_allows_unlisted_signups_regardless_of_bypass() {
+ for bypass in [None, Some(false), Some(true)] {
+ for allowlist in ALLOWLIST_SETTING_CASES {
+ let mut values = config_values();
+ values["ENVIRONMENT"] = serde_json::json!("develop");
+ if let Some(bypass) = bypass {
+ values["DEVELOPMENT_BYPASS_SIGNUP_ALLOWLIST"] = serde_json::json!(bypass);
+ }
+ if let Some(allowlist) = allowlist {
+ values["DEVELOPMENT_SIGNUP_ALLOWLIST_JSON"] = serde_json::json!(allowlist);
+ }
+ let config: Config = serde_json::from_value(values).unwrap();
+
+ // Exercise both runtime startup and the Doppler validator's entry point.
+ for policy in [
+ config.signup_policy().unwrap(),
+ config
+ .signup_policy_for_environment(Environment::Develop)
+ .unwrap(),
+ ] {
+ assert_eq!(policy.allowed_email_count(), None);
+ assert_eq!(policy.authorize_public_email(UNLISTED_PUBLIC_EMAIL), Ok(()));
+ }
+ }
+ }
+}
+
#[test]
fn develop_signup_policy_requires_configured_allowlist() {
for value in [None, Some(""), Some(" \t ")] {