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

remove user guid from all groups when orphaned #133

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

Conversation

spgreenberg
Copy link
Contributor

Changes proposed in this pull request:

Remove an orphaned user group from all uaa groups. This occurs when a user is added to groups via uaac member add then deleted via cf delete-user.

security considerations

Cleans up orphaned users.

@pburkholder
Copy link
Contributor

Although we don't have a consistent bash coding standard, I'm inclined to generally include set -euo pipefail

echo "Usage: "
echo " $0 <user-guid>"
echo " "
echo " <user-guid>: The guid of the user to remove from all groups."
Copy link
Contributor

Choose a reason for hiding this comment

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

The GUID of the user to remove from all groups (up to 100, pagination not yet built-in)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure what you are commenting on.

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually this is more of an issue than I initially thought.

I was commenting on the usage text since, it would only remove the user from the first 100 groups returned by the uaac curl call. I don't know if we're close to that limit or not.

It may be worth adding pagination if we're over, say, 50 groups total and may hit 100 in the next few years.

(I initially thought it was only an issue if the user themself was in more than 100 groups, but I see that I was wrong there)

@pburkholder
Copy link
Contributor

I've picked some nits, but LGTM.

pburkholder
pburkholder previously approved these changes Jun 29, 2020
@markdboyd markdboyd changed the base branch from master to main April 14, 2023 20:02
@markdboyd markdboyd dismissed pburkholder’s stale review April 14, 2023 20:02

The base branch was changed.

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.

3 participants