Skip to content

Commit

Permalink
chore: allowlist set-cookie and change expiry units
Browse files Browse the repository at this point in the history
  • Loading branch information
8lane authored and ChristianAMartin committed Feb 17, 2025
1 parent 012e96b commit 6f0da92
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 2 additions & 0 deletions terraform/20-app/cloud-front.front-end.tf
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,11 @@ resource "aws_cloudfront_origin_request_policy" "front_end_auth" {
items = [
"Accept",
"Content-Type",
"Set-Cookie",
]
}
}

query_strings_config {
query_string_behavior = "all"
}
Expand Down
12 changes: 9 additions & 3 deletions terraform/modules/cognito/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,15 @@ resource "aws_cognito_user_pool_client" "user_pool_client" {
allowed_oauth_flows_user_pool_client = true
allowed_oauth_scopes = ["openid", "email", "profile", "aws.cognito.signin.user.admin"]

access_token_validity = 1 # 1 hour
id_token_validity = 1 # 1 hour
refresh_token_validity = 720 # 720 hours (30 days)
access_token_validity = 60 # 60 minutes
id_token_validity = 60 # 60 minutes
refresh_token_validity = 30 # 30 days

token_validity_units {
access_token = "minutes"
id_token = "minutes"
refresh_token = "days"
}

prevent_user_existence_errors = "ENABLED"

Expand Down

0 comments on commit 6f0da92

Please sign in to comment.