-
Notifications
You must be signed in to change notification settings - Fork 54
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 source parameter to user resource #475
base: main
Are you sure you want to change the base?
Add source parameter to user resource #475
Conversation
Optional: true, | ||
ValidateFunc: validation.StringInSlice([]string{ | ||
"default", | ||
"LDAP", |
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.
I dont have an LDAP setup to test against at this time, but i suspect you cannot create LDAP users in this way? When i try to create a user with source LDAP, the api returns a user with source "default".
If it is not possible to create LDAP users this way, I would suggest removing the possibility to set the source here, or the possiblity to set anything other than default.
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.
That's actually right, LDAP users aren't created by Nexus in this way. I'll remove the posibility to set other than default just in case in the future another source spawns in a Nexus release.
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.
Addressed
Co-authored-by: Christopher Rücker <[email protected]>
Co-authored-by: Christopher Rücker <[email protected]>
Issue detailed here: #371 (comment)
In a nutshell, without the source parameter two users (one local and one LDAP) can collide using the same userid.
I've updated documentation and run tests successfully.
This is a test done in a local environment:
And this is a state show of the object
Taken advantage of the PR I've fixed the
examples/local-development/main.tf
file which was using a resource that doesn't exist