Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use tool behind another Reverse Proxy #7

Open
MaxRink opened this issue Sep 1, 2021 · 4 comments · May be fixed by #9
Open

Unable to use tool behind another Reverse Proxy #7

MaxRink opened this issue Sep 1, 2021 · 4 comments · May be fixed by #9

Comments

@MaxRink
Copy link

MaxRink commented Sep 1, 2021

We wanted to use this proxy in Kubernetes, behind an Ingress Controller.
This seems to cause some issues,as im unable to make a connection:

time="2021-09-01T20:12:57Z" level=debug msg="Incoming request: GET /netbox-test?list-type=2&prefix=&delimiter=%2F&encoding-type=url HTTP/1.1\r\nHost: netbox.hb.das-schiff.telekom.de\r\nAccept-Encoding: identity\r\nAuthorization: AWS4-HMAC-SHA256 Credential=OMKK45MUP3A21NUFBAMO/20210901/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=df917a72082c74b48178fb1aaf8d89662b7857855f66527a68101ea2905c11ab\r\nUser-Agent: aws-cli/1.20.21 Python/3.9.6 Linux/5.14.0-1-MANJARO botocore/1.21.21\r\nX-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\r\nX-Amz-Date: 20210901T201256Z\r\nX-Forwarded-For: 10.27.50.159\r\nX-Forwarded-Host: netbox.hb.das-schiff.telekom.de\r\nX-Forwarded-Port: 443\r\nX-Forwarded-Proto: https\r\nX-Real-Ip: 10.27.50.159\r\nX-Request-Id: bc05d3323e143d19a0340e9bfb9c0e84\r\nX-Scheme: https\r\n\r\n"
time="2021-09-01T20:12:57Z" level=error msg="unable to proxy request" error="invalid signature in Authorization header"
@Kriechi
Copy link
Owner

Kriechi commented Sep 1, 2021

invalid signature in Authorization header indicates that the incoming request was not signed by a valid set of credential that is known to aws-s3-reverse-proxy.

Your requests shows OMKK45MUP3A21NUFBAMO as AWS_ACCESS_KEY_ID.
Did you configure the correct AWS_SECRET_ACCESS_KEY for it, either as CLI args or config file?

I assume you are not proxying AWS S3 actual -- but some other S3 implementation backend?
Because the OMK... prefix does not match any of the well known IAM uniq ID prefixes: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html
(or you simply redacted it, which is totally fine of course!)

@Kriechi
Copy link
Owner

Kriechi commented Sep 1, 2021

The other issue could be in the Ingress Controller (I assume nginx-ingress) which is rewriting some of the headers or query params. Please try and get a full request dump of goes into the nginx-ingress. Then we can compare it against what is sent to the aws-s3-reverse-proxy pod (you already posted this request dump).

@MaxRink
Copy link
Author

MaxRink commented Sep 3, 2021

