docker / docker/docker-py

Need Help :TLS:SSL Warning observed when using with TLS

Open
#2,397 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
7.2k
Forks
1.7k
Avg merge
13d 8h
Merged PRs (30d)
2

Description

I am trying to use TLS mode and obsever SSL warning , Please advice how to overcome this in my script

Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings

import docker
tls_config=docker.tls.TLSConfig(client_cert=('cert.pem','key.pem'))
client = docker.APIClient(base_url=recv_url,tls=tls_config)
image=client.inspect_image(image_name)['Id']
/auto/n1k/pyats/lib/python3.4/site-packages/urllib3/connectionpool.py:858: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the shown docker.tls.TLSConfig and docker.APIClient calls, then read the linked urllib3 SSL-warnings guidance and the warning from urllib3/connectionpool.py. Done means the TLS script no longer emits an unverified HTTPS request warning while connecting to the Docker API.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python
Domain
security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.