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

Use CERN username instead of user.<vomsid> for setting IAM account username for LHC VOs #3

Open
andreaceccanti opened this issue Dec 15, 2021 · 1 comment

Comments

@andreaceccanti
Copy link
Contributor

andreaceccanti commented Dec 15, 2021

def build_username(self, voms_user):
user_id = "user.%d" % voms_user['id']
if self._username_attr is not None:
for attr in voms_user['attributes']:
if attr['name'] == self._username_attr:
return attr['value']
logging.error("Attribute %s not found for user %s. Will fall back to default username %s",
self._username_attr, voms_user['id'], user_id)
return user_id
else:
return user_id

@vokac
Copy link
Contributor

vokac commented Dec 20, 2021

It seems to me that just running sync script with --username-attr=nickname should work at least for ATLAS.

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

No branches or pull requests

2 participants