Skip to content

Commit

Permalink
for VOs sharing the same OIDC client
Browse files Browse the repository at this point in the history
  • Loading branch information
tmaeno committed Feb 10, 2021
1 parent e2dcd8f commit 3a08bda
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion pandatools/Client.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ def get(self,url,data,rucioAccount=False, via_file=False):
if self.authMode == 'oidc':
self.get_id_token()
com += ' -H "Authorization: Bearer {0}"'.format(self.idToken)
com += ' -H "Origin: {0}"'.format(self.authVO)
else:
if self.sslCert != '':
com += ' --cert %s' % self.sslCert
Expand Down Expand Up @@ -248,6 +249,7 @@ def post(self,url,data,rucioAccount=False, is_json=False, via_file=False):
if self.authMode == 'oidc':
self.get_id_token()
com += ' -H "Authorization: Bearer {0}"'.format(self.idToken)
com += ' -H "Origin: {0}"'.format(self.authVO)
else:
if self.sslCert != '':
com += ' --cert %s' % self.sslCert
Expand Down Expand Up @@ -322,6 +324,7 @@ def put(self,url,data):
if self.authMode == 'oidc':
self.get_id_token()
com += ' -H "Authorization: Bearer {0}"'.format(self.idToken)
com += ' -H "Origin: {0}"'.format(self.authVO)
else:
if self.sslCert != '':
com += ' --cert %s' % self.sslCert
Expand Down Expand Up @@ -1218,11 +1221,15 @@ def hello(verbose=False):
# execute
url = baseURLSSL + '/isAlive'
try:
status,output = curl.post(url, {})
status, output = curl.post(url, {})
if status != 0:
msg = "Not good. " + output
tmp_log.error(msg)
return EC_Failed, msg
elif output != "alive=yes":
msg = "Not good. " + output
tmp_log.error(msg)
return EC_Failed, msg
else:
msg = "OK"
tmp_log.info(msg)
Expand Down
2 changes: 1 addition & 1 deletion pandatools/PandaToolsPkgInfo.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
release_version = "1.4.51"
release_version = "1.4.52"

0 comments on commit 3a08bda

Please sign in to comment.