Skip to content

Conversation

@stlaz
Copy link
Contributor

@stlaz stlaz commented Nov 11, 2019

OAuth server uses the APIServer wrapping for its endpoints. This
wrapping has its own RequestHeader IdP for the cluster admin login
with client cert. As a part of that, before the RequestHeader is
set, DelegatingAuthenticationOptions() adds its own ClientCA to
the serving info config.

The result of the above behavior is that during TLS handshake, when
the names for acceptable client certificate CAs are announced, the
CAs of the above mentioned apiserver RequestHeader IdP are announced.

When users configure their own RequestHeader IdP to be used in
OpenShift for the oauth-server to try to retrieve the users from,
oauth-server was not adding this RequestHeader's client CA name
among the acceptable client certificate CA names mentioned above.

This commit adds the client CA data from the user specified
RequestHeader IdP to 'GenericConfig.SecureServing.ClientCA',
which is later converted to tlsConfig object which defines the
data to be used in TLS handshakes.

/assign @deads2k

@openshift-ci-robot
Copy link

@stlaz: No Bugzilla bug is referenced in the title of this pull request.
To reference a bug, add 'Bug XXX:' to the title of this pull request and request another bug refresh with /bugzilla refresh.

Details

In response to this:

RequestHeaders IdP: fix TLS handshake

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot openshift-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Nov 11, 2019
@stlaz stlaz changed the title RequestHeaders IdP: fix TLS handshake Bug 1739262: RequestHeaders IdP: fix TLS handshake Nov 11, 2019
@openshift-ci-robot openshift-ci-robot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Nov 11, 2019
@openshift-ci-robot
Copy link

@stlaz: This pull request references Bugzilla bug 1739262, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

Bug 1739262: RequestHeaders IdP: fix TLS handshake

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.


// we need to add our CA data to secure serving as well to have the OAuth server
// advertise them for client auth during TLS handshake
c.GenericConfig.SecureServing.ClientCA = append(c.GenericConfig.SecureServing.ClientCA, provider.ClientCA)
Copy link
Contributor Author

@stlaz stlaz Nov 11, 2019

Choose a reason for hiding this comment

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

/hold
This flag's backend changed in later versions, I need to see that this still works

Copy link
Contributor Author

Choose a reason for hiding this comment

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

/hold cancel
the proper CA names are being announced

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 11, 2019
@stlaz stlaz force-pushed the oauth_client_certs_41 branch 2 times, most recently from 7edaaea to 75afdd3 Compare November 11, 2019 13:34
@stlaz
Copy link
Contributor Author

stlaz commented Nov 11, 2019

/retest

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 11, 2019
@stlaz
Copy link
Contributor Author

stlaz commented Nov 11, 2019

unit tests are failing because https://www.cvedetails.com/cve/CVE-2019-14809/ got fixed in golang 1.11, I wonder whether the rest is the same

@stlaz stlaz changed the title Bug 1739262: RequestHeaders IdP: fix TLS handshake Bug 1739262: RequestHeaders IdP: fix TLS handshake [4.1] Nov 12, 2019
@stlaz
Copy link
Contributor Author

stlaz commented Nov 12, 2019

depends on #24111 for integration tests fix

@openshift-ci-robot openshift-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Nov 12, 2019
@stlaz stlaz force-pushed the oauth_client_certs_41 branch from a1dffef to 385db4e Compare November 14, 2019 08:51
@eparis
Copy link
Member

eparis commented Nov 20, 2019

/retest

OAuth server uses the APIServer wrapping for its endpoints. This
wrapping has its own RequestHeader IdP for the cluster admin login
with client cert. As a part of that, before the RequestHeader is
set, DelegatingAuthenticationOptions() adds its own ClientCA to
the serving info config.

The result of the above behavior is that during TLS handshake, when
the names for acceptable client certificate CAs are announced, the
CAs of the above mentioned apiserver RequestHeader IdP are announced.

When users configure their own RequestHeader IdP to be used in
OpenShift for the oauth-server to try to retrieve the users from,
oauth-server was not adding this RequestHeader's client CA name
among the acceptable client certificate CA names mentioned above.

This commit adds the client CA data from the user specified
RequestHeader IdP to 'GenericConfig.SecureServing.ClientCA',
which is later converted to tlsConfig object which defines the
data to be used in TLS handshakes.
@stlaz stlaz force-pushed the oauth_client_certs_41 branch from 385db4e to 56bb935 Compare November 26, 2019 11:14
@openshift-ci-robot openshift-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 26, 2019
@deads2k
Copy link
Contributor

deads2k commented Nov 26, 2019

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 26, 2019
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: deads2k, stlaz

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 26, 2019
@knobunc knobunc added the cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. label Nov 28, 2019
@openshift-merge-robot openshift-merge-robot merged commit b403e15 into openshift:release-4.1 Nov 28, 2019
@openshift-ci-robot
Copy link

@stlaz: All pull requests linked via external trackers have merged. Bugzilla bug 1739262 has been moved to the MODIFIED state.

Details

In response to this:

Bug 1739262: RequestHeaders IdP: fix TLS handshake [4.1]

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

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

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. lgtm Indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants