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

enable custom OTP on okta_authenticator #1864

Closed
wants to merge 3 commits into from

Conversation

isaacokta
Copy link
Contributor

Change Summary

This pull request introduces Custom OTP functionality to the Okta provider in Terraform. It also addresses an issue where the correct authenticator was not being selected due to the absence of a specified name.

Technical Details

  • Support for Custom OTP generation has been added to authentication configurations.
  • The authenticator selection logic has been corrected to account for the specified name.

@@ -263,7 +287,9 @@ func buildAuthenticator(d *schema.ResourceData) (*sdk.Authenticator, error) {
Key: d.Get("key").(string),
Name: d.Get("name").(string),
}
if d.Get("type").(string) == "security_key" {
if d.Get("key").(string) == "custom_otp" {

Copy link
Contributor

Choose a reason for hiding this comment

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

Empty if statement

@@ -150,15 +150,9 @@ func findAuthenticator(ctx context.Context, m interface{}, name, key string) (*s
return nil, err
}
for _, authenticator := range authenticators {
if authenticator.Name == name {
if authenticator.Name == name && authenticator.Key == key {
Copy link
Contributor

Choose a reason for hiding this comment

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

This will cause breaking change

@@ -31,9 +31,6 @@ func resourceAuthenticator() *schema.Resource {
Type: schema.TypeString,
Required: true,
Description: "Display name of the Authenticator",
DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do you need to remove this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants