@@ -131,15 +131,15 @@ class Client(object):
131
131
LOCAL_KFP_CONTEXT = os .path .expanduser ('~/.config/kfp/context.json' )
132
132
133
133
# TODO: Wrap the configurations for different authentication methods.
134
- def __init__ (self , host = None , client_id = None , namespace = 'kubeflow' , other_client_id = None , other_client_secret = None , existing_token = None , cookies = None , proxy = None , ssl_ca_cert = None , kube_context = None , credentials = None , proxy_username = None , proxy_password = None , proxy_headers = None ):
134
+ def __init__ (self , host = None , client_id = None , namespace = 'kubeflow' , other_client_id = None , other_client_secret = None , existing_token = None , cookies = None , proxy = None , ssl_ca_cert = None , kube_context = None , credentials = None , proxy_headers = None ):
135
135
"""Create a new instance of kfp client.
136
136
"""
137
137
host = host or os .environ .get (KF_PIPELINES_ENDPOINT_ENV )
138
138
self ._uihost = os .environ .get (KF_PIPELINES_UI_ENDPOINT_ENV , host )
139
139
client_id = client_id or os .environ .get (KF_PIPELINES_IAP_OAUTH2_CLIENT_ID_ENV )
140
140
other_client_id = other_client_id or os .environ .get (KF_PIPELINES_APP_OAUTH2_CLIENT_ID_ENV )
141
141
other_client_secret = other_client_secret or os .environ .get (KF_PIPELINES_APP_OAUTH2_CLIENT_SECRET_ENV )
142
- config = self ._load_config (host , client_id , namespace , other_client_id , other_client_secret , existing_token , proxy , ssl_ca_cert , kube_context , credentials , proxy_username = proxy_username , proxy_password = proxy_password , proxy_headers = proxy_headers )
142
+ config = self ._load_config (host , client_id , namespace , other_client_id , other_client_secret , existing_token , proxy , ssl_ca_cert , kube_context , credentials , proxy_headers = proxy_headers )
143
143
# Save the loaded API client configuration, as a reference if update is
144
144
# needed.
145
145
self ._load_context_setting_or_default ()
@@ -164,18 +164,14 @@ def __init__(self, host=None, client_id=None, namespace='kubeflow', other_client
164
164
except FileNotFoundError :
165
165
logging .info ('Failed to automatically set namespace.' , exc_info = True )
166
166
167
- def _load_config (self , host , client_id , namespace , other_client_id , other_client_secret , existing_token , proxy , ssl_ca_cert , kube_context , credentials , proxy_username = None , proxy_password = None , proxy_headers = None ):
167
+ def _load_config (self , host , client_id , namespace , other_client_id , other_client_secret , existing_token , proxy , ssl_ca_cert , kube_context , credentials , proxy_headers = None ):
168
168
config = kfp_server_api .configuration .Configuration ()
169
169
170
170
if proxy :
171
171
# https://github.com/kubeflow/pipelines/blob/c6ac5e0b1fd991e19e96419f0f508ec0a4217c29/backend/api/python_http_client/kfp_server_api/rest.py#L100
172
172
config .proxy = proxy
173
173
174
- # for use with a reverse proxy with basic auth.
175
- if proxy_username and proxy_password :
176
- config .proxy_headers = make_headers (basic_auth = f"{ proxy_username } :{ proxy_password } " )
177
-
178
- # for use with kerberos
174
+ # for use with kerberos or basic auth reverse proxies
179
175
if proxy_headers :
180
176
config .proxy_headers = proxy_headers
181
177
0 commit comments