From 8ac25516921e0e8f285d90f4f69a4d2ce68ff080 Mon Sep 17 00:00:00 2001 From: Feny Mehta Date: Mon, 6 Jul 2026 15:02:46 +0530 Subject: [PATCH] SANDBOX-1889: change default phoneLookupMode from log to disabled Update the default value for phoneLookupMode to "disabled" so that environments which haven't explicitly opted in no longer call the Twilio Lookup API. Production and staging are unaffected as they already set phoneLookupMode to "enabled" explicitly. Co-authored-by: Cursor --- api/v1alpha1/docs/apiref.adoc | 2 +- api/v1alpha1/toolchainconfig_types.go | 4 ++-- api/v1alpha1/zz_generated.openapi.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/v1alpha1/docs/apiref.adoc b/api/v1alpha1/docs/apiref.adoc index 95ab3d83..25bc225d 100644 --- a/api/v1alpha1/docs/apiref.adoc +++ b/api/v1alpha1/docs/apiref.adoc @@ -2339,7 +2339,7 @@ See https://docs.aws.amazon.com/sns/latest/dg/sms_publish-to-phone.html for deta | *`phoneLookupMode`* __xref:{anchor_prefix}-github-com-codeready-toolchain-api-api-v1alpha1-phonelookupmode[$$PhoneLookupMode$$]__ | PhoneLookupMode controls how the registration service handles Twilio Lookup v2 phone risk checks. + Valid values are "disabled" (skip Lookup entirely), "log" (call Lookup and store results but don't block), + -and "enabled" (call Lookup and enforce blocking). Defaults to "log". + | log | Enum: [disabled log enabled] + +and "enabled" (call Lookup and enforce blocking). Defaults to "disabled". + | disabled | Enum: [disabled log enabled] + Optional: \{} + | *`phoneLookupExcludedCountries`* __string array__ | PhoneLookupExcludedCountries is a list of ISO 3166-1 alpha-2 country codes (e.g. ["CA", "US"]) + diff --git a/api/v1alpha1/toolchainconfig_types.go b/api/v1alpha1/toolchainconfig_types.go index 826741a1..aad5fff1 100644 --- a/api/v1alpha1/toolchainconfig_types.go +++ b/api/v1alpha1/toolchainconfig_types.go @@ -399,9 +399,9 @@ type RegistrationServiceVerificationConfig struct { // PhoneLookupMode controls how the registration service handles Twilio Lookup v2 phone risk checks. // Valid values are "disabled" (skip Lookup entirely), "log" (call Lookup and store results but don't block), - // and "enabled" (call Lookup and enforce blocking). Defaults to "log". + // and "enabled" (call Lookup and enforce blocking). Defaults to "disabled". // +optional - // +kubebuilder:default="log" + // +kubebuilder:default="disabled" PhoneLookupMode *PhoneLookupMode `json:"phoneLookupMode,omitempty"` // PhoneLookupExcludedCountries is a list of ISO 3166-1 alpha-2 country codes (e.g. ["CA", "US"]) diff --git a/api/v1alpha1/zz_generated.openapi.go b/api/v1alpha1/zz_generated.openapi.go index 8399dd34..96caffd0 100644 --- a/api/v1alpha1/zz_generated.openapi.go +++ b/api/v1alpha1/zz_generated.openapi.go @@ -2947,7 +2947,7 @@ func schema_codeready_toolchain_api_api_v1alpha1_RegistrationServiceVerification }, "phoneLookupMode": { SchemaProps: spec.SchemaProps{ - Description: "PhoneLookupMode controls how the registration service handles Twilio Lookup v2 phone risk checks. Valid values are \"disabled\" (skip Lookup entirely), \"log\" (call Lookup and store results but don't block), and \"enabled\" (call Lookup and enforce blocking). Defaults to \"log\".", + Description: "PhoneLookupMode controls how the registration service handles Twilio Lookup v2 phone risk checks. Valid values are \"disabled\" (skip Lookup entirely), \"log\" (call Lookup and store results but don't block), and \"enabled\" (call Lookup and enforce blocking). Defaults to \"disabled\".", Type: []string{"string"}, Format: "", },