Skip to content

Commit

Permalink
systemtest: fix support for oidc testing
Browse files Browse the repository at this point in the history
Motivation:

Commit 3389486 updated the `populate` script (a script that is used
by systemtest to customise the dCache deployment) in order to support
testing dCache's support for OpenID-Connect.  The patch makes use of
oidc-agent to achieve this; if oidc-agent is not installed or the agent
has no configurations loaded then systemtest is not updated to support
OpenID-Connect.

A somewhat subtle bug in the `oidc-token` command resulted in the above
patch not working as intended, resulting in the `populate` script
generating a broken dCache configuration.  This bug has been reported to
oidc-agent team.

Modification:

Add simple work-around for the problem, along with a comment pointing to
the upstream bug report.

Result:

The `populate` script now generates a valid dCache configuration if
oidc-agent is installed and at least one configuration has been loaded.

Target: master
Request: 8.1
Requires-notes: no
Requires-book: no
Patch: https://rb.dcache.org/r/13960/
Acked-by: Tigran Mkrtchyan
  • Loading branch information
paulmillar authored and lemora committed Apr 27, 2023
1 parent 1aa9d84 commit e6f11e3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/system-test/src/main/bin/populate
Expand Up @@ -56,7 +56,11 @@ add_oidc() {
prepend etc/gplazma.conf "auth optional oidc"

for op in $loaded_ops; do
eval $(oidc-token -c $op)
# The "2>&1" is a work-around for a bug in oidc-token; see:
#
# https://github.com/indigo-dc/oidc-agent/issues/503
#
eval $(oidc-token -c $op 2>&1)

# REVISIT: we should be able to use OIDC_ISS variable to
# discover the OP's issuer endpoint. However, the URL is
Expand Down

0 comments on commit e6f11e3

Please sign in to comment.