Materials-Consortia / Materials-Consortia/optimade-python-tools
SSL verification is not turned off despite setting skip_ssl = True
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 91
- Forks
- 54
- PR merge metrics
- No merged PRs in 30d
Description
Instantiating OptimadeClient with the skip_ssl flag like so:
from optimade.client import OptimadeClient
client = OptimadeClient(skip_ssl= True, ...)
Does not really have any effect on disabling SSL verification. I was able to sort myself out for the time being by hacking away here:
into this:
async with self._http_client(headers=self.headers, verify = not self.skip_ssl) as client: # type: ignore[union-attr,call-arg,misc]
Not sure of the ramifications tough.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in optimade/client/client.py around line 950 and trace how OptimadeClient.skip_ssl reaches the HTTP client. Reproduce the request with skip_ssl=True, then confirm that SSL verification changes only when that flag is set. Done means the flag has the documented effect without changing default verification behavior; check for relevant client tests before adding regression coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, security
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100