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

Using SSL options in BucketFS connection #87

Merged
merged 3 commits into from
Feb 20, 2024

Conversation

ahsimb
Copy link
Collaborator

@ahsimb ahsimb commented Feb 20, 2024

closes #86

@ahsimb ahsimb added the feature Product feature label Feb 20, 2024
@ahsimb ahsimb self-assigned this Feb 20, 2024

sslopt = _extract_ssl_options(conf)
verify = sslopt.get("cert_reqs") == ssl.CERT_REQUIRED
verify = sslopt.get("ca_certs") or sslopt.get("ca_cert_path") or verify
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think, that doesn't do what you expect, I think, you want to assign either sslopt.get("ca_certs") or sslopt.get("ca_cert_path") or verify, however the or operation will force conversion to boolean

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sslopt is a temporary object. There is a function that creates it from the data in the secret store. It checks if the provided files and directories actually exist, so I thought it would be good to use it.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sslopt is not the issue, I am not sure, if the "or" assignment works

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't convert to boolean. See the last test.

Comment on lines 159 to 160
Currently, it's not possible to set any of the TLS/SSL parameters. If secured comm
is selected it automatically sets the certificate validation on.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be removed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, yes, thanks for spotting it.

@ahsimb ahsimb merged commit 54af3e7 into main Feb 20, 2024
12 checks passed
@ahsimb ahsimb deleted the feature/86-use-bucketfs-python-ssl branch February 20, 2024 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Product feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use bucketfs-python new SSL verification option
3 participants