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

Is it possible to use it as an HTTPs Proxy? #59

Open
gcavalcante8808 opened this issue Mar 15, 2022 · 2 comments
Open

Is it possible to use it as an HTTPs Proxy? #59

gcavalcante8808 opened this issue Mar 15, 2022 · 2 comments

Comments

@gcavalcante8808
Copy link

Hi Folks,

I'm evaluating the aws-sigv4-proxy to access some opensearch instances and for that I made the following setup:

docker-compose.yaml

version: '3'

services:
  proxy:
    image: public.ecr.aws/aws-observability/aws-sigv4-proxy:1.2
    environment:
      AWS_ACCESS_KEY_ID:
      AWS_SECRET_ACCESS_KEY:
      AWS_DEFAULT_REGION: us-east-1
      AWS_SESSION_TOKEN:
    command:
      - --host=s3.amazonaws.com
    ports:
      - 8080:8080

After that, I just ran the curl -s -H 'host: s3.amazonaws.com' http://localhost:8080/ and it worked flawlessly! Nice!

But, when I try to use it with awscli for example by setting HTTPS_PROXY variable, the following error occurs:

image

Based on PR #16, I tried to configure name and host as well, but still I got no luck.

Is there a way to make it work using HTTPS_PROXY env var?

@alvinlin123
Copy link
Collaborator

alvinlin123 commented Mar 18, 2022

For some reason if HTTPS_PROXY, then a CONNECT request is made to the sigv4-proxy, which is not meant to be use as a tunnel.

Also I am curious on what's the role of aws-sigv4 proxy if the AWS CLI is used? AWS CLI should already sign the request for you right?

@skeggse
Copy link

skeggse commented Jul 10, 2022

I'd also like to see this support HTTPS, perhaps via a self-signed certificate a la ssl-proxy. I realize I could chain these together, but it'd be preferable to have only one. In my case, I'm reconfiguring a (non-AWS) API client to send requests to https://127.0.0.1:8080, and it only supports HTTPS.

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

No branches or pull requests

3 participants