-
Notifications
You must be signed in to change notification settings - Fork 1
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
fix: [SIW-1481] added magic link jwt validation #196
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gunzip
reviewed
Sep 4, 2024
grausof
approved these changes
Sep 4, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
📖 Terraform Plan ('infra/resources/prod') - successTerraform Planmodule.function_apps.module.function_app_user_autoscaler.data.azurerm_linux_function_app.this[0]: Still reading... [10s elapsed]
module.function_apps.module.function_app_user_autoscaler.data.azurerm_linux_function_app.this[0]: 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.function_apps.module.function_app_user.azurerm_linux_function_app.this will be updated in-place
~ resource "azurerm_linux_function_app" "this" {
~ app_settings = {
+ "ExchangeJwtIssuer" = "api-web.io.pagopa.it/ioweb/backend"
+ "ExchangeJwtPubKey" = "LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQklqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUFyNjlzOGVrRWRaSER2eTdZR1hnSEVPZUMvNEVpTVRJMDdYcUh6YjFQZi9IeDNTRW9lZkl3RXplRHcvSVZmd0FDUVMxdm5VeEJRemNPdXlGY1R3ZU9raFZ2NERVMmdLU1FIaC9kcklFZVBjZlgwcjBJYWNpeXZPVDE1TzdNWHQ2VE1FOWhTY2llM0cxT0pZRXlOZUFJVlBnUjN0S1ZTWEU5Wkk0VmthQzc4bFlrUVV4SDFaRkFUMk5ZNWNzZGo5Wi9sOTBCUHpMSzF0OFlqdDV5Z2w2UzkxQlNoMmk2QW5tZ041MUZxNXRZMTlJOTFuR09TSUpmRnVhY1hmbjZTRytHbUp3QWxSRHl3TUVXNU9mV0NYS3didDBFQkFsRWRoeitRRXdSYkg1WXVNRnR3VThhUnNobTgzRFI0VVI0dmV6cXlOOVpuQmM1cEtjYzkzTjQzMVRCTXdJREFRQUIKLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0t"
- "WEBSITE_SWAP_WARMUP_PING_PATH" = "/api/v1/wallet/health" -> null
- "WEBSITE_SWAP_WARMUP_PING_STATUSES" = "200" -> null
# (50 unchanged elements hidden)
}
id = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-itn-wallet-rg-01/providers/Microsoft.Web/sites/io-p-itn-wallet-user-func-01"
name = "io-p-itn-wallet-user-func-01"
tags = {
"CostCenter" = "TS310 - PAGAMENTI & SERVIZI"
"CreatedBy" = "Terraform"
"Environment" = "Prod"
"ManagementTeam" = "IO Wallet"
"Owner" = "IO"
"Source" = "https://github.com/pagopa/io-wallet/blob/main/infra/resources/prod"
}
# (26 unchanged attributes hidden)
~ site_config {
~ health_check_eviction_time_in_min = 0 -> 2
# (26 unchanged attributes hidden)
# (1 unchanged block hidden)
}
~ sticky_settings {
~ app_setting_names = [
- "APPINSIGHTS_SAMPLING_PERCENTAGE",
"SLOT_TASK_HUBNAME",
+ "APPINSIGHTS_SAMPLING_PERCENTAGE",
"AzureFunctionsWebHost__hostid",
]
# (1 unchanged attribute hidden)
}
# (1 unchanged block hidden)
}
# module.function_apps.module.function_app_user.azurerm_linux_function_app_slot.this[0] will be updated in-place
~ resource "azurerm_linux_function_app_slot" "this" {
~ app_settings = {
~ "APPINSIGHTS_SAMPLING_PERCENTAGE" = "5" -> "100"
+ "AzureFunctionsWebHost__hostid" = "staging"
~ "CosmosDbEndpoint" = "https://io-silvia-itn-wallet-cosno-01.documents.azure.com:443/" -> "https://io-p-itn-wallet-cosno-01.documents.azure.com:443/"
+ "ExchangeJwtIssuer" = "api-web.io.pagopa.it/ioweb/backend"
+ "ExchangeJwtPubKey" = "LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQklqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FROEFNSUlCQ2dLQ0FRRUFyNjlzOGVrRWRaSER2eTdZR1hnSEVPZUMvNEVpTVRJMDdYcUh6YjFQZi9IeDNTRW9lZkl3RXplRHcvSVZmd0FDUVMxdm5VeEJRemNPdXlGY1R3ZU9raFZ2NERVMmdLU1FIaC9kcklFZVBjZlgwcjBJYWNpeXZPVDE1TzdNWHQ2VE1FOWhTY2llM0cxT0pZRXlOZUFJVlBnUjN0S1ZTWEU5Wkk0VmthQzc4bFlrUVV4SDFaRkFUMk5ZNWNzZGo5Wi9sOTBCUHpMSzF0OFlqdDV5Z2w2UzkxQlNoMmk2QW5tZ041MUZxNXRZMTlJOTFuR09TSUpmRnVhY1hmbjZTRytHbUp3QWxSRHl3TUVXNU9mV0NYS3didDBFQkFsRWRoeitRRXdSYkg1WXVNRnR3VThhUnNobTgzRFI0VVI0dmV6cXlOOVpuQmM1cEtjYzkzTjQzMVRCTXdJREFRQUIKLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0t"
~ "SLOT_TASK_HUBNAME" = "ProductionTaskHub" -> "StagingTaskHub"
~ "TrialSystemApiBaseURL" = "https://api.trial.silvia.it" -> "https://api.trial.pagopa.it"
- "WEBSITE_SWAP_WARMUP_PING_PATH" = "/api/v1/wallet/health" -> null
- "WEBSITE_SWAP_WARMUP_PING_STATUSES" = "200" -> null
# (46 unchanged elements hidden)
}
id = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-itn-wallet-rg-01/providers/Microsoft.Web/sites/io-p-itn-wallet-user-func-01/slots/staging"
name = "staging"
tags = {
"CostCenter" = "TS310 - PAGAMENTI & SERVIZI"
"CreatedBy" = "Terraform"
"Environment" = "Prod"
"ManagementTeam" = "IO Wallet"
"Owner" = "IO"
"Source" = "https://github.com/pagopa/io-wallet/blob/main/infra/resources/prod"
}
# (22 unchanged attributes hidden)
# (2 unchanged blocks hidden)
}
# module.function_apps.module.function_app_user_autoscaler.azurerm_monitor_autoscale_setting.this will be updated in-place
~ resource "azurerm_monitor_autoscale_setting" "this" {
id = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-itn-wallet-rg-01/providers/Microsoft.Insights/autoScaleSettings/io-p-itn-wallet-user-as-01"
name = "io-p-itn-wallet-user-as-01"
tags = {
"CostCenter" = "TS310 - PAGAMENTI & SERVIZI"
"CreatedBy" = "Terraform"
"Environment" = "Prod"
"ManagementTeam" = "IO Wallet"
"Owner" = "IO"
"Source" = "https://github.com/pagopa/io-wallet/blob/main/infra/resources/prod"
}
# (4 unchanged attributes hidden)
~ profile {
name = "Default"
- rule {
- metric_trigger {
- divide_by_instance_count = false -> null
- metric_name = "MemoryPercentage" -> null
- metric_namespace = "microsoft.web/serverfarms" -> null
- metric_resource_id = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-itn-wallet-rg-01/providers/Microsoft.Web/serverfarms/io-p-itn-wallet-user-asp-01" -> null
- operator = "GreaterThan" -> null
- statistic = "Average" -> null
- threshold = 70 -> null
- time_aggregation = "Average" -> null
- time_grain = "PT1M" -> null
- time_window = "PT5M" -> null
}
- scale_action {
- cooldown = "PT1M" -> null
- direction = "Increase" -> null
- type = "ChangeCount" -> null
- value = 1 -> null
}
}
- rule {
- metric_trigger {
- divide_by_instance_count = false -> null
- metric_name = "MemoryPercentage" -> null
- metric_namespace = "microsoft.web/serverfarms" -> null
- metric_resource_id = "/subscriptions/ec285037-c673-4f58-b594-d7c480da4e8b/resourceGroups/io-p-itn-wallet-rg-01/providers/Microsoft.Web/serverfarms/io-p-itn-wallet-user-asp-01" -> null
- operator = "LessThan" -> null
- statistic = "Average" -> null
- threshold = 20 -> null
- time_aggregation = "Average" -> null
- time_grain = "PT1M" -> null
- time_window = "PT5M" -> null
}
- scale_action {
- cooldown = "PT5M" -> null
- direction = "Decrease" -> null
- type = "ChangeCount" -> null
- value = 1 -> null
}
}
# (3 unchanged blocks hidden)
}
}
Plan: 0 to add, 3 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. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
List of Changes
Replaced
HslJwtEnvironment
andhslJwtValidate
with genericJwtEnvironment
andjwtValidate
that contain both hsl and exchange jwt validationMotivation and Context
This PR is about io-web token validation.
Until now only the hsl token validation was implemented, not the validation of the token obtained via the magic link
How Has This Been Tested?
Screenshots (if appropriate):
Checklist: