|
45 | 45 | ("STRIPE_API_KEY", str), |
46 | 46 | ("STRIPE_WEBHOOK_SECRET", str), |
47 | 47 | ("STRIPE_RECURRING_PRODUCT_ID", str), |
48 | | - # Strong verification through Iris ID |
49 | | - ("ENABLE_STRONG_VERIFICATION", bool), |
| 48 | + # Strong verification through Iris ID (gated at runtime by the `strong_verification_enabled` feature flag) |
50 | 49 | ("IRIS_ID_PUBKEY", str), |
51 | 50 | ("IRIS_ID_SECRET", str), |
52 | 51 | ("VERIFICATION_DATA_PUBLIC_KEY", bytes), |
@@ -151,15 +150,15 @@ def check_config(cfg: dict[str, Any]) -> None: |
151 | 150 | raise Exception("Production site must have SMS enabled") |
152 | 151 | if cfg["IN_TEST"]: |
153 | 152 | raise Exception("IN_TEST while not DEV") |
| 153 | + # Strong verification is gated at runtime by the `strong_verification_enabled` feature flag, which |
| 154 | + # can be flipped on remotely at any time, so prod must always have the Iris ID credentials present. |
| 155 | + if not cfg["IRIS_ID_PUBKEY"] or not cfg["IRIS_ID_SECRET"] or not cfg["VERIFICATION_DATA_PUBLIC_KEY"]: |
| 156 | + raise Exception("Iris ID credentials must be configured in production") |
154 | 157 |
|
155 | 158 | if cfg["ENABLE_DONATIONS"]: |
156 | 159 | if not cfg["STRIPE_API_KEY"] or not cfg["STRIPE_WEBHOOK_SECRET"] or not cfg["STRIPE_RECURRING_PRODUCT_ID"]: |
157 | 160 | raise Exception("No Stripe API key/recurring donation ID but donations enabled") |
158 | 161 |
|
159 | | - if cfg["ENABLE_STRONG_VERIFICATION"]: |
160 | | - if not cfg["IRIS_ID_PUBKEY"] or not cfg["IRIS_ID_SECRET"] or not cfg["VERIFICATION_DATA_PUBLIC_KEY"]: |
161 | | - raise Exception("No Iris ID pubkey/secret or verification data pubkey but strong verification enabled") |
162 | | - |
163 | 162 | if cfg["ENABLE_POSTAL_VERIFICATION"]: |
164 | 163 | if ( |
165 | 164 | not cfg["MYPOSTCARD_API_KEY"] |
|
0 commit comments