Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support configuration of Twilio Sender IDs for selected country codes #374

Merged
merged 3 commits into from
Aug 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion api/v1alpha1/toolchainconfig_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -364,12 +364,36 @@ type RegistrationServiceVerificationConfig struct {

// AWSSenderID the Alphanumeric Sender ID to use, e.g. "DevSandbox"
// +optional
AWSSenderID *string `json:"awsSenderId,omitempty"`
AWSSenderID *string `json:"awsSenderID,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are not using this configuration (yet), right? Just want to make sure it won't break anything.


// AWSSMSType is the type of SMS message to send, either `Promotional` or `Transactional`
// See https://docs.aws.amazon.com/sns/latest/dg/sms_publish-to-phone.html for details
// +optional
AWSSMSType *string `json:"awsSMSType,omitempty"`

// TwilioSenderConfigs is an array of TwilioSenderConfig objects
// +optional
// +listType=atomic
TwilioSenderConfigs []TwilioSenderConfig `json:"twilioSenderConfigs,omitempty"`
}

// TwilioSenderConfig is used to associate a particular sender ID (a sender ID is a text value that appears instead of
// a phone number when receiving an SMS message), for example "RED HAT", with an array of country
// code values for which the Sender ID value will be set via the Twilio API when sending a verification code to a user in
// any of the country codes specified.
//
// Since some countries are starting to block long form phone numbers (i.e. SMS messages from international phone numbers)
// the Sender ID may be an acceptable alternative to requiring the verification message to be sent from a local phone number.
//
// +k8s:openapi-gen=true
type TwilioSenderConfig struct {
// SenderID
SenderID string `json:"senderID"`

// CountryCodes
// +optional
// +listType=set
CountryCodes []string `json:"countryCodes,omitempty"`
}

// Defines all secrets related to registration service verification configuration
Expand Down
27 changes: 27 additions & 0 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

66 changes: 64 additions & 2 deletions api/v1alpha1/zz_generated.openapi.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.