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

Add ability to send hostname for TLS SNI extension #2432

Merged
merged 1 commit into from
Feb 9, 2022
Merged

Conversation

foxefj-cyber
Copy link
Contributor

@foxefj-cyber foxefj-cyber commented Dec 3, 2021

Desired Outcome

Ability to define the SNI certificate hostname so the proper certificate is returned from the Kubernetes API Server.

Implemented Changes

Describe how the desired outcome above has been achieved with this PR. In
particular, consider:

Added change to send the hostname during SSL connection as well as adding testing.

Connected Issue/Story

CyberArk internal issue link: ONYX-14386

Definition of Done

At least 1 todo must be completed in the sections below for the PR to be
merged.

Changelog

  • The CHANGELOG has been updated, or
  • This PR does not include user-facing changes and doesn't require a
    CHANGELOG update

Test coverage

  • This PR includes new unit and integration tests to go with the code
    changes, or
  • The changes in this PR do not require tests

Documentation

  • Docs (e.g. READMEs) were updated in this PR
  • A follow-up issue to update official docs has been filed here: insert issue ID
  • This PR does not require updating any documentation

Behavior

  • This PR changes product behavior and has been reviewed by a PO, or
  • These changes are part of a larger initiative that will be reviewed later, or
  • No behavior was changed with this PR

Security

  • Security architect has reviewed the changes in this PR,
  • These changes are part of a larger initiative with a separate security review, or
  • There are no security aspects to these changes

@foxefj-cyber foxefj-cyber self-assigned this Dec 3, 2021
@foxefj-cyber foxefj-cyber force-pushed the ONYX-14386 branch 3 times, most recently from 2a1dd5a to 8ca930c Compare December 21, 2021 19:15
@foxefj-cyber foxefj-cyber marked this pull request as ready for review December 21, 2021 19:25
@foxefj-cyber foxefj-cyber requested a review from a team as a code owner December 21, 2021 19:25
if [ -z "$OPENSHIFT_TOKEN" ]; then
oc login $url --username=$OPENSHIFT_USERNAME --password=$OPENSHIFT_PASSWORD --insecure-skip-tls-verify=true
else
oc login $url --token=$OPENSHIFT_TOKEN --insecure-skip-tls-verify=true
Copy link

Choose a reason for hiding this comment

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

Double quote to prevent globbing and word splitting.

if [ -z "$OPENSHIFT_TOKEN" ]; then
oc login $url --username=$OPENSHIFT_USERNAME --password=$OPENSHIFT_PASSWORD --insecure-skip-tls-verify=true
else
oc login $url --token=$OPENSHIFT_TOKEN --insecure-skip-tls-verify=true
Copy link

Choose a reason for hiding this comment

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

Double quote to prevent globbing and word splitting.

fi

if [ -z "$OPENSHIFT_TOKEN" ]; then
oc login $url --username=$OPENSHIFT_USERNAME --password=$OPENSHIFT_PASSWORD --insecure-skip-tls-verify=true
Copy link

Choose a reason for hiding this comment

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

Double quote to prevent globbing and word splitting.

fi

if [ -z "$OPENSHIFT_TOKEN" ]; then
oc login $url --username=$OPENSHIFT_USERNAME --password=$OPENSHIFT_PASSWORD --insecure-skip-tls-verify=true
Copy link

Choose a reason for hiding this comment

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

Double quote to prevent globbing and word splitting.

fi

if [ -z "$OPENSHIFT_TOKEN" ]; then
oc login $url --username=$OPENSHIFT_USERNAME --password=$OPENSHIFT_PASSWORD --insecure-skip-tls-verify=true
Copy link

Choose a reason for hiding this comment

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

Double quote to prevent globbing and word splitting.

@@ -25,6 +25,13 @@ def initialize(webservice = nil)
@cert_store = OpenSSL::X509::Store.new
@cert_store.set_default_paths
::Conjur::CertUtils.add_chained_cert(@cert_store, ca_cert)

# allows us to add additional CA certs for things like SNI certs
if ENV['SSL_CERT_DIRECTORY'] and File.exists?(ENV['SSL_CERT_DIRECTORY']) and File.exists?(ENV['SSL_CERT_DIRECTORY'] + '/ca')
Copy link
Contributor

Choose a reason for hiding this comment

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

