-
Notifications
You must be signed in to change notification settings - Fork 4
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 option to import suspended users #22
Conversation
Hi @balciiberk, thank you for your PR! We are going to test it as well, just from the code we see that the disabled user information is propagated only for a newly created user in IAM (i.e. a patch operation, such as AUP signature update, is not present for the account status). Is this what we want? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes look ok to me. My only comment is what Federica already wrote: if a suspended user is imported, their status cannot be changed later from the importer itself, but only through IAM. I don't think it's an issue, just something to be aware of.
As discussed already with @balciiberk I think the status in IAM should be the same as the one in VOMS |
|
@@ -542,6 +577,8 @@ def import_voms_user(self, voms_user): | |||
new_user = True | |||
|
|||
self.synchronise_aup(iam_user, voms_user) | |||
if self._synchronize_activation_status and iam_user['active'] == voms_user['suspended']: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpicking: for uniformity, can you please use the same spelling for synchroniSation as in the existing code? if you prefer, you can change the existing code, which would make it indeed more uniform since we have authZ.
Hi Berk, trying to import a user which is suspended in VOMS Admin into IAM, with
In no-one of the above cases the End time is updated. Do you agree about all the tests outcome? As a conclusion, I would suggest to have only one option that behaves as the two together, or in case experiments have different needs, I would consider a default having the behavior of the two, and the second option used only to skip the import of suspended users. @giacomini what do you think? We still did not consider the End time of a newly created user here, but I guess it will happen in another issue/PR. |
I agree that the best would be to have the most useful behaviour as the default, but it would not be backwards compatible. We can indeed join the two options.
Yes, we should set the end time at creation, but also sync it during an update. F. |
Hi Federica, Thanks a lot for testing the behaviors. The first and third bullets are exactly what we expected. But for the second bullet, I actually don't want it to be skipped for suspended users. I just realized it's because I was just checking I didn't want to change the default behavior because I'm not sure if voms-importer is used anywhere other than CERN, and if it's used, I didn't want to break their config. Cheers, |
Hi Berk, just to recap: the I think the end time should be always synchronized (even without using this option, that at this stage can be renamed as something like By the way, as far as I know CERN is the only one using the voms-importer I think. |
Let's do what is needed at CERN right now, without too many options. |
This commit fixes #21
--import-suspended-users
is passed it also imports the users that are suspended on VOMS-AdminI tested it on our wlcg-auth-dev instance and it looks like it's working as expected but it would be great if you double-check.