I have an ECS cluster with a private IP address that corresponds to the target IP address of EC2 Load Balancing Target Group that corresponds to a specific Load Balancer. When an HTTP request is made to this load balancer I'd like it to present a prompt for HTTP Basic Authorization credentials. How might I do this? Is it even possible?
I'd also like to put some restrictions on the path as well.
<If "req('Host') =~ /mywebsite.com$/ && %{REQUEST_URI} !~ /agreement/">
Include /etc/apache2/conf-available/htpasswd.conf
</If>
Is this possible?
In the Load Balancer management page I can add and edit listeners. If the listener is using HTTPS I can add a rule that has an "Authenticate..." action but the two options available to me are Amazon Cognito and OIDC, neither of which seem to do HTTP Basic Authorization. I guess AWS Lambda lets you create Lambda based authorizers instead of having to use Amazon Cognito per https://www.cloudmailin.com/blog/basic_auth_with_aws_lambda but it doesn't look like you can use Lambda's with Load Balancers on AWS?
question from:
https://stackoverflow.com/questions/65901615/setting-up-a-http-basic-authorization-password-for-aws-ec2-load-balancer 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…