{"id":19508910,"url":"https://github.com/rhythmictech/terraform-aws-elb-cognito-auth","last_synced_at":"2025-02-25T22:42:28.653Z","repository":{"id":98716803,"uuid":"275858284","full_name":"rhythmictech/terraform-aws-elb-cognito-auth","owner":"rhythmictech","description":null,"archived":false,"fork":false,"pushed_at":"2021-05-10T19:32:57.000Z","size":19,"stargazers_count":7,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-08T11:41:02.071Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rhythmictech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-29T15:40:32.000Z","updated_at":"2024-11-12T10:53:49.000Z","dependencies_parsed_at":"2023-05-24T21:45:15.753Z","dependency_job_id":null,"html_url":"https://github.com/rhythmictech/terraform-aws-elb-cognito-auth","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhythmictech%2Fterraform-aws-elb-cognito-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhythmictech%2Fterraform-aws-elb-cognito-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhythmictech%2Fterraform-aws-elb-cognito-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhythmictech%2Fterraform-aws-elb-cognito-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rhythmictech","download_url":"https://codeload.github.com/rhythmictech/terraform-aws-elb-cognito-auth/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240761095,"owners_count":19853254,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T23:10:20.383Z","updated_at":"2025-02-25T22:42:28.628Z","avatar_url":"https://github.com/rhythmictech.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# terraform-aws-elb-cognito-auth\n\n[![tflint](https://github.com/rhythmictech/terraform-aws-elb-cognito-auth/workflows/tflint/badge.svg?branch=main\u0026event=push)](https://github.com/rhythmictech/terraform-aws-elb-cognito-auth/actions?query=workflow%3Atflint+event%3Apush+branch%3Amain)\n[![tfsec](https://github.com/rhythmictech/terraform-aws-elb-cognito-auth/workflows/tfsec/badge.svg?branch=main\u0026event=push)](https://github.com/rhythmictech/terraform-aws-elb-cognito-auth/actions?query=workflow%3Atfsec+event%3Apush+branch%3Amain)\n[![yamllint](https://github.com/rhythmictech/terraform-aws-elb-cognito-auth/workflows/yamllint/badge.svg?branch=main\u0026event=push)](https://github.com/rhythmictech/terraform-aws-elb-cognito-auth/actions?query=workflow%3Ayamllint+event%3Apush+branch%3Amain)\n[![misspell](https://github.com/rhythmictech/terraform-aws-elb-cognito-auth/workflows/misspell/badge.svg?branch=main\u0026event=push)](https://github.com/rhythmictech/terraform-aws-elb-cognito-auth/actions?query=workflow%3Amisspell+event%3Apush+branch%3Amain)\n[![pre-commit-check](https://github.com/rhythmictech/terraform-aws-elb-cognito-auth/workflows/pre-commit-check/badge.svg?branch=main\u0026event=push)](https://github.com/rhythmictech/terraform-aws-elb-cognito-auth/actions?query=workflow%3Apre-commit-check+event%3Apush+branch%3Amain)\n\u003ca href=\"https://twitter.com/intent/follow?screen_name=RhythmicTech\"\u003e\u003cimg src=\"https://img.shields.io/twitter/follow/RhythmicTech?style=social\u0026logo=RhythmicTech\" alt=\"follow on Twitter\"\u003e\u003c/a\u003e\n\nThis module creates an ALB listener rule that is configured for Cognito authentication using a local user pool. It can also be used with a supplied Cognito user pool allowing for greater customizability. This module is meant to be a better solution when you need to protect web assets and don't want to use server-side HTTP basic authentication (e.g., to keep the general public out of a staging site). Among other benefits, this means your backend configuration does not have to change to restrict access and also means that users can have individual usernames/passwords that they can perform account resets on.\n\n## Example\nHere's what using the module will look like\n```hcl\nmodule \"cognitoauth\" {\n  source           = \"rhythmictech/aws/elb-cognito-auth\n\n  name             = \"example\"\n  callback_urls    = [\"https://aliasformyelb.mysite.com/\"]\n  listener_arn     = aws_lb_listener.this.arn\n  target_group_arn = aws_lb_target_group.this.id\n  user_pool_domain = \"aliasformyelb\"\n}\n\n```\n\n## Warning\nThe ELB security group must allow outbound HTTPS access so that it can talk to Cognito. This also requires any other relevant routing rules to be in place, such as NACLs. \n\n\u003c!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK --\u003e\n## Requirements\n\n| Name | Version |\n|------|---------|\n| terraform | \u003e= 0.12.19 |\n\n## Providers\n\n| Name | Version |\n|------|---------|\n| aws | n/a |\n\n## Inputs\n\n| Name | Description | Type | Default | Required |\n|------|-------------|------|---------|:--------:|\n| callback\\_urls | URLs that are associated with the load balancer (include protocol but not a trailing /) | `list(string)` | n/a | yes |\n| listener\\_arn | Listener to attach rule to | `string` | n/a | yes |\n| target\\_group\\_arn | Target group to forward authenticated requests to | `string` | n/a | yes |\n| authenticated\\_path | Path prefix to apply Cognito auth to | `string` | `\"/*\"` | no |\n| auto\\_verified\\_attributes | The attribute to be auto-verified. Possible values: email, phone\\_number | `list(string)` | \u003cpre\u003e[\u003cbr\u003e  \"email\"\u003cbr\u003e]\u003c/pre\u003e | no |\n| create\\_cognito\\_pool | Create a Cognito user pool? If false, `user_pool_arn`, `user_pool_client_id`, and `user_pool_domain` must be specified. | `bool` | `true` | no |\n| email\\_sending\\_account | The email delivery method to use. COGNITO\\_DEFAULT for the default email functionality built into Cognito or DEVELOPER to use your Amazon SES configuration. | `string` | `\"COGNITO_DEFAULT\"` | no |\n| email\\_source\\_arn | The ARN of the SES verified email identity to to use. Required if email\\_sending\\_account is set to DEVELOPER. | `string` | `null` | no |\n| enabled | Is this module enabled? If set to false, this will do nothing | `bool` | `true` | no |\n| mfa\\_configuration | (Default: OFF) Set to enable multifactor authentication. Must be one of the following values (ON, OFF, OPTIONAL) | `string` | `\"OFF\"` | no |\n| name | Name to prefix resources with | `string` | `\"cognitoauthorizer\"` | no |\n| password\\_minimum\\_length | The minimum length of the password policy that you have set | `string` | `\"8\"` | no |\n| password\\_require\\_lowercase | Whether you have required users to use at least one lowercase letter in their password | `bool` | `true` | no |\n| password\\_require\\_numbers | Whether you have required users to use at least one number in their password | `bool` | `true` | no |\n| password\\_require\\_symbols | Whether you have required users to use at least on symbol in their password | `bool` | `true` | no |\n| password\\_require\\_uppercase | Whether you have required users to use at least one uppercase letter in their password | `bool` | `true` | no |\n| rule\\_priority | Rule priority to use. Must not already be in use by another rule on the listener. Omit to automatically place the rule. | `number` | `null` | no |\n| sms\\_authentication\\_message | A string representing the SMS verification message. Conflicts with verification\\_message\\_template configuration block sms\\_message argument | `string` | `\"Your authentication code is {####}.\"` | no |\n| tags | Tags to apply to supported resources | `map(string)` | `{}` | no |\n| temporary\\_password\\_validity\\_days | The user account expiration limit, in days, after which the account is no longer usable | `number` | `14` | no |\n| user\\_pool\\_arn | User Pool ARN for existing pool. Must be specified if `create_cognito_pool` is true | `string` | `null` | no |\n| user\\_pool\\_client\\_id | User Pool Client ID for existing pool. Must be specified if `create_cognito_pool` is true | `string` | `null` | no |\n| user\\_pool\\_domain | The domain string. Must be specified if `create_cognito_pool` is true | `string` | `null` | no |\n\n## Outputs\n\n| Name | Description |\n|------|-------------|\n| lb\\_listener\\_rule\\_arn | AWS LB Listener Rule ARN |\n| user\\_pool\\_arn | Cognito User Pool ARN (will return the user provided ARN if `create_cognito_pool = false`) |\n| user\\_pool\\_client\\_id | Cognito User Pool ARN (will return the user provided ARN if `create_cognito_pool = false`) |\n| user\\_pool\\_domain | Cognito User Pool ARN (will return the user provided ARN if `create_cognito_pool = false`) |\n\n\u003c!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhythmictech%2Fterraform-aws-elb-cognito-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frhythmictech%2Fterraform-aws-elb-cognito-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhythmictech%2Fterraform-aws-elb-cognito-auth/lists"}