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

Add possibility to skip certificate validation #131

Merged
merged 2 commits into from
Aug 23, 2024

Conversation

tanganellilore
Copy link
Contributor

Hi team,

i simply add the possibility to skip ssl verification if verify is null.
In cs library we need to se dangerous_no_tls_verify to true for skip verification.

I simply add this on this pull request

@resmo
Copy link
Member

resmo commented Aug 22, 2024

Hi @tanganellilore

The cs doc says:

A CLOUDSTACK_VERIFY (optional) environment variable pointing to a CA authority cert file,

So if no api_verify_ssl_cert is set, it will use the internal trust store to verify the client cert. However, your change would turn verify off if no CA file is given (is null) so this would result in a security flaw.

We should add another argument for turning cert validation off! The common argument in other ansible modules is validate_certs (bool) with default=true, so we should reuse this argument name.

(see e.g. https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/get_url.py#L113)

and set dangerous_no_tls_verify according this value.

Copy link
Member

@resmo resmo left a comment

Choose a reason for hiding this comment

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

see comment

@tanganellilore
Copy link
Contributor Author

tanganellilore commented Aug 22, 2024

Hi @resmo ,
do you think that i need to add also Env variable also for this?
like CLOUDSTACK_VALIDATE_CERTS

@resmo
Copy link
Member

resmo commented Aug 22, 2024

Hi @resmo , do you think that i need to add also Env variable also for this? like CLOUDSTACK_VALIDATE_CERTS

No need, I would assume if you set CLOUDSTACK_DANGEROUS_NO_TLS_VERIFY=true it would already work as expected.

see https://github.com/exoscale/cs/blob/master/cs/client.py#L579

But a doc note would be appreciated.

@tanganellilore
Copy link
Contributor Author

Modified as requested

@resmo resmo merged commit 1f84c5d into ngine-io:master Aug 23, 2024
@tanganellilore tanganellilore deleted the add_skip_verify branch September 13, 2024 10:58
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 this pull request may close these issues.

2 participants