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

Modify .cfg templates and code to remove CERN/DDM-specific information #6696

Open
rdimaio opened this issue Apr 18, 2024 · 0 comments
Open
Assignees

Comments

@rdimaio
Copy link
Contributor

rdimaio commented Apr 18, 2024

Description

This conversation started from this PR #6658

There's a few places in the code where ATLAS/DDM-specific defaults are used (e.g. ph-adp-ddm-lab@cern.ch). (Sidenote: I think this is part of a larger issue of having VO-specific code in the repository, see this discussion #6576)

Examples

In the rucio.cfg and rucio_multi_vo.cfg templates:

# Default DDMLAB client certificate from /opt/rucio/etc/web/client.crt
x509_identity = emailAddress=ph-adp-ddm-lab@cern.ch,CN=DDMLAB Client Certificate,OU=PH-ADP-CO,O=CERN,ST=Geneva,C=CH
x509_email = ph-adp-ddm-lab@cern.ch
# Default DDMLAB cern account
gss_identity = ddmlab@CERN.CH
gss_email = ph-adp-ddm-lab@cern.ch
# Default DDMLAB ssh key
ssh_identity = ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq5LySllrQFpPL614sulXQ7wnIr1aGhGtl8b+HCB/0FhMSMTHwSjX78UbfqEorZV16rXrWPgUpvcbp2hqctw6eCbxwqcgu3uGWaeS5A0iWRw7oXUh6ydnVy89zGzX1FJFFDZ+AgiZ3ytp55tg1bjqqhK1OSC0pJxdNe878TRVVo5MLI0S/rZY2UovCSGFaQG2iLj14wz/YqI7NFMUuJFR4e6xmNsOP7fCZ4bGMsmnhR0GmY0dWYTupNiP5WdYXAfKExlnvFLTlDI5Mgh4Z11NraQ8pv4YE1woolYpqOc/IMMBBXFniTT4tC7cgikxWb9ZmFe+r4t6yCDpX4IL8L5GOQ== ddmlab
ssh_email = ph-adp-ddm-lab@cern.ch
# Default DDMLAB SAML Name ID
saml_id = ddmlab
saml_email = ph-adp-ddm-lab@cern.ch

In the root_account defaults:

def create_root_account():
"""
Inserts the default root account to an existing database. Make sure to change the default password later.
"""
multi_vo = bool(config_get('common', 'multi_vo', False, False))
up_id = 'ddmlab'
up_pwd = 'secret'
up_email = 'ph-adp-ddm-lab@cern.ch'
x509_id = 'emailAddress=ph-adp-ddm-lab@cern.ch,CN=DDMLAB Client Certificate,OU=PH-ADP-CO,O=CERN,ST=Geneva,C=CH'
x509_email = 'ph-adp-ddm-lab@cern.ch'
gss_id = 'ddmlab@CERN.CH'
gss_email = 'ph-adp-ddm-lab@cern.ch'
ssh_id = 'ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq5LySllrQFpPL614sulXQ7wnIr1aGhGtl8b+HCB/'\
'0FhMSMTHwSjX78UbfqEorZV16rXrWPgUpvcbp2hqctw6eCbxwqcgu3uGWaeS5A0iWRw7oXUh6ydn'\
'Vy89zGzX1FJFFDZ+AgiZ3ytp55tg1bjqqhK1OSC0pJxdNe878TRVVo5MLI0S/rZY2UovCSGFaQG2'\
'iLj14wz/YqI7NFMUuJFR4e6xmNsOP7fCZ4bGMsmnhR0GmY0dWYTupNiP5WdYXAfKExlnvFLTlDI5'\
'Mgh4Z11NraQ8pv4YE1woolYpqOc/IMMBBXFniTT4tC7cgikxWb9ZmFe+r4t6yCDpX4IL8L5GOQ== ddmlab'
ssh_email = 'ph-adp-ddm-lab@cern.ch'

In tests:

add_identity(random_account.external, IdentityType.USERPASS, email='ph-adp-ddm-lab@cern.ch', password='secret')
add_account_identity('ddmlab_%s' % random_account, IdentityType.USERPASS, random_account, email='ph-adp-ddm-lab@cern.ch', password='secret')
add_identity('/ch/cern/rucio/ddmlab_%s' % random_account, IdentityType.X509, email='ph-adp-ddm-lab@cern.ch')
add_account_identity('/ch/cern/rucio/ddmlab_%s' % random_account, IdentityType.X509, random_account, email='ph-adp-ddm-lab@cern.ch')
add_identity('ddmlab_%s' % random_account, IdentityType.GSS, email='ph-adp-ddm-lab@cern.ch')
add_account_identity('ddmlab_%s' % random_account, IdentityType.GSS, random_account, email='ph-adp-ddm-lab@cern.ch')

To do

  • Make it clearer how to use the template
  • Update defaults across the code to be CERN-agnostic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants