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

THREESCALE-7836 Refactor TLS InsecureSkipVerify logic to use annotations #858

Merged
merged 2 commits into from
Aug 31, 2023

Conversation

carlkyrillos
Copy link
Contributor

@carlkyrillos carlkyrillos commented Aug 16, 2023

Issue link

THREESCALE-7836

What

This refactors the insecure skip verify logic for the porta client to be enabled via annotations on individual CRs rather than globally as an environment variable.

This PR also add documentation around supported environment variables.

Verification steps

@carlkyrillos carlkyrillos requested a review from a team as a code owner August 16, 2023 14:42
@openshift-ci
Copy link

openshift-ci bot commented Aug 16, 2023

Hi @carlkyrillos. Thanks for your PR.

I'm waiting for a 3scale member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@MStokluska
Copy link
Contributor

/ok-to-test

@austincunningham
Copy link
Contributor

/hold

@eguzki
Copy link
Member

eguzki commented Aug 17, 2023

After #856, by default, the operator verifies TLS connections. That breaks backwards compat. And I think the default behavior should be TLS cerification. However, for backward compatibility or because I am using self-signed certs, me, as a user, how do I enable insecureSkipVerify ?? Let's say I install the operator using OLM (usual way). How do I enable skip verification?

Have you considered reading enable/disable skip TLS verification from an annotation of the CR? I find it more flexible than global setting at the operator level.

@MStokluska
Copy link
Contributor

After #856, by default, the operator verifies TLS connections. That breaks backwards compat. And I think the default behavior should be TLS cerification. However, for backward compatibility or because I am using self-signed certs, me, as a user, how do I enable insecureSkipVerify ?? Let's say I install the operator using OLM (usual way). How do I enable skip verification?

Have you considered reading enable/disable skip TLS verification from an annotation of the CR? I find it more flexible than global setting at the operator level.

That's a good point. Backward compatibility might be an issue, to enable it as it is when installing via operator you can add the required env to the subscription configuration of the operator. To me this is good and makes sense to do it that way rather than via APIM because in my head, an operator configuration is different to 3scale configuration.

@carlkyrillos carlkyrillos changed the title THREESCALE-7836 Added documentation around env vars [WIP] THREESCALE-7836 Added documentation around env vars Aug 17, 2023
@codeclimate
Copy link

codeclimate bot commented Aug 21, 2023

Code Climate has analyzed commit e5c98b1 and detected 2 issues on this pull request.

Here's the issue category breakdown:

Category Count
Duplication 2

View more on Code Climate.

@carlkyrillos carlkyrillos changed the title [WIP] THREESCALE-7836 Added documentation around env vars THREESCALE-7836 Refactor TLS InsecureSkipVerify logic to use annotations Aug 21, 2023
@carlkyrillos
Copy link
Contributor Author

/unhold


| Variable | Options | Type | Default | Details |
|-----------------------------|------------|:--------:|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------|
| THREESCALE_DEBUG | `1` or `0` | Optional | `0` | If `1`, sets the porta client logging to be more verbose. |
Copy link
Contributor

Choose a reason for hiding this comment

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

Small but to be precise, verbose logging is enabled for local by default, disabled for olm

@MStokluska
Copy link
Contributor

Looks good to me, good job!

/lgtm

@austincunningham austincunningham merged commit 13cb44b into 3scale:master Aug 31, 2023
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants