Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
30eb19e
Fix tests, add to DIRACCA mathod to create fake proxy
TaykYoku Mar 5, 2020
0c84a28
fix CN in test proxy/cert
TaykYoku Mar 9, 2020
69a6b8c
pep8
TaykYoku Mar 9, 2020
108e695
self.caDict to caDict
TaykYoku Mar 10, 2020
aff07e0
return dn whith _
TaykYoku Mar 10, 2020
637d479
return dn whith _
TaykYoku Mar 10, 2020
a076e9c
whitespace
TaykYoku Mar 10, 2020
18cc85a
add log
TaykYoku Mar 11, 2020
b45e7bb
Fix setPersistentFlag MySQL error
TaykYoku Mar 12, 2020
0e60fb8
remove self.caFieldByNid
TaykYoku Mar 13, 2020
755f696
use _escapeString for username
TaykYoku Mar 13, 2020
88b39ec
add tests for DIRACCAProxyProvider
TaykYoku Mar 14, 2020
d4ea842
align proxyDB tests to changes
TaykYoku Mar 14, 2020
4a7e3e1
align proxyDB tests to changes
TaykYoku Mar 15, 2020
1a567dd
align proxyDB tests to changes
TaykYoku Mar 15, 2020
75ad865
add ignore errors
TaykYoku Mar 15, 2020
9d53aae
add path ca
TaykYoku Mar 15, 2020
8f3f039
fix path
TaykYoku Mar 15, 2020
c663c27
fix options
TaykYoku Mar 15, 2020
dd278c3
remove comments
TaykYoku Mar 15, 2020
90b9135
add more docs
TaykYoku Mar 16, 2020
10ac6b1
fix docs
TaykYoku Mar 16, 2020
192600b
fix docs
TaykYoku Mar 16, 2020
b34e2e1
fix docs
TaykYoku Mar 16, 2020
9ae8760
fix docs
TaykYoku Mar 16, 2020
11f48b9
fix __X509Name
TaykYoku Mar 19, 2020
d50f5cd
fix getFakeProxy
TaykYoku Mar 19, 2020
eabcb0d
fix getFakeProxy
TaykYoku Mar 19, 2020
8e22cd5
fix dn parser
TaykYoku Mar 23, 2020
7c1fa97
fix integration test
TaykYoku Mar 23, 2020
8dac8c4
fix integration test
TaykYoku Mar 23, 2020
b00df3d
fix whitespace
TaykYoku Mar 23, 2020
cc58430
use os env
TaykYoku Mar 23, 2020
3686c8b
use os env
TaykYoku Mar 23, 2020
b2c563e
Align PUSP to changes
TaykYoku Apr 2, 2020
9635794
optimize
TaykYoku Apr 2, 2020
f309cd6
add C field to test
TaykYoku Apr 2, 2020
4f39815
fix bug
TaykYoku Apr 2, 2020
d80e76a
whitespace
TaykYoku Apr 2, 2020
3ece313
fix parsing
TaykYoku Apr 2, 2020
9719ba5
whitespace
TaykYoku Apr 2, 2020
d1d3c33
fix S_OK/S_ERROR
TaykYoku Apr 2, 2020
ae6da26
fix pusp
TaykYoku Apr 2, 2020
4b2b547
_forceGenerateProxyForDN for internal use
TaykYoku Apr 2, 2020
1cd7880
_forceGenerateProxyForDN for internal use
TaykYoku Apr 2, 2020
dd08fb1
simplifying return
TaykYoku Apr 3, 2020
a753c8e
simplifying return
TaykYoku Apr 3, 2020
9bbd1fd
fix error message in ProxyProvider
TaykYoku Apr 4, 2020
b3da8c3
some fixes
TaykYoku Apr 4, 2020
73d45fa
some fixes
TaykYoku Apr 4, 2020
ffba7ff
docs
TaykYoku Apr 6, 2020
19c2d5a
use exception log
TaykYoku Apr 7, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions Core/Security/ProxyInfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import six
import base64

from DIRAC import S_OK, S_ERROR
from DIRAC import S_OK, S_ERROR, gLogger
from DIRAC.Core.Utilities import DErrno
from DIRAC.Core.Security.X509Chain import X509Chain # pylint: disable=import-error
from DIRAC.Core.Security.VOMS import VOMS
Expand Down Expand Up @@ -157,7 +157,10 @@ def formatProxyStepsInfoAsString(infoList):
if key in stepInfo:
value = stepInfo[key]
if key == 'serial':
value = base64.b16encode(value)
Comment thread
fstagni marked this conversation as resolved.
try:
value = base64.b16encode(value)
except Exception as e:
gLogger.exception("Could not read serial:", lException=e)
if key == 'lifetime':
secs = value
hours = int(secs / 3600)
Expand Down
11 changes: 7 additions & 4 deletions FrameworkSystem/DB/ProxyDB.py
Original file line number Diff line number Diff line change
Expand Up @@ -714,10 +714,10 @@ def __generateProxyFromProxyProvider(self, userDN, proxyProvider):
if not result['OK']:
return result
pp = result['Value']
result = pp.getProxy({"DN": userDN})
result = pp.getProxy(userDN)
Comment thread
TaykYoku marked this conversation as resolved.
if not result['OK']:
return result
proxyStr = result['Value']['proxy']
proxyStr = result['Value']
chain = X509Chain()
result = chain.loadProxyFromString(proxyStr)
if not result['OK']:
Expand Down Expand Up @@ -1064,9 +1064,12 @@ def setPersistencyFlag(self, userDN, userGroup, persistent=True):
if not result['OK']:
self.log.error("setPersistencyFlag: Can not retrieve username for DN", userDN)
return result
userName = result['Value']
try:
sUserName = self._escapeString(result['Value'])['Value']
except KeyError:
Comment thread
TaykYoku marked this conversation as resolved.
return S_ERROR("Can't escape user name")
cmd = "INSERT INTO `ProxyDB_Proxies` ( UserName, UserDN, UserGroup, Pem, ExpirationTime, PersistentFlag ) VALUES "
cmd += "( %s, %s, %s, '', UTC_TIMESTAMP(), 'True' )" % (userName, sUserDN, sUserGroup)
cmd += "( %s, %s, %s, '', UTC_TIMESTAMP(), 'True' )" % (sUserName, sUserDN, sUserGroup)
else:
cmd = "UPDATE `ProxyDB_Proxies` SET PersistentFlag='%s' WHERE UserDN=%s AND UserGroup=%s" % (sqlFlag,
sUserDN,
Expand Down
Loading