Skip to content

Commit da693a7

Browse files
BrunoCoimbramambelli
authored andcommitted
Enable token proxy hybrid GWMS configuration
1 parent 3c75da5 commit da693a7

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

src/decisionengine_modules/glideinwms/glide_frontend_element.py

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,8 @@ def generate_glidein_requests(self, jobs_df, slots_df,
328328
glidein_params[k] = eval(kexpr)
329329
# Add GLIDECLIENT_ReqNode to monitor orphaned glideins
330330
glidein_params['GLIDECLIENT_ReqNode'] = factory_pool_node
331+
# TODO: Remove this classad once token/proxy hybrid configurations are no longer supported
332+
glidein_params['CONTINUE_IF_NO_PROXY'] = 'True'
331333

332334
glidein_monitors = {k: count_jobs[k] for k in count_jobs}
333335
glidein_monitors['RunningHere'] = self.count_real_jobs[glideid]
@@ -458,9 +460,11 @@ def create_glideclient_classads(self, factory_pool, request_name,
458460
glidein_params_to_encrypt=glidein_params_to_encrypt,
459461
security_name=security_name, remove_excess_str=remove_excess_str)
460462

463+
# TODO: Filter by credential type once token/proxy hybrid configurations are no longer supported
464+
# credential_type=auth_method
461465
credentials_with_request = self.credential_plugin.get_credentials(
462-
params_obj=params_obj, credential_type=auth_method,
463-
trust_domain=trust_domain)
466+
params_obj=params_obj, trust_domain=trust_domain
467+
)
464468

465469
if not credentials_with_request:
466470
raise NoCredentialException
@@ -485,9 +489,13 @@ def create_glideclient_classads(self, factory_pool, request_name,
485489
continue
486490

487491
if not cred.supports_auth_method(auth_method):
488-
self.logger.warning('Credential %s does not match auth method %s (for %s), skipping...' % (
489-
cred.type, auth_method, params_obj.request_name))
490-
continue
492+
# TODO: Remove this condition once token/proxy hybrid configurations are no longer supported
493+
if auth_method == "grid_proxy" and "scitoken" in cred.type:
494+
self.logger.debug("Sending scitoken along with grid-proxy")
495+
else:
496+
self.logger.warning('Credential %s does not match auth method %s (for %s), skipping...' % (
497+
cred.type, auth_method, params_obj.request_name))
498+
continue
491499

492500
if cred.trust_domain != trust_domain:
493501
self.logger.warning('Credential %s does not match %s (for %s) domain, skipping...' % (
@@ -1717,6 +1725,8 @@ def generate_glidein_requests_one(self, jobs_df, slots_df,
17171725
glidein_params[k] = eval(kexpr)
17181726
# Add GLIDECLIENT_ReqNode to monitor orphaned glideins
17191727
glidein_params['GLIDECLIENT_ReqNode'] = factory_pool_node
1728+
# TODO: Remove this classad once token/proxy hybrid configurations are no longer supported
1729+
glidein_params['CONTINUE_IF_NO_PROXY'] = 'True'
17201730

17211731
glidein_monitors = {k: count_jobs[k] for k in count_jobs}
17221732
glidein_monitors['RunningHere'] = self.count_real_jobs[glideid]

0 commit comments

Comments
 (0)