Skip to content

Commit 46ed90b

Browse files
author
efajardo
committed
Each server has its own secrets
1 parent 0b9e7b4 commit 46ed90b

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

osgtest/tests/test_158_xrootd_tpc.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
xrd.protocol http:%d /usr/lib64/libXrdHttp-4.so
4242
fi
4343
http.exthandler xrdmacaroons libXrdMacaroons.so
44-
macaroons.secretkey /etc/xrootd/macaroon-secret
4544
all.sitename VDTTESTSITE
4645
4746
"""
@@ -81,11 +80,20 @@ def test_01_configure_xrootd(self):
8180
owner='xrootd', backup=True, chown=(user.pw_uid, user.pw_gid))
8281
core.state['xrootd.tpc.backups-exist'] = True
8382

84-
def test_02_create_secret_key(self):
83+
def test_02_create_secrets(self):
8584
core.skip_ok_unless_installed('xrootd', 'xrootd-scitokens', by_dependency=True)
86-
core.config['xrootd.tpc.macaroon-secret'] = '/etc/xrootd/macaroon-secret'
85+
core.config['xrootd.tpc.macaroon-secret-1'] = '/etc/xrootd/macaroon-secret-1'
86+
core.config['xrootd.tpc.macaroon-secret-2'] = '/etc/xrootd/macaroon-secret-2'
8787
core.check_system(["openssl", "rand", "-base64", "-out",
88-
core.config['xrootd.tpc.macaroon-secret'], "64"], "Creating simmetric key")
88+
core.config['xrootd.tpc.macaroon-secret-1'], "64"], "Creating simmetric key")
89+
core.check_system(["openssl", "rand", "-base64", "-out",
90+
core.config['xrootd.tpc.macaroon-secret-2'], "64"], "Creating simmetric key")
91+
files.append(core.config['xrootd.tpc.config-1'],
92+
"macaroons.secretkey %s"%(core.config['xrootd.tpc.macaroon-secret-1']),
93+
owner='xrootd', backup=False)
94+
files.append(core.config['xrootd.tpc.config-2'],
95+
"macaroons.secretkey %s"%(core.config['xrootd.tpc.macaroon-secret-2']),
96+
owner='xrootd', backup=False)
8997

9098

9199
def test_03_start_xrootd(self):

0 commit comments

Comments
 (0)