@@ -42,19 +42,24 @@ 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
- if condorce_version >= '5.1.0' :
50
+ # We apply this to HTCondor-CE 5 as a whole for the benefit of the HTCondor-CE CI tests
51
+ # This is ok even though these changes will only make it into 5.1.0 because 5.0.0 will not be released
52
+ if condorce_version >= '5.0.0' :
53
+ match_str = r'/https:\/\/demo.scitokens.org,.*/'
50
54
core .config ['condor-ce.mapfile' ] = '/etc/condor-ce/mapfiles.d/01-osg-test.conf'
51
55
else :
56
+ match_str = '"https://demo.scitokens.org"'
52
57
core .config ['condor-ce.mapfile' ] = '/etc/condor-ce/condor_mapfile'
53
58
mapfile_contents = files .read (core .config ['condor-ce.mapfile' ], as_single_string = True )
54
59
scitoken_mapping += mapfile_contents
55
60
56
61
files .write (core .config ['condor-ce.mapfile' ],
57
- scitoken_mapping ,
62
+ scitoken_mapping . format ( issuer = match_str , local_user = core . options . username ) ,
58
63
owner = 'condor-ce' ,
59
64
chmod = 0o644 )
60
65
core .state ['condor-ce.wrote-mapfile' ] = True
0 commit comments