aws elbv2 listener rules to support basic auth by returning fixed response with "WWW-Authenticate"

118 Views Asked by At

I am looking for setting up basic authentication mechanism using aws elb. It does support listener rules where in if specific header match then return fixed response however it looks like the fixed response is limited to headers ContentType only.

aws elbv2 modify-rule --rule-arn arn:aws:elasticloadbalancing:us-east-2:blah:listener-rule/app/blah --actions '{"Type": "fixed-response","Order": 1,"FixedResponseConfig": {"StatusCode": "401","ContentType": "text/plain","WWW-Authenticate" : "Basic realm="my realm""}}'

It looks like its not supported? Is there a reason for not supporting such a requirement ?

I get an error Parameter validation failed: Unknown parameter in Actions[0].FixedResponseConfig: "WWW-Authenticate", must be one of: MessageBody, StatusCode, ContentType

0

There are 0 best solutions below