To resolve the Code Climate errors (and to make it easier to test), what do you think about refactoring this to something like:

        return unless ENV.key?('SSL_CERT_DIRECTORY')
        
        load_additional_certs(
          ssl_cert_directory: ENV['SSL_CERT_DIRECTORY'],
          cert_store: @cert_store,
          cert_utils: ::Conjur::CertUtils
        )

We can then break the work into a method like:

      def load_additional_certs(ssl_cert_directory:, cert_store:, cert_utils:)
        certificate_directory = "#{ssl_cert_directory}/ca"
        if Dir.exist?(certificate_directory)
          Dir.entries(certificate_directory).each do |file_name|
            if File.exist?(file_name)
              cert_utils.add_chained_cert(cert_store, File.read(file_name))
            else
              # Log error message a particular file is missing
            end
          end
        else
          # Log error message that the environment variable SSL_CERT_DIRECTORY is missing
        end
      end

if [ -z "$OPENSHIFT_TOKEN" ]; then
oc login $url --username="$OPENSHIFT_USERNAME" --password="$OPENSHIFT_PASSWORD" --insecure-skip-tls-verify=true
else
oc login $url --token="$OPENSHIFT_TOKEN" --insecure-skip-tls-verify=true
Copy link

Choose a reason for hiding this comment

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

Double quote to prevent globbing and word splitting.

url=$OPENSHIFT_URL

if [ -z "$OPENSHIFT_TOKEN" ]; then
oc login $url --username="$OPENSHIFT_USERNAME" --password="$OPENSHIFT_PASSWORD" --insecure-skip-tls-verify=true
Copy link

Choose a reason for hiding this comment

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

Double quote to prevent globbing and word splitting.

filename=$1
api_server_ip=$2
api_fqdn=$3
sed -e "s#{{ CONJUR_AUTHN_K8S_TAG }}#$CONJUR_AUTHN_K8S_TAG#g" dev/$filename.${TEMPLATE_TAG}yaml |
Copy link

Choose a reason for hiding this comment

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

Double quote to prevent globbing and word splitting.

filename=$1
api_server_ip=$2
api_fqdn=$3
sed -e "s#{{ CONJUR_AUTHN_K8S_TAG }}#$CONJUR_AUTHN_K8S_TAG#g" dev/$filename.${TEMPLATE_TAG}yaml |
Copy link

Choose a reason for hiding this comment

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

Double quote to prevent globbing and word splitting.

# printLogs

conjur_pod=$(retrieve_pod conjur-authn-k8s)
api_server_ip=$(kubectl exec "$conjur_pod" -- sh -c 'echo $KUBERNETES_SERVICE_HOST')
Copy link

Choose a reason for hiding this comment

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

Expressions don't expand in single quotes, use double quotes for that.

sni_cert=$1

if [[ ! -z "$sni_cert" ]]; then
sni_cert="$(realpath $1)"
Copy link

Choose a reason for hiding this comment

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

Double quote to prevent globbing and word splitting.

