-
Notifications
You must be signed in to change notification settings - Fork 13
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
Conversation
fi | ||
|
||
EMAIL=$1 | ||
ORIGIN=$(awk -F '@' '{print $2}' <<< "$EMAIL") |
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.
Is it too clever to determine the origin from the email? it seemed safe to me and worked in testing
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.
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}"\"\} |
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.
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?
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.
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
Changes proposed in this pull request:
security considerations
None