saltstack / saltstack/salt

[TECH DEBT] salt, salt-run should support dedicated ssl configuration to interact with salt master

Open
#68,006 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

tech-debt
Dominant language
Python
Stars
15.7k
Forks
5.6k
Avg merge
2d 44m
Merged PRs (30d)
80

Description

When ssl is enabled for salt master the tools satl, salt-run throw an error complaining about the incompatibility of the ssl context:

$ salt '*' test.ping
...
[WARNING ] TCP Message Client encountered an exception while connecting to 127.0.0.1:4506: SSLError(0, 'Cannot create a client socket with a PROTOCOL_TLS_SERVER context (_ssl.c:811)'), will reconnect in 1 seconds
[WARNING ] TCP Message Client encountered an exception while connecting to 127.0.0.1:4506: SSLError(0, 'Cannot create a client socket with a PROTOCOL_TLS_SERVER context (_ssl.c:811)'), will reconnect in 1 seconds
[WARNING ] TCP Message Client encountered an exception while connecting to 127.0.0.1:4506: SSLError(0, 'Cannot create a client socket with a PROTOCOL_TLS_SERVER context (_ssl.c:811)'), will reconnect in 1 seconds
[WARNING ] TCP Message Client encountered an exception while connecting to 127.0.0.1:4506: SSLError(0, 'Cannot create a client socket with a PROTOCOL_TLS_SERVER context (_ssl.c:811)'), will reconnect in 1 seconds
[WARNING ] TCP Message Client encountered an exception while connecting to 127.0.0.1:4506: SSLError(0, 'Cannot create a client socket with a PROTOCOL_TLS_SERVER context (_ssl.c:811)'), will reconnect in 1 seconds
[WARNING ] TCP Message Client encountered an exception while connecting to 127.0.0.1:4506: SSLError(0, 'Cannot create a client socket with a PROTOCOL_TLS_SERVER context (_ssl.c:811)'), will reconnect in 1 seconds
[WARNING ] TCP Message Client encountered an exception while connecting to 127.0.0.1:4506: SSLError(0, 'Cannot create a client socket with a PROTOCOL_TLS_SERVER context (_ssl.c:811)'), will reconnect in 1 seconds
[WARNING ] TCP Message Client encountered an exception while connecting to 127.0.0.1:4506: SSLError(0, 'Cannot create a client socket with a PROTOCOL_TLS_SERVER context (_ssl.c:811)'), will reconnect in 1 seconds
[WARNING ] TCP Message Client encountered an exception while connecting to 127.0.0.1:4506: SSLError(0, 'Cannot create a client socket with a PROTOCOL_TLS_SERVER context (_ssl.c:811)'), will reconnect in 1 seconds
...

I should be able to customize the ssl settings for the tools that act as a client for salt master when ssl is on.

The ssl settings I use for salt master

ssl:
  keyfile: <key_path>
  certfile: <cert_file_path>
  ca_certs: <ca_cert_path>
  cert_reqs: CERT_REQUIRED
  ssl_version: PROTOCOL_TLS_SERVER

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 by tracing how salt and salt-run load SSL settings when connecting to the salt master, then compare the client connection requirements with the shown PROTOCOL_TLS_SERVER configuration. Done means the tools accept dedicated client SSL settings and can run commands such as test.ping against an SSL-enabled master without the reported context error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, networking, security
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.