Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for tokens requested via oidc-agent. #17

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

bbockelm
Copy link
Collaborator

Example invocation:

./bin/smoke-test.sh -o WLCG-XFER -t wlcg https://red-gridftp1.unl.edu:1094/user/dteam

(assuming that you have already run oidc-add WLCG-XFER)

@bbockelm bbockelm requested a review from paulmillar September 16, 2020 15:04
@bbockelm
Copy link
Collaborator Author

Ok, I am done hacking for the day! Ready for review...

Copy link
Owner

@paulmillar paulmillar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy with the patch as-is.

I've made a few commands. There are no show-stoppers, but would appreciate it if you could check the comments.

@@ -58,7 +58,7 @@ extended=0
tokenType=macaroon
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Unfortunately, githib doesn't allow me to make this comment any earlier]

I think the patch should define WLCG_THIRDPARTY_PRIVATE_URL and WLCG_THIRDPARTY_UPLOAD_BASE_URL (as with dteam, escape and atlas VOs), and update the code to use these default values if the client configures smoke-test to use the wlcg VO.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @paulmillar -

Finally started to look at this and I noticed that something appears to be misconfigured on the prometheus side.

This works:

voms-proxy-init -voms dteam
curl --verbose --connect-timeout 60 -D /tmp/tmp.CNpXBTEwRC \
   -s -f -L  --capath /etc/grid-security/certificates -H 'X-No-Delegate: true' \
   --cacert /tmp/x509up_u1221 -E /tmp/x509up_u1221 -H 'Credential: none' \
   -m30 -X POST -H 'Content-Type: application/macaroon-request' \
   -d '{"caveats": ["activity:DOWNLOAD"], "validity": "PT30M"}' -o/tmp/tmp.FbihlmyRjK \
   https://prometheus.desy.de:2443/VOs/dteam/private-file

This doesn't work:

voms-proxy-init -voms wlcg
curl --verbose --connect-timeout 60 -D /tmp/tmp.CNpXBTEwRC \
   -s -f -L  --capath /etc/grid-security/certificates -H 'X-No-Delegate: true' \
   --cacert /tmp/x509up_u1221 -E /tmp/x509up_u1221 -H 'Credential: none' \
   -m30 -X POST -H 'Content-Type: application/macaroon-request' \
   -d '{"caveats": ["activity:DOWNLOAD"], "validity": "PT30M"}' -o/tmp/tmp.FbihlmyRjK \
   https://prometheus.desy.de:2443/VOs/wlcg/private-file

Only difference is replacing the dteam string with wlcg. Access with DAVIX clients appears OK, so I think X.509 auth is working overall -- but perhaps just an issue with the macaroon generation?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, indeed. The problem was that prometheus was missing the .lsc file for the WLCG VOMS server.

I've installed the missing file, so the problem should be fixed now.

Could you give it another go?

bin/smoke-test.sh Show resolved Hide resolved
bin/smoke-test.sh Show resolved Hide resolved
bin/smoke-test.sh Show resolved Hide resolved
bin/smoke-test.sh Show resolved Hide resolved
bin/smoke-test.sh Show resolved Hide resolved
bin/smoke-test.sh Show resolved Hide resolved
- Add new WLCG-specific default URLs.
- Make the VO be set by the `-v` option.
- Rename `wlcg` token type to `oidcagent`.
- Make it an error to set the `oidcagent` token type but not specify an account name.
@bbockelm
Copy link
Collaborator Author

bbockelm commented Oct 1, 2020

Ok, I think I got the comments addressed - except for this issue (I think) with the WLCG VO requesting macaroons noted above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants