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

[IOPAE-1447] ADD Captcha on SignIn,SignUp,Password reset for devportal #1237

Merged
merged 2 commits into from
Oct 10, 2024

Conversation

giamma1295
Copy link
Contributor

@giamma1295 giamma1295 commented Oct 10, 2024

Motivation and Context

Added captcha in the flows of:

  • Sign-Up (both before sending the confirmation code to the specified mailbox and before sending the MFA code via SMS)
  • Sign-In (before sending the MFA code via SMS)
  • Password Reset (before sending the MFA code via SMS)

Major Changes

Required captcha before Signup, MFA Signin, Password Reset

Dependencies

Testing

Configuration already applied on prod app, tested and working, pr needed to make it final

Documentation

Other Considerations

@giamma1295 giamma1295 requested a review from a team as a code owner October 10, 2024 09:51
Copy link

github-actions bot commented Oct 10, 2024

Terraform Plan ('src/domains/selfcare/prod/westeurope') 📖

Terraform Plan
module.app_services.data.azurerm_linux_function_app.itn_webapp_functions_app: Still reading... [10s elapsed]
module.app_services.data.azurerm_linux_function_app.itn_webapp_functions_app: Still reading... [20s elapsed]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  # module.app_services.module.function_devportalservicedata.azurerm_linux_function_app.this will be updated in-place
  ~ resource "azurerm_linux_function_app" "this" {
        id                                             = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-selfcare-be-rg/providers/Microsoft.Web/sites/io-p-devportalsrvdata-fn"
        name                                           = "io-p-devportalsrvdata-fn"
        tags                                           = {
            "CostCenter"                                     = "TS310 - PAGAMENTI & SERVIZI"
            "CreatedBy"                                      = "Terraform"
            "Environment"                                    = "Prod"
            "ManagementTeam"                                 = "IO Enti & Servizi"
            "Owner"                                          = "IO"
            "Source"                                         = "https://github.com/pagopa/io-infra/blob/main/src/domains/selfcare/prod/westeurope"
        }
        # (28 unchanged attributes hidden)

      ~ site_config {
          ~ health_check_eviction_time_in_min       = 0 -> 10
            # (24 unchanged attributes hidden)

          ~ ip_restriction {
                name                      = "rule"
              ~ virtual_network_subnet_id = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-rg-common/providers/Microsoft.Network/virtualNetworks/io-p-vnet-common/subnets/io-p-selfcare-be-common-snet" -> "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-rg-common/providers/Microsoft.Network/virtualNetworks/io-p-vnet-common/subnets/io-p-github-runner-snet"
                # (3 unchanged attributes hidden)
            }
          ~ ip_restriction {
              - ip_address                = "51.144.56.96/28" -> null
                name                      = "rule"
              + virtual_network_subnet_id = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-rg-common/providers/Microsoft.Network/virtualNetworks/io-p-vnet-common/subnets/io-p-selfcare-be-common-snet"
                # (3 unchanged attributes hidden)
            }
          ~ ip_restriction {
              ~ ip_address = "51.144.56.112/28" -> "51.144.56.96/28"
                name       = "rule"
                # (3 unchanged attributes hidden)
            }
          ~ ip_restriction {
              ~ ip_address = "51.144.56.128/28" -> "51.144.56.112/28"
                name       = "rule"
                # (3 unchanged attributes hidden)
            }
          ~ ip_restriction {
              ~ ip_address = "51.144.56.144/28" -> "51.144.56.128/28"
                name       = "rule"
                # (3 unchanged attributes hidden)
            }
          ~ ip_restriction {
              ~ ip_address = "51.144.56.160/28" -> "51.144.56.144/28"
                name       = "rule"
                # (3 unchanged attributes hidden)
            }
          ~ ip_restriction {
              ~ ip_address = "51.144.56.176/28" -> "51.144.56.160/28"
                name       = "rule"
                # (3 unchanged attributes hidden)
            }
          ~ ip_restriction {
              + ip_address                = "51.144.56.176/28"
                name                      = "rule"
              - virtual_network_subnet_id = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-rg-common/providers/Microsoft.Network/virtualNetworks/io-p-vnet-common/subnets/io-p-github-runner-snet" -> null
                # (3 unchanged attributes hidden)
            }

            # (1 unchanged block hidden)
        }

        # (1 unchanged block hidden)
    }

  # module.app_services.module.function_devportalservicedata_staging_slot.azurerm_linux_function_app_slot.this will be updated in-place
  ~ resource "azurerm_linux_function_app_slot" "this" {
        id                                             = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-selfcare-be-rg/providers/Microsoft.Web/sites/io-p-devportalsrvdata-fn/slots/staging"
        name                                           = "staging"
        tags                                           = {
            "CostCenter"                                     = "TS310 - PAGAMENTI & SERVIZI"
            "CreatedBy"                                      = "Terraform"
            "Environment"                                    = "Prod"
            "ManagementTeam"                                 = "IO Enti & Servizi"
            "Owner"                                          = "IO"
            "Source"                                         = "https://github.com/pagopa/io-infra/blob/main/src/domains/selfcare/prod/westeurope"
        }
        # (24 unchanged attributes hidden)

      ~ site_config {
          ~ health_check_eviction_time_in_min       = 0 -> 10
            # (24 unchanged attributes hidden)

          ~ ip_restriction {
                name                      = "rule"
              ~ virtual_network_subnet_id = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-rg-common/providers/Microsoft.Network/virtualNetworks/io-p-vnet-common/subnets/azure-devops" -> "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-rg-common/providers/Microsoft.Network/virtualNetworks/io-p-vnet-common/subnets/io-p-github-runner-snet"
                # (3 unchanged attributes hidden)
            }
          ~ ip_restriction {
                name                      = "rule"
              ~ virtual_network_subnet_id = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-rg-common/providers/Microsoft.Network/virtualNetworks/io-p-vnet-common/subnets/io-p-github-runner-snet" -> "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-rg-common/providers/Microsoft.Network/virtualNetworks/io-p-vnet-common/subnets/azure-devops"
                # (3 unchanged attributes hidden)
            }

            # (1 unchanged block hidden)
        }
    }

  # module.app_services.module.function_subscriptionmigrations.azurerm_linux_function_app.this will be updated in-place
  ~ resource "azurerm_linux_function_app" "this" {
        id                                             = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-selfcare-be-rg/providers/Microsoft.Web/sites/io-p-subsmigrations-fn"
        name                                           = "io-p-subsmigrations-fn"
        tags                                           = {
            "CostCenter"                                     = "TS310 - PAGAMENTI & SERVIZI"
            "CreatedBy"                                      = "Terraform"
            "Environment"                                    = "Prod"
            "ManagementTeam"                                 = "IO Enti & Servizi"
            "Owner"                                          = "IO"
            "Source"                                         = "https://github.com/pagopa/io-infra/blob/main/src/domains/selfcare/prod/westeurope"
        }
        # (28 unchanged attributes hidden)

      ~ site_config {
            # (25 unchanged attributes hidden)

          ~ ip_restriction {
                name                      = "rule"
              ~ virtual_network_subnet_id = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-rg-common/providers/Microsoft.Network/virtualNetworks/io-p-vnet-common/subnets/io-p-selfcare-be-common-snet" -> "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-rg-common/providers/Microsoft.Network/virtualNetworks/io-p-vnet-common/subnets/io-p-github-runner-snet"
                # (3 unchanged attributes hidden)
            }
          ~ ip_restriction {
                name                      = "rule"
              ~ virtual_network_subnet_id = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-itn-common-rg-01/providers/Microsoft.Network/virtualNetworks/io-p-itn-common-vnet-01/subnets/io-p-itn-svc-bo-app-snet-01" -> "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-rg-common/providers/Microsoft.Network/virtualNetworks/io-p-vnet-common/subnets/io-p-selfcare-be-common-snet"
                # (3 unchanged attributes hidden)
            }
          ~ ip_restriction {
              - ip_address                = "51.144.56.96/28" -> null
                name                      = "rule"
              + virtual_network_subnet_id = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-itn-common-rg-01/providers/Microsoft.Network/virtualNetworks/io-p-itn-common-vnet-01/subnets/io-p-itn-svc-bo-app-snet-01"
                # (3 unchanged attributes hidden)
            }
          ~ ip_restriction {
              ~ ip_address = "51.144.56.112/28" -> "51.144.56.96/28"
                name       = "rule"
                # (3 unchanged attributes hidden)
            }
          ~ ip_restriction {
              ~ ip_address = "51.144.56.128/28" -> "51.144.56.112/28"
                name       = "rule"
                # (3 unchanged attributes hidden)
            }
          ~ ip_restriction {
              ~ ip_address = "51.144.56.144/28" -> "51.144.56.128/28"
                name       = "rule"
                # (3 unchanged attributes hidden)
            }
          ~ ip_restriction {
              ~ ip_address = "51.144.56.160/28" -> "51.144.56.144/28"
                name       = "rule"
                # (3 unchanged attributes hidden)
            }
          ~ ip_restriction {
              ~ ip_address = "51.144.56.176/28" -> "51.144.56.160/28"
                name       = "rule"
                # (3 unchanged attributes hidden)
            }
          ~ ip_restriction {
              + ip_address                = "51.144.56.176/28"
              ~ name                      = "io-p-github-runner-snet" -> "rule"
              - virtual_network_subnet_id = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-rg-common/providers/Microsoft.Network/virtualNetworks/io-p-vnet-common/subnets/io-p-github-runner-snet" -> null
                # (3 unchanged attributes hidden)
            }

            # (1 unchanged block hidden)
        }

        # (1 unchanged block hidden)
    }

  # module.app_services.module.function_subscriptionmigrations_staging_slot.azurerm_linux_function_app_slot.this will be updated in-place
  ~ resource "azurerm_linux_function_app_slot" "this" {
        id                                             = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-selfcare-be-rg/providers/Microsoft.Web/sites/io-p-subsmigrations-fn/slots/staging"
        name                                           = "staging"
        tags                                           = {
            "CostCenter"     = "TS310 - PAGAMENTI & SERVIZI"
            "CreatedBy"      = "Terraform"
            "Environment"    = "Prod"
            "ManagementTeam" = "IO Enti & Servizi"
            "Owner"          = "IO"
            "Source"         = "https://github.com/pagopa/io-infra/blob/main/src/domains/selfcare/prod/westeurope"
        }
        # (24 unchanged attributes hidden)

      ~ site_config {
            # (25 unchanged attributes hidden)

          ~ ip_restriction {
                name                      = "rule"
              ~ virtual_network_subnet_id = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-rg-common/providers/Microsoft.Network/virtualNetworks/io-p-vnet-common/subnets/azure-devops" -> "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-rg-common/providers/Microsoft.Network/virtualNetworks/io-p-vnet-common/subnets/io-p-github-runner-snet"
                # (3 unchanged attributes hidden)
            }
          + ip_restriction {
              + action                    = "Allow"
              + name                      = "rule"
              + priority                  = 65000
              + virtual_network_subnet_id = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-rg-common/providers/Microsoft.Network/virtualNetworks/io-p-vnet-common/subnets/azure-devops"
            }

            # (1 unchanged block hidden)
        }
    }

Plan: 0 to add, 4 to change, 0 to destroy.

─────────────────────────────────────────────────────────────────────────────

Note: You didn't use the -out option to save this plan, so Terraform can't
guarantee to take exactly these actions if you run "terraform apply" now.

Copy link

@giamma1295 giamma1295 merged commit d6fb959 into main Oct 10, 2024
6 checks passed
@giamma1295 giamma1295 deleted the IOPAE-1447-new-devportal-AD-B2C-userflow branch October 10, 2024 10:34
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.

3 participants