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

authn-k8s:websockets: support api endpoints with path #2479

Closed
wants to merge 2 commits into from

Conversation

doodlesbykumbi
Copy link
Contributor

@doodlesbykumbi doodlesbykumbi commented Feb 7, 2022

Desired Outcome

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.

Implemented Changes

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

  • What's changed? Why were these changes made?
  • How should the reviewer approach this PR, especially if manual tests are required?
  • Are there relevant screenshots you can add to the PR description?

Connected Issue/Story

Resolves #[relevant GitHub issue(s), e.g. 76]

CyberArk internal issue link: insert issue ID

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

@jtuttle jtuttle force-pushed the fix-authn-k8s branch 2 times, most recently from bba07bb to c84a7ff Compare February 15, 2022 15:52
@jtuttle
Copy link
Member

jtuttle commented Feb 15, 2022

@doodlesbykumbi I've updated this PR to remove the SNI fix since it was implemented (and merged) independently by @foxefj-cyber. This PR now only includes the API path fix needed to support interfacing w/ the Rancher control plane (and possibly other k8s flavors).

@doodlesbykumbi doodlesbykumbi force-pushed the fix-authn-k8s branch 4 times, most recently from c91f156 to 9d707e3 Compare February 16, 2022 19:48
@doodlesbykumbi doodlesbykumbi marked this pull request as ready for review February 16, 2022 19:52
@doodlesbykumbi doodlesbykumbi requested a review from a team as a code owner February 16, 2022 19:52
@doodlesbykumbi doodlesbykumbi force-pushed the fix-authn-k8s branch 6 times, most recently from 2d21889 to a591c5a Compare February 22, 2022 14:28
@codeclimate
Copy link

codeclimate bot commented Feb 23, 2022

Code Climate has analyzed commit a591c5a and detected 0 issues on this pull request.

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

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

View more on Code Climate.

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 doodlesbykumbi reopened this Mar 3, 2022
@doodlesbykumbi doodlesbykumbi changed the title authn-k8s:websockets: support SNI + api endpoints with path authn-k8s:websockets: support api endpoints with path Mar 3, 2022
@doodlesbykumbi doodlesbykumbi deleted the fix-authn-k8s branch March 3, 2022 08:01
@doodlesbykumbi
Copy link
Contributor Author

Closed in favour of #2509

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants