Bug 1780982 - Authentication and Authorization options are not exposed for OpenShift API server
Summary: Authentication and Authorization options are not exposed for OpenShift API se...
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: openshift-apiserver
Version: 4.3.0
Hardware: All
OS: All
Target Milestone: ---
: 4.3.0
Assignee: Cesar Wong
QA Contact: Xingxing Xia
Depends On:
TreeView+ depends on / blocked
Reported: 2019-12-09 01:39 UTC by Cesar Wong
Modified: 2020-01-23 11:18 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2020-01-23 11:18:15 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Github openshift openshift-apiserver pull 54 0 'None' closed Bug 1780982: [release-4.3] Wire generic API server authentication and authorization flags 2020-08-06 14:01:03 UTC
Red Hat Product Errata RHBA-2020:0062 0 None None None 2020-01-23 11:18:35 UTC

Description Cesar Wong 2019-12-09 01:39:45 UTC
Description of problem:
For hosted deployments, the Kubernetes API server that the OpenShift API server communicates with is not the in-cluster server, but rather an explicit kubeconfig must be specified. Recent changes in the OpenShift APIserver code only allow for the in-cluster connection to the Kube API server. CLI flags need to be exposed to allow specifying a different kubeconfig to communicate with an external Kube API server.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Start OpenShift APIServer in hosted mode (on management Kube APIserver)

Actual results:
OpenShift APIServer fails to start because it cannot communicate with a Kube APIServer

Expected results:
OpenShift APIServer starts and communicates with peer Kube APIServer.

Additional info:
To verify this, simply run the openshift-apiserver command with --help. There should be flags to allow specifying the authentication and authorization kube apiserver.

Comment 2 Xingxing Xia 2019-12-12 03:18:29 UTC
Per above hint and https://github.com/openshift/openshift-apiserver/pull/54/files#diff-3f6215a8bff8638652a2886ff35d2b5bR88 `o.Authentication.AddFlags(flags)`, and openshift/openshift-apiserver/vendor/k8s.io/apiserver/pkg/server/options/{authentication,authorization}.go def of `AddFlags`, confirmed the verification in 4.3.0-0.nightly-2019-12-10-235659 by:
oc rsh -n openshift-apiserver ds/apiserver
sh-4.2# openshift-apiserver start --help
Start an apiserver that contains the OpenShift resources
      --authentication-kubeconfig string                        kubeconfig file pointing at the 'core' kubernetes server with enough rights to create tokenaccessreviews.authentication.k8s.io.
      --authorization-kubeconfig string                         kubeconfig file pointing at the 'core' kubernetes server with enough rights to create subjectaccessreviews.authorization.k8s.io.

Comment 4 errata-xmlrpc 2020-01-23 11:18:15 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.