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

Prefer using system or CVMFS CA certs #4966

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

TimoWilken
Copy link
Contributor

Try to detect when we can use system certificates or those from CVMFS, and prefer them if possible. This should avoid situations where old O2 tags have expired certs pinned.

Still fallback to the old behaviour, which is fine for CI and local development.

Cc: @ktf @adriansev

Try to detect when we can use system certificates or those from CVMFS,
and prefer them if possible. This should avoid situations where old O2
tags have expired certs pinned.

Still fallback to the old behaviour, which is fine for CI and local
development.
@TimoWilken TimoWilken requested a review from ktf April 25, 2023 15:38
@TimoWilken TimoWilken requested a review from a team as a code owner April 25, 2023 15:38
@TimoWilken
Copy link
Contributor Author

One weirdness I've run into is that old OpenSSL versions (1.0.2k, on CentOS 7) don't exit with an error status when the CA cert is expired, they only print an error message. This might have to be handled specially...

if [file isdirectory /cvmfs/alice.cern.ch/etc/grid-security/certificates] {
# Prefer current certs from CVMFS, if available. This avoids
# failures due to expired certs.
setenv X509_CERT_DIR /cvmfs/alice.cern.ch/etc/grid-security/certificates
Copy link
Member

Choose a reason for hiding this comment

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

Rather than an hardcoded single place, I would use the latest version of this package, so that we can still update the grid by simply bumping something in alidist and no "out of band" procedures are involved.

Copy link
Member

Choose a reason for hiding this comment

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

I.e. something like ls \$::env(BASEDIR)/AliEn-CAs/ | tail -1...

@adriansev
Copy link
Contributor

Hi @TimoWilken Would be possible to take into account and honor X509_USER_CERT, X509_USER_KEY, X509_CERT_FILE, X509_CERT_DIR? Maybe, even check if X509_CERT_DIR, X509_CERT_FILE are set and if so, keep them?
Also, AFAIK, on macos cvmfs is mounted under /Users/Shared, but i'm not sure if macos users are a targer for this..
Also, for the moment the actual package that export X509_CERT_DIR is alien-runtime

@adriansev
Copy link
Contributor

also, unrelated directly to this but could be worth mentioning, we do a lot of find rsync stuff .. wouldn't be easier to do this directly in alien-cas repository and then just point X509_CERT_DIR to that location? (and also as Giulio already suggested, by adding tags to alien-cas with the same name/ver as IGTF would be easier to manage versioning)

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.

None yet

3 participants