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

add script for creating users in UAA #306

Merged
merged 2 commits into from
Mar 20, 2024
Merged

Conversation

markdboyd
Copy link
Contributor

Changes proposed in this pull request:

  • add script for creating users in UAA

security considerations

None

@markdboyd markdboyd requested a review from a team March 20, 2024 14:55
fi

EMAIL=$1
ORIGIN=$(awk -F '@' '{print $2}' <<< "$EMAIL")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is it too clever to determine the origin from the email? it seemed safe to me and worked in testing

Copy link
Contributor

Choose a reason for hiding this comment

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

Hm, maybe just note that behavior in the usage text? I can see someone wanting to create a user from the cloud.gov origin with an agency email.

-H "If-Match:*" \
-H "Accept:application/json" \
-H "Content-Type:application/json" \
-d \{\"userName\":\""${EMAIL}"\",\"emails\":[\{\"value\":\""${EMAIL}"\"\}],\"active\":true,\"verified\":true,\"origin\":\""${ORIGIN}"\"\}
Copy link
Contributor

Choose a reason for hiding this comment

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

Quick question — why use uaac curl instead of one of the built-in commands, like uaac user add? If there's a good reason, can you add a comment documenting it here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good question. Based on a test I just ran, it looks like uaac user add requires interactivity to specify the username, so wouldn't be helpful for automation, whereas the uaac curl works without the interactivity

@markdboyd markdboyd merged commit 8fc09f4 into main Mar 20, 2024
@markdboyd markdboyd deleted the add-uaa-add-user-script branch March 20, 2024 18:10
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.

2 participants