Its an Netapp Appliance speaking S3, not direct AWS.
I`ll dig into it next week

@luisdavim
Copy link

I'm getting the same error though I'm not using any additional proxies.
To authenticate I also need to pass a AWS_SESSION_TOKEN, I've tried making some modifications to the code to support including it in the signer but I still get the same error.

luisdavim added a commit to luisdavim/aws-s3-reverse-proxy that referenced this issue Jul 26, 2023
- Fixed code lints
- Refactored the code to use `httputil.ReverseProxy` with a director function
- Add caching
- Fixes Kriechi#7
@luisdavim luisdavim linked a pull request Jul 26, 2023 that will close this issue
luisdavim added a commit to luisdavim/aws-s3-reverse-proxy that referenced this issue Jul 26, 2023
- Fixed code lints
- Refactored the code to use `httputil.ReverseProxy` with a director function
- Add caching
- Fixes Kriechi#7

Signed-off-by: Luis Davim <[email protected]>
luisdavim added a commit to luisdavim/aws-s3-reverse-proxy that referenced this issue Jul 26, 2023
- Fixed code lints
- Refactored the code to use `httputil.ReverseProxy` with a director function
- Add caching
- Fixes Kriechi#7

Signed-off-by: Luis Davim <[email protected]>
luisdavim added a commit to luisdavim/aws-s3-reverse-proxy that referenced this issue Jul 26, 2023
- Fixed code lints
- Refactored the code to use `httputil.ReverseProxy` with a director function
- Add caching
- Fixes Kriechi#7

Signed-off-by: Luis Davim <[email protected]>
luisdavim added a commit to luisdavim/aws-s3-reverse-proxy that referenced this issue Jul 26, 2023
- Fixed code lints
- Refactored the code to use `httputil.ReverseProxy` with a director function
- Add caching
- Fixes Kriechi#7

Signed-off-by: Luis Davim <[email protected]>
luisdavim added a commit to luisdavim/aws-s3-reverse-proxy that referenced this issue Jul 27, 2023
- Fixed code lints
- Refactored the code to use `httputil.ReverseProxy` with a director function
- Add caching
- Fixes Kriechi#7

Signed-off-by: Luis Davim <[email protected]>
luisdavim added a commit to luisdavim/aws-s3-reverse-proxy that referenced this issue Jul 27, 2023
- Fixed code lints
- Refactored the code to use `httputil.ReverseProxy` with a director function
- Add caching
- Fixes Kriechi#7

Signed-off-by: Luis Davim <[email protected]>
luisdavim added a commit to luisdavim/aws-s3-reverse-proxy that referenced this issue Jul 27, 2023
- Fixed code lints
- Refactored the code to use `httputil.ReverseProxy` with a director function
- Add caching
- Fixes Kriechi#7

Signed-off-by: Luis Davim <[email protected]>
luisdavim added a commit to luisdavim/aws-s3-reverse-proxy that referenced this issue Jul 27, 2023
- Fixed code lints
- Refactored the code to use `httputil.ReverseProxy` with a director function
- Add caching
- Fixes Kriechi#7

Signed-off-by: Luis Davim <[email protected]>
luisdavim added a commit to luisdavim/aws-s3-reverse-proxy that referenced this issue Jul 27, 2023
- Fixed code lints
- Refactored the code to use `httputil.ReverseProxy` with a director function
- Add caching
- Fixes Kriechi#7

Signed-off-by: Luis Davim <[email protected]>
luisdavim added a commit to luisdavim/aws-s3-reverse-proxy that referenced this issue Jul 27, 2023
- Fixed code lints
- Refactored the code to use `httputil.ReverseProxy` with a director function
- Add caching
- Fixes Kriechi#7

Signed-off-by: Luis Davim <[email protected]>
luisdavim added a commit to luisdavim/aws-s3-reverse-proxy that referenced this issue Jul 27, 2023
- Fixed code lints
- Refactored the code to use `httputil.ReverseProxy` with a director function
- Add caching
- Fixes Kriechi#7

Signed-off-by: Luis Davim <[email protected]>
luisdavim added a commit to luisdavim/aws-s3-reverse-proxy that referenced this issue Jul 27, 2023
- Fixed code lints
- Refactored the code to use `httputil.ReverseProxy` with a director function
- Add caching
- Fixes Kriechi#7

Signed-off-by: Luis Davim <[email protected]>
luisdavim added a commit to luisdavim/aws-s3-reverse-proxy that referenced this issue Jul 27, 2023
- Fixed code lints
- Refactored the code to use `httputil.ReverseProxy` with a director function
- Add caching
- Fixes Kriechi#7

Signed-off-by: Luis Davim <[email protected]>
luisdavim added a commit to luisdavim/aws-s3-reverse-proxy that referenced this issue Jul 27, 2023
- Fixed code lints
- Refactored the code to use `httputil.ReverseProxy` with a director function
- Add caching
- Fixes Kriechi#7

Signed-off-by: Luis Davim <[email protected]>
luisdavim added a commit to luisdavim/aws-s3-reverse-proxy that referenced this issue Jul 27, 2023
- Fixed code lints
- Refactored the code into packages
- Add caching
- Fixes Kriechi#7

Signed-off-by: Luis Davim <[email protected]>
luisdavim added a commit to luisdavim/aws-s3-reverse-proxy that referenced this issue Jul 27, 2023
- Fixed code lints
- Refactored the code into packages
- Add caching
- Fixes Kriechi#7

Signed-off-by: Luis Davim <[email protected]>
luisdavim added a commit to luisdavim/aws-s3-reverse-proxy that referenced this issue Jul 27, 2023
- Fixed code lints
- Refactored the code into packages
- Add caching
- Fixes Kriechi#7

Signed-off-by: Luis Davim <[email protected]>
luisdavim added a commit to luisdavim/aws-s3-reverse-proxy that referenced this issue Jul 27, 2023
- Fixed code lints
- Refactored the code into packages
- Add caching
- Fixes Kriechi#7

Signed-off-by: Luis Davim <[email protected]>
luisdavim added a commit to luisdavim/aws-s3-reverse-proxy that referenced this issue Jul 27, 2023
- Fixed code lints
- Refactored the code into packages
- Add caching
- Fixes Kriechi#7

Signed-off-by: Luis Davim <[email protected]>
luisdavim added a commit to luisdavim/aws-s3-reverse-proxy that referenced this issue Jul 27, 2023
- Fixed code lints
- Refactored the code into packages
- Add caching
- Fixes Kriechi#7

Signed-off-by: Luis Davim <[email protected]>
luisdavim added a commit to luisdavim/aws-s3-reverse-proxy that referenced this issue Jul 27, 2023
- Fixed code lints
- Refactored the code into packages
- Add caching
- Add a helm chart to deploy to k8s
- Fixes Kriechi#7

Signed-off-by: Luis Davim <[email protected]>
luisdavim added a commit to luisdavim/aws-s3-reverse-proxy that referenced this issue Jul 27, 2023
- Fixed code lints
- Refactored the code into packages
- Add caching
- Add a helm chart to deploy to k8s
- Fixes Kriechi#7

Signed-off-by: Luis Davim <[email protected]>
luisdavim added a commit to luisdavim/aws-s3-reverse-proxy that referenced this issue Jul 27, 2023
- Fixed code lints
- Refactored the code into packages
- Add caching
- Add a helm chart to deploy to k8s
- Fixes Kriechi#7

Signed-off-by: Luis Davim <[email protected]>
luisdavim added a commit to luisdavim/aws-s3-reverse-proxy that referenced this issue Jul 27, 2023
- Fixed code lints
- Refactored the code into packages
- Add caching
- Add a helm chart to deploy to k8s
- Fixes Kriechi#7

Signed-off-by: Luis Davim <[email protected]>
luisdavim added a commit to luisdavim/aws-s3-reverse-proxy that referenced this issue Jul 27, 2023
- Fixed code lints
- Refactored the code into packages
- Add caching
- Add a helm chart to deploy to k8s
- Fixes Kriechi#7

Signed-off-by: Luis Davim <[email protected]>
luisdavim added a commit to luisdavim/aws-s3-reverse-proxy that referenced this issue Jul 27, 2023
- Fixed code lints
- Refactored the code into packages
- Add caching
- Add a helm chart to deploy to k8s
- Fixes Kriechi#7

Signed-off-by: Luis Davim <[email protected]>
luisdavim added a commit to luisdavim/aws-s3-reverse-proxy that referenced this issue Jul 27, 2023
- Fixed code lints
- Refactored the code into packages
- Add caching
- Add a helm chart to deploy to k8s
- Fixes Kriechi#7

Signed-off-by: Luis Davim <[email protected]>
luisdavim added a commit to luisdavim/aws-s3-reverse-proxy that referenced this issue Jul 27, 2023
- Fixed code lints
- Refactored the code into packages
- Add caching
- Add a helm chart to deploy to k8s
- Fixes Kriechi#7

Signed-off-by: Luis Davim <[email protected]>
luisdavim added a commit to luisdavim/aws-s3-reverse-proxy that referenced this issue Jul 27, 2023
- Fixed code lints
- Refactored the code into packages
- Add caching
- Add a helm chart to deploy to k8s
- Fixes Kriechi#7

Signed-off-by: Luis Davim <[email protected]>
luisdavim added a commit to luisdavim/aws-s3-reverse-proxy that referenced this issue Jul 27, 2023
- Fixed code lints
- Refactored the code into packages
- Add caching
- Add a helm chart to deploy to k8s
- Fixes Kriechi#7

Signed-off-by: Luis Davim <[email protected]>
luisdavim added a commit to luisdavim/aws-s3-reverse-proxy that referenced this issue Jul 27, 2023
- Fixed code lints
- Refactored the code into packages
- Add caching
- Add a helm chart to deploy to k8s
- Fixes Kriechi#7

Signed-off-by: Luis Davim <[email protected]>
luisdavim added a commit to luisdavim/aws-s3-reverse-proxy that referenced this issue Jul 27, 2023
- Fixed code lints
- Refactored the code into packages
- Add caching
- Add a helm chart to deploy to k8s
- Fixes Kriechi#7

Signed-off-by: Luis Davim <[email protected]>
luisdavim added a commit to luisdavim/aws-s3-reverse-proxy that referenced this issue Jul 27, 2023
- Fixed code lints
- Refactored the code into packages
- Add caching
- Add a helm chart to deploy to k8s
- Fixes Kriechi#7

Signed-off-by: Luis Davim <[email protected]>
luisdavim added a commit to luisdavim/aws-s3-reverse-proxy that referenced this issue Jul 27, 2023
- Fixed code lints
- Refactored the code into packages
- Add caching
- Add a helm chart to deploy to k8s
- Fixes Kriechi#7

Signed-off-by: Luis Davim <[email protected]>
luisdavim added a commit to luisdavim/aws-s3-reverse-proxy that referenced this issue Jul 28, 2023
- Fixed code lints
- Refactored the code into packages
- Add caching
- Add a helm chart to deploy to k8s
- Fixes Kriechi#7

Signed-off-by: Luis Davim <[email protected]>
luisdavim added a commit to luisdavim/aws-s3-reverse-proxy that referenced this issue Jul 28, 2023
- Fixed code lints
- Refactored the code into packages
- Add caching
- Add a helm chart to deploy to k8s
- Fixes Kriechi#7

Signed-off-by: Luis Davim <[email protected]>
luisdavim added a commit to luisdavim/aws-s3-reverse-proxy that referenced this issue Jul 28, 2023
- Fixed code lints
- Refactored the code into packages
- Add caching
- Add a helm chart to deploy to k8s
- Fixes Kriechi#7

Signed-off-by: Luis Davim <[email protected]>
luisdavim added a commit to luisdavim/aws-s3-reverse-proxy that referenced this issue Jul 28, 2023
- Fixed code lints
- Refactored the code into packages
- Add caching
- Add a helm chart to deploy to k8s
- Fixes Kriechi#7

Signed-off-by: Luis Davim <[email protected]>
luisdavim added a commit to luisdavim/aws-s3-reverse-proxy that referenced this issue Jul 28, 2023
- Fixed code lints
- Refactored the code into packages
- Add caching
- Add a helm chart to deploy to k8s
- Fixes Kriechi#7

Signed-off-by: Luis Davim <[email protected]>
luisdavim added a commit to luisdavim/aws-s3-reverse-proxy that referenced this issue Jul 28, 2023
- Fixed code lints
- Refactored the code into packages
- Add caching
- Add a helm chart to deploy to k8s
- Fixes Kriechi#7

Signed-off-by: Luis Davim <[email protected]>
luisdavim added a commit to luisdavim/aws-s3-reverse-proxy that referenced this issue Jul 29, 2023
- Fixed code lints
- Refactored the code into packages
- Add caching
- Add a helm chart to deploy to k8s
- Fixes Kriechi#7

Signed-off-by: Luis Davim <[email protected]>
luisdavim added a commit to luisdavim/aws-s3-reverse-proxy that referenced this issue Jul 29, 2023
- Fixed code lints
- Refactored the code into packages
- Add caching
- Add a helm chart to deploy to k8s
- Fixes Kriechi#7

Signed-off-by: Luis Davim <[email protected]>
luisdavim added a commit to luisdavim/aws-s3-reverse-proxy that referenced this issue Jul 29, 2023
- Fixed code lints
- Refactored the code into packages
- Add caching
- Add a helm chart to deploy to k8s
- Fixes Kriechi#7

Signed-off-by: Luis Davim <[email protected]>
luisdavim added a commit to luisdavim/aws-s3-reverse-proxy that referenced this issue Jul 29, 2023
- Fixed code lints
- Refactored the code into packages
- Add caching
- Add a helm chart to deploy to k8s
- Fixes Kriechi#7

Signed-off-by: Luis Davim <[email protected]>
luisdavim added a commit to luisdavim/aws-s3-reverse-proxy that referenced this issue Jul 29, 2023
- Fixed code lints
- Refactored the code into packages
- Add caching
- Add a helm chart to deploy to k8s
- Fixes Kriechi#7

Signed-off-by: Luis Davim <[email protected]>
luisdavim added a commit to luisdavim/aws-s3-reverse-proxy that referenced this issue Jul 29, 2023
- Fixed code lints
- Refactored the code into packages
- Add caching
- Add a helm chart to deploy to k8s
- Fixes Kriechi#7

Signed-off-by: Luis Davim <[email protected]>
luisdavim added a commit to luisdavim/aws-s3-reverse-proxy that referenced this issue Jul 29, 2023
- Fixed code lints
- Refactored the code into packages
- Add caching
- Add a helm chart to deploy to k8s
- Fixes Kriechi#7

Signed-off-by: Luis Davim <[email protected]>
luisdavim added a commit to luisdavim/aws-s3-reverse-proxy that referenced this issue Jul 29, 2023
- Fixed code lints
- Refactored the code into packages
- Add caching
- Add a helm chart to deploy to k8s
- Fixes Kriechi#7

Signed-off-by: Luis Davim <[email protected]>
luisdavim added a commit to luisdavim/aws-s3-reverse-proxy that referenced this issue Jul 29, 2023
- Fixed code lints
- Refactored the code into packages
- Add caching
- Add a helm chart to deploy to k8s
- Fixes Kriechi#7

Signed-off-by: Luis Davim <[email protected]>
luisdavim added a commit to luisdavim/aws-s3-reverse-proxy that referenced this issue Jul 29, 2023
- Fixed code lints
- Refactored the code into packages
- Add caching
- Add a helm chart to deploy to k8s
- Fixes Kriechi#7

Signed-off-by: Luis Davim <[email protected]>
luisdavim added a commit to luisdavim/aws-s3-reverse-proxy that referenced this issue Jul 30, 2023
- Fixed code lints
- Refactored the code into packages
- Add caching
- Add a helm chart to deploy to k8s
- Fixes Kriechi#7

Signed-off-by: Luis Davim <[email protected]>
luisdavim added a commit to luisdavim/aws-s3-reverse-proxy that referenced this issue Jul 30, 2023
- Fixed code lints
- Refactored the code into packages
- Add caching
- Add a helm chart to deploy to k8s
- Fixes Kriechi#7

Signed-off-by: Luis Davim <[email protected]>
luisdavim added a commit to luisdavim/aws-s3-reverse-proxy that referenced this issue Jul 31, 2023
- Fixed code lints
- Refactored the code into packages
- Add caching
- Add a helm chart to deploy to k8s
- Fixes Kriechi#7

Signed-off-by: Luis Davim <[email protected]>
luisdavim added a commit to luisdavim/aws-s3-reverse-proxy that referenced this issue Aug 2, 2023
- Fixed code lints
- Refactored the code into packages
- Add caching
- Add a helm chart to deploy to k8s
- Fixes Kriechi#7

Signed-off-by: Luis Davim <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants