Skip to content

Commit 309da31

Browse files
Merge pull request #133 from edquist/SOFTWARE-3396.xrootd_policy-cond
conditionalize xrootd policy based on lcmaps version (SOFTWARE-3396)
2 parents 01af4b3 + 617b137 commit 309da31

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

osgtest/tests/test_14_lcmaps.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,17 @@ def test_01_configure(self):
2020
"globus_mapping liblcas_lcmaps_gt4_mapping.so lcmaps_callout\n",
2121
owner='lcmaps')
2222

23+
def test_02_xrootd_policy(self):
24+
core.skip_ok_unless_installed('xrootd-lcmaps', *self.required_rpms)
25+
self.skip_ok_unless(core.package_version_compare('xrootd-lcmaps', '1.4.0') >= 0)
26+
27+
files.append(core.config['lcmaps.db'],
28+
'''xrootd_policy:
29+
verifyproxynokey -> banfile
30+
banfile -> banvomsfile | bad
31+
banvomsfile -> gridmapfile | bad
32+
gridmapfile -> good | vomsmapfile
33+
vomsmapfile -> good | defaultmapfile
34+
defaultmapfile -> good | bad
35+
''',
36+
backup=False)

osgtest/tests/test_15_xrootd.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ def test_01_start_xrootd(self):
4848
lcmaps_packages = ('lcmaps', 'lcmaps-db-templates', 'xrootd-lcmaps', 'vo-client', 'vo-client-lcmaps-voms')
4949
if all([core.rpm_is_installed(x) for x in lcmaps_packages]):
5050
core.log_message("Using xrootd-lcmaps authentication")
51-
sec_protocol = '-authzfun:libXrdLcmaps.so -authzfunparms:--loglevel,5,--policy,authorize_only'
51+
sec_protocol = '-authzfun:libXrdLcmaps.so -authzfunparms:--loglevel,5'
52+
if core.package_version_compare('xrootd-lcmaps', '1.4.0') >= 0:
53+
sec_protocol += ',--policy,authorize_only'
5254
else:
5355
core.log_message("Using XRootD mapfile authentication")
5456
sec_protocol = '-gridmap:/etc/grid-security/xrd/xrdmapfile'

0 commit comments

Comments
 (0)