File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -42,19 +42,22 @@ def test_02_scitoken_mapping(self):
42
42
'HTCondor version does not support SciToken submission' )
43
43
44
44
condorce_version = core .PackageVersion ('htcondor-ce' )
45
- scitoken_mapping = f 'SCITOKENS "https://demo.scitokens.org" { core . options . username } \n '
45
+ scitoken_mapping = 'SCITOKENS {issuer} {local_user }\n '
46
46
47
- # Write the mapfile to the admin mapfile directory
47
+ # Write the mapfile to the admin mapfile directory with the regex format for the issuer
48
+ # required by 'CERTIFICATE_MAPFILE_ASSUME_HASH_KEYS = True'
48
49
# https://github.com/htcondor/htcondor-ce/pull/425
49
50
if condorce_version >= '5.1.0' :
51
+ match_str = r'/https:\/\/demo.scitokens.org,.*/'
50
52
core .config ['condor-ce.mapfile' ] = '/etc/condor-ce/mapfiles.d/01-osg-test.conf'
51
53
else :
54
+ match_str = '"https://demo.scitokens.org"'
52
55
core .config ['condor-ce.mapfile' ] = '/etc/condor-ce/condor_mapfile'
53
56
mapfile_contents = files .read (core .config ['condor-ce.mapfile' ], as_single_string = True )
54
57
scitoken_mapping += mapfile_contents
55
58
56
59
files .write (core .config ['condor-ce.mapfile' ],
57
- scitoken_mapping ,
60
+ scitoken_mapping . format ( issuer = match_str , local_user = core . options . username ) ,
58
61
owner = 'condor-ce' ,
59
62
chmod = 0o644 )
60
63
core .state ['condor-ce.wrote-mapfile' ] = True
You can’t perform that action at this time.
0 commit comments