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

Proxy Mode SSL Error #42

Open
singergs opened this issue Oct 27, 2021 · 3 comments
Open

Proxy Mode SSL Error #42

singergs opened this issue Oct 27, 2021 · 3 comments

Comments

@singergs
Copy link

singergs commented Oct 27, 2021

I'm working with iamlive in proxy mode issued the following command

iamlive --profile iam_AdministratorAccess --mode proxy

then I'm trying to run boto3 scripts heres a snippet:

import boto3
from botocore.config import Config

aws_config=Config(proxies={'https': 'https://localhost:10080'})
s3 = boto3.client('s3', config=aws_config)
print(s3.list_objects(Bucket='files-exported-here'))

I receive an error:

botocore.exceptions.SSLError: SSL validation failed [SSL: WRONG_VERSION_NUMBER] wrong version number

My question is should I try and recreate the cert bundle to be used with boto3?
-- the profile does contain ca_bundle = ~/.iamlive/ca.pem

Also proxy mode will work for general awscli commands. Not sure what needs to be added to a python script.

Main goal is to get the resources enumerated when running python commands.

@iann0036
Copy link
Owner

iann0036 commented Nov 7, 2021

You may need to drop the s in your proxy config?

https://

@singergs
Copy link
Author

Thanks i'll give it another go. Thanks. i have been working with the tool the last few weeks.

@timblaktu
Copy link

You may need to drop the s in your proxy config?

https://

@iann0036 I'm curious about this suggestion, and whether it's a may or a must.

As described over in this issue, I couldn't get any of my inter-container proxying working without making HTTPS_PROXY == HTTP_PROXY == http://:. I hadn't properly read the proxy mode docs which suggest to use http for both variables, so I had https for the HTTPS variable. I ran the AWS CLI with --debug which gave me an error indicating that the proxy was only listening on http. I think the code corroborate this, but I wonder if this should be made more clear in the README.

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