-
Notifications
You must be signed in to change notification settings - Fork 550
Closed
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
plugins/source/aws/policies/queries/elb/elbv2_redirect_http_to_https.sql:
protocol = 'HTTP' and (
da->>'Type' != 'REDIRECT' or da->'RedirectConfig'->>'Protocol' != 'HTTPS')
then 'fail'
this code tries to match on uppercase "REDIRECT", while in my case I found the keyword as returned by AWS is lowercase.
e.g. running select default_actions from aws_elbv2_listeners limit 1; gives this:
[
{
"Type": "redirect",
"Order": 1,
"ForwardConfig": null,
"RedirectConfig": {
"Host": "#{host}",
"Path": "/#{path}",
"Port": "443",
"Query": "#{query}",
"Protocol": "HTTPS",
"StatusCode": "HTTP_301"
},
"TargetGroupArn": null,
"FixedResponseConfig": null,
"AuthenticateOidcConfig": null,
"AuthenticateCognitoConfig": null
}
]
Expected Behavior
the correct code in elbv2_redirect_http_to_https.sql should be
protocol = 'HTTP' and (
da->>'Type' != 'redirect' or da->'RedirectConfig'->>'Protocol' != 'HTTPS')
then 'fail'
OR
protocol = 'HTTP' and (
UPPER(da->>'Type') != 'REDIRECT' or da->'RedirectConfig'->>'Protocol' != 'HTTPS')
then 'fail'
CloudQuery (redacted) config
N/A
Steps To Reproduce
N/A
CloudQuery (redacted) logs
N/A
CloudQuery version
I don't know
Additional Context
No response
Pull request (optional)
- I can submit a pull request
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels