Skip to content

fix ssl deactivation from catalog properties #2985#3012

Open
MenelikV wants to merge 3 commits intoapache:mainfrom
MenelikV:fix/disable-ssl2985
Open

fix ssl deactivation from catalog properties #2985#3012
MenelikV wants to merge 3 commits intoapache:mainfrom
MenelikV:fix/disable-ssl2985

Conversation

@MenelikV
Copy link

@MenelikV MenelikV commented Feb 9, 2026

Closes #2985

Rationale for this change

Are these changes tested?

Yes

Are there any user-facing changes?

Copy link
Contributor

@geruh geruh left a comment

Choose a reason for hiding this comment

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

The fix looks correct to me, just have a few comments

"cabundle": False,
}
}
with pytest.raises(ValidationError) as _:
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should directly assert that session.verify is False for extra confidence here. Then we could just do something like the following without the callback logic

catalog = RestCatalog("rest", **{
  "uri": TEST_URI,
  "token": TEST_TOKEN,
  "ssl": {"cabundle": False},
})

assert catalog._session.verify is False

Copy link
Author

Choose a reason for hiding this comment

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

Okay, works for me.

Copy link
Contributor

@Fokko Fokko left a comment

Choose a reason for hiding this comment

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

Thanks @MenelikV for working on this! This looks good to me, I've left a comment on. style issue, but apart from that this PR looks good to me 👍

Comment on lines +361 to 362
if (ssl_ca_bundle := ssl_config.get(CA_BUNDLE)) is not None:
session.verify = ssl_ca_bundle
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit:

Suggested change
if (ssl_ca_bundle := ssl_config.get(CA_BUNDLE)) is not None:
session.verify = ssl_ca_bundle
if ssl_config.get(CA_BUNDLE) is not None:
session.verify = ssl_config.get[CA_BUNDLE]

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.

Could not disable ssl verification.

3 participants