@@ -183,6 +187,7 @@ def k8s_clients
KubeClientFactory.client(
api: 'apis/apps.openshift.io', version: 'v1', host_url: api_url,
options: options

Copy link

Choose a reason for hiding this comment

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

Empty line detected around arguments.

- Download and install the RedHat Code Ready Container
- This contains all the necessary pieces to have a local version of
Openshift
- After install, copy down the kubeadmin username/password and update the
Copy link

Choose a reason for hiding this comment

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

Inconsistent indentation for list items at the same level

- `OPENSHIFT_USERNAME` - username of an account that can create
namespaces, adjust cluster properties, etc
- `OPENSHIFT_PASSWORD` - password of the account
- `OPENSHIFT_URL` - the URL of the RedHat CRC cluster
Copy link

Choose a reason for hiding this comment

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

Inconsistent indentation for list items at the same level

namespaces, adjust cluster properties, etc
- `OPENSHIFT_PASSWORD` - password of the account
- `OPENSHIFT_URL` - the URL of the RedHat CRC cluster
- If running this locally - use `https://host.docker.internal:6443` so
Copy link

Choose a reason for hiding this comment

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

Inconsistent indentation for list items at the same level

Copy link
Contributor

@andytinkham andytinkham left a comment

Choose a reason for hiding this comment

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

This work should have had a security review meeting before any changes were made. I have concerns about pulling in any cert in a directory. We'll need to meet to talk through some threat modeling. @foxefj-cyber - please book some time for us to talk through this.

@jvanderhoof
Copy link
Contributor

jvanderhoof commented Jan 10, 2022

@andytinkham, I know you're just making sure we're not accidentally introducing a security concern with this:

This work should have had a security review meeting before any changes were made.

Although it may have been helpful to have you in a meeting before @foxefj-cyber did any work, in reality, you'd need to be involved in most enhancement/bug fix conversation, which doesn't feel like the best use of your time. I do think certificate related work would certainly benefit from your insight (and seems to be the majority of our security related issues).

Moving forward, what do you think about flagging all work that touches certificates as requiring early security architect collaboration?

@andytinkham, instead of pulling all certificates from a folder, what do you think about specifying a comma (or other separator) delineated list of certificates? It would allow support for multiple certificate chains while ensuring only the specified certs were loaded.

Thoughts?

@andytinkham
Copy link
Contributor

Although it may have been helpful to have you in a meeting before @foxefj-cyber did any work, in reality, you'd need to be involved in most enhancement/bug fix conversation, which doesn't feel like the best use of your time. I do think certificate related work would certainly benefit from your insight (and seems to be the majority of our security related issues).

Moving forward, what do you think about flagging all work that touches certificates as requiring early security architect collaboration?

For new features, we should be doing security review & threat modeling discussions by default all the time with the occasional path to exception being determining we don't need one (as opposed to the occasional path being to do it). For bug fixes, I'd say if it touches certificates, TLS, encryption, authentication, authorization, or direct handling of secrets values, let's have at least a quick chat at the beginning - we can determine if more is needed after that chat. My guess is most of the time that will be sufficient.

@andytinkham, instead of pulling all certificates from a folder, what do you think about specifying a comma (or other separator) delineated list of certificates? It would allow support for multiple certificate chains while ensuring only the specified certs were loaded.

Maybe. @foxefj-cyber & I will talk tomorrow. I'm still at the level of "Should I have concerns here?" not "I definitely have concerns here". Once I get more background, I can weigh in on this idea. Definitely seems worth talking about risks & tradeoffs between the 2 methods.

Thanks!

andytinkham
andytinkham previously approved these changes Jan 11, 2022
Copy link
Contributor

@andytinkham andytinkham left a comment

Choose a reason for hiding this comment

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

@foxefj-cyber @micahlee @jvanderhoof & I talked through things and I agree there is no further security issue here. Good to go from a security standpoint.

@foxefj-cyber foxefj-cyber force-pushed the ONYX-14386 branch 2 times, most recently from 1bf4838 to b7fe347 Compare February 7, 2022 19:26
@foxefj-cyber foxefj-cyber requested a review from a team February 7, 2022 19:27
@foxefj-cyber foxefj-cyber marked this pull request as draft February 7, 2022 20:59
@foxefj-cyber foxefj-cyber force-pushed the ONYX-14386 branch 3 times, most recently from a91588d to 8c9bdc4 Compare February 7, 2022 22:03
then
docker rm temp_container || true
docker create --name temp_container "$image"
docker cp sni.crt "temp_container:/opt/conjur/etc/ssl/ca/${sni_cert##*/}"
Copy link

Choose a reason for hiding this comment

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

sni_cert is referenced but not assigned.

-servername "$SNI_FQDN" > sni.out < /dev/null

docker run --rm -i \
-w /home -v $PWD:/home \
Copy link

Choose a reason for hiding this comment

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

Double quote to prevent globbing and word splitting.

if [[ ! -z $SNI_FQDN ]]
then
docker run --rm -i \
-w /home -v $PWD:/home \
Copy link

Choose a reason for hiding this comment

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

Double quote to prevent globbing and word splitting.


CONJUR_AUTHN_K8S_TAG=$(echo $CONJUR_AUTHN_K8S_TAG | sed "s/$OPENSHIFT_REGISTRY_URL/$OPENSHIFT_INTERNAL_REGISTRY_URL/")
CONJUR_TEST_AUTHN_K8S_TAG=$(echo $CONJUR_TEST_AUTHN_K8S_TAG | sed "s/$OPENSHIFT_REGISTRY_URL/$OPENSHIFT_INTERNAL_REGISTRY_URL/")
NGINX_TAG=$(echo $NGINX_TAG | sed "s/$OPENSHIFT_REGISTRY_URL/$OPENSHIFT_INTERNAL_REGISTRY_URL/")
Copy link

Choose a reason for hiding this comment

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

Double quote to prevent globbing and word splitting.


CONJUR_AUTHN_K8S_TAG=$(echo $CONJUR_AUTHN_K8S_TAG | sed "s/$OPENSHIFT_REGISTRY_URL/$OPENSHIFT_INTERNAL_REGISTRY_URL/")
CONJUR_TEST_AUTHN_K8S_TAG=$(echo $CONJUR_TEST_AUTHN_K8S_TAG | sed "s/$OPENSHIFT_REGISTRY_URL/$OPENSHIFT_INTERNAL_REGISTRY_URL/")
NGINX_TAG=$(echo $NGINX_TAG | sed "s/$OPENSHIFT_REGISTRY_URL/$OPENSHIFT_INTERNAL_REGISTRY_URL/")
Copy link

Choose a reason for hiding this comment

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

See if you can use ${variable//search/replace} instead.

## [1.17.1] - 2022-02-09

### Added
- Added support for SNI certificates when talking to the Kubernetes API
Copy link

Choose a reason for hiding this comment

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

Trailing spaces

## [1.17.1] - 2022-02-09

### Added
- Added support for SNI certificates when talking to the Kubernetes API
Copy link

Choose a reason for hiding this comment

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

Lists should be surrounded by blank lines

The secrets file used for summons needs to contain the following environment
variables

- openshift
Copy link

Choose a reason for hiding this comment

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

Inconsistent indentation for list items at the same level

variables

- openshift
- `OPENSHIFT_USERNAME` - username of an account that can create
Copy link

Choose a reason for hiding this comment

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

Inconsistent indentation for list items at the same level

- openshift
- `OPENSHIFT_USERNAME` - username of an account that can create
namespaces, adjust cluster properties, etc
- `OPENSHIFT_PASSWORD` - password of the account
Copy link

Choose a reason for hiding this comment

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

Inconsistent indentation for list items at the same level

@codeclimate
Copy link

codeclimate bot commented Feb 9, 2022

Code Climate has analyzed commit ef11b52 and detected 51 issues on this pull request.

Here's the issue category breakdown:

Category Count
Style 40
Bug Risk 11

The test coverage on the diff in this pull request is 63.6% (50% is the threshold).

This pull request will bring the total coverage in the repository to 87.9% (-3.2% change).

View more on Code Climate.

@foxefj-cyber foxefj-cyber merged commit 05ddcb9 into master Feb 9, 2022
@foxefj-cyber foxefj-cyber deleted the ONYX-14386 branch February 9, 2022 18:48
Copy link
Contributor

@doodlesbykumbi doodlesbykumbi left a comment

Choose a reason for hiding this comment

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

Hey @foxefj-cyber. This feedback is a bit late but I wanted to make sure it was covered at some point.

Comment on lines +29 to +31
return unless ENV.key?('SSL_CERT_DIRECTORY')

load_additional_certs(ENV['SSL_CERT_DIRECTORY'])
Copy link
Contributor

Choose a reason for hiding this comment

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

I might be missing something but is the singular call to add_chained_cert above not enough ? Wouldn't all the certs be stored in the Conjur variable or the cert file on disk when running inside a pod ?

Separately, I'm wondering about the documentation around the envvar SSL_CERT_DIRECTORY, I'm not familiar with it yet I see it being used in a few repos and without looking at the code here I wouldn't immediately know how it is used... and I'm not sure if its meaning in the context of the code here is shared across the different places it is used.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This directory is added in the Dockerfile under the conjur directory and I added pulling in the additional certs so we can add in the CA cert or the self signed cert for the SNI stuff.

Comment on lines +40 to +44
if ssl_version != 'SSLv23'
@socket.hostname = options[:hostname] || uri.host
end
@socket.connect
@socket.post_connection_check(@socket.hostname) if @socket.hostname
Copy link
Contributor

Choose a reason for hiding this comment

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

I would like to understand this better, since it's a bit more involved than my simple implementation of always setting the hostname.

  1. Why are we only excluding this version ? Is it the case that SNI is only expected to be relevant on ssl_version > SSLv23 ?
  2. Can you explain the logic around the post_connection_check

Copy link
Contributor Author

Choose a reason for hiding this comment

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

SNI is an extension in TLS only so we don't want to bother adding the hostname if they are using SSLv23 for some reason.

the post_connection_check will throw an error if we expected a certain SNI certificate but we didn't get it - this makes sure that if we are expecting SNI we get the proper certificate

Copy link
Contributor

Choose a reason for hiding this comment

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

On board with (1). For (2) I was sure I was able to get errors thrown with just calls to #connect, I'll reconfirm.

Comment on lines +4 to +12
@sni_fails
Scenario: Authenticate as a Pod.
When I authenticate with authn-k8s as "pod/inventory-pod" without cert and key
Then the HTTP status is "401"

@sni_success
Scenario: Authenticate as a Pod.
Given I can login to pod matching "app=inventory-pod" to authn-k8s as "*/*"
Then I can authenticate pod matching "pod/inventory-pod" with authn-k8s 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 the unit tests provide amazing validation and coverage for supporting SNI. I'm curious why we are adding a cucumber test which to me seems to be testing the same thing as the unit tests but paying a significantly higher price i.e. deploying a whole Conjur master for each one of these tests ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

these are just to validate that the entire solution works with SNI - purely for validation.

@alexkalish alexkalish removed their request for review February 16, 2022 18:46
doodlesbykumbi added a commit that referenced this pull request Feb 16, 2022
The Kubernetes API endpoint can include a path, as is the case with the Rancher API, the websocket implementation should take the URL as is instead of taking only host and port.
The commit originally included support for server name indication (SNI) on the the websocket client, which enables the client to be specific about the host it is trying to reach in the first step of the TLS handshake, preventing common name mismatch errors.
However, that commit was removed in favour of the more comprehensive work to support SNI at #2432.
doodlesbykumbi added a commit that referenced this pull request Feb 16, 2022
The Kubernetes API endpoint can include a path, as is the case with the Rancher API, the websocket implementation should take the URL as is instead of taking only host and port.
The commit originally included support for server name indication (SNI) on the the websocket client, which enables the client to be specific about the host it is trying to reach in the first step of the TLS handshake, preventing common name mismatch errors.
However, that commit was removed in favour of the more comprehensive work to support SNI at #2432.
doodlesbykumbi added a commit that referenced this pull request Feb 16, 2022
The Kubernetes API endpoint can include a path, as is the case with the Rancher API, the websocket implementation should take the URL as is instead of taking only host and port.
The commit originally included support for server name indication (SNI) on the the websocket client, which enables the client to be specific about the host it is trying to reach in the first step of the TLS handshake, preventing common name mismatch errors.
However, that commit was removed in favour of the more comprehensive work to support SNI at #2432.
doodlesbykumbi added a commit that referenced this pull request Feb 16, 2022
The Kubernetes API endpoint can include a path, as is the case with the Rancher API, the websocket implementation should take the URL as is instead of taking only host and port.
The commit originally included support for server name indication (SNI) on the the websocket client, which enables the client to be specific about the host it is trying to reach in the first step of the TLS handshake, preventing common name mismatch errors.
However, that commit was removed in favour of the more comprehensive work to support SNI at #2432.
doodlesbykumbi added a commit that referenced this pull request Feb 17, 2022
The Kubernetes API endpoint can include a path, as is the case with the Rancher API, the websocket implementation should take the URL as is instead of taking only host and port.
The commit originally included support for server name indication (SNI) on the the websocket client, which enables the client to be specific about the host it is trying to reach in the first step of the TLS handshake, preventing common name mismatch errors.
However, that commit was removed in favour of the more comprehensive work to support SNI at #2432.
doodlesbykumbi added a commit that referenced this pull request Feb 17, 2022
The Kubernetes API endpoint can include a path, as is the case with the Rancher API, the websocket implementation should take the URL as is instead of taking only host and port.
The commit originally included support for server name indication (SNI) on the the websocket client, which enables the client to be specific about the host it is trying to reach in the first step of the TLS handshake, preventing common name mismatch errors.
However, that commit was removed in favour of the more comprehensive work to support SNI at #2432.
doodlesbykumbi added a commit that referenced this pull request Feb 17, 2022
The Kubernetes API endpoint can include a path, as is the case with the Rancher API, the websocket implementation should take the URL as is instead of taking only host and port.
The commit originally included support for server name indication (SNI) on the the websocket client, which enables the client to be specific about the host it is trying to reach in the first step of the TLS handshake, preventing common name mismatch errors.
However, that commit was removed in favour of the more comprehensive work to support SNI at #2432.
doodlesbykumbi added a commit that referenced this pull request Feb 17, 2022
The Kubernetes API endpoint can include a path, as is the case with the Rancher API, the websocket implementation should take the URL as is instead of taking only host and port.
The commit originally included support for server name indication (SNI) on the the websocket client, which enables the client to be specific about the host it is trying to reach in the first step of the TLS handshake, preventing common name mismatch errors.
However, that commit was removed in favour of the more comprehensive work to support SNI at #2432.
doodlesbykumbi added a commit that referenced this pull request Feb 18, 2022
The Kubernetes API endpoint can include a path, as is the case with the Rancher API, the websocket implementation should take the URL as is instead of taking only host and port.
The commit originally included support for server name indication (SNI) on the the websocket client, which enables the client to be specific about the host it is trying to reach in the first step of the TLS handshake, preventing common name mismatch errors.
However, that commit was removed in favour of the more comprehensive work to support SNI at #2432.
doodlesbykumbi added a commit that referenced this pull request Feb 22, 2022
The Kubernetes API endpoint can include a path, as is the case with the Rancher API, the websocket implementation should take the URL as is instead of taking only host and port.
The commit originally included support for server name indication (SNI) on the the websocket client, which enables the client to be specific about the host it is trying to reach in the first step of the TLS handshake, preventing common name mismatch errors.
However, that commit was removed in favour of the more comprehensive work to support SNI at #2432.
doodlesbykumbi added a commit that referenced this pull request Feb 24, 2022
The Kubernetes API endpoint can include a path, as is the case with the Rancher API, the websocket implementation should take the URL as is instead of taking only host and port.
The commit originally included support for server name indication (SNI) on the the websocket client, which enables the client to be specific about the host it is trying to reach in the first step of the TLS handshake, preventing common name mismatch errors.
However, that commit was removed in favour of the more comprehensive work to support SNI at #2432.
doodlesbykumbi added a commit that referenced this pull request Mar 3, 2022
The Kubernetes API endpoint can include a path, as is the case with the Rancher API, the websocket implementation should take the URL as is instead of taking only host and port.
The commit originally included support for server name indication (SNI) on the the websocket client, which enables the client to be specific about the host it is trying to reach in the first step of the TLS handshake, preventing common name mismatch errors.
However, that commit was removed in favour of the more comprehensive work to support SNI at #2432.
doodlesbykumbi added a commit that referenced this pull request Mar 3, 2022
The Kubernetes API endpoint can include a path, as is the case with the Rancher API, the websocket implementation should take the URL as is instead of taking only host and port.
The commit originally included support for server name indication (SNI) on the the websocket client, which enables the client to be specific about the host it is trying to reach in the first step of the TLS handshake, preventing common name mismatch errors.
However, that commit was removed in favour of the more comprehensive work to support SNI at #2432.
doodlesbykumbi added a commit that referenced this pull request Mar 8, 2022
The Kubernetes API endpoint can include a path, as is the case with the Rancher API, the websocket implementation should take the URL as is instead of taking only host and port.
The commit originally included support for server name indication (SNI) on the the websocket client, which enables the client to be specific about the host it is trying to reach in the first step of the TLS handshake, preventing common name mismatch errors.
However, that commit was removed in favour of the more comprehensive work to support SNI at #2432.
doodlesbykumbi added a commit that referenced this pull request Mar 14, 2022
The Kubernetes API endpoint can include a path, as is the case with the Rancher API, the websocket implementation should take the URL as is instead of taking only host and port.
The commit originally included support for server name indication (SNI) on the the websocket client, which enables the client to be specific about the host it is trying to reach in the first step of the TLS handshake, preventing common name mismatch errors.
However, that commit was removed in favour of the more comprehensive work to support SNI at #2432.
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.

5 participants