terraform-provider-nexus icon indicating copy to clipboard operation
terraform-provider-nexus copied to clipboard

Add a ressource to manage group memberships

Open SebastianJ91 opened this issue 2 years ago • 4 comments

As the group membership can only be managed via nexus_security_user ressource for now, it's not possible to add existing LDAP users to groups.

So please create a ressource to map existing users from data source to groups.

SebastianJ91 avatar Feb 28 '22 07:02 SebastianJ91

This issue has been automatically marked as stale because it has had no activity in the last 90 days. It will be closed in 7 days if no further activity occurs. Leaving a comment starting with /fresh will mark this issue as not stale.

github-actions[bot] avatar Oct 25 '22 08:10 github-actions[bot]

Hello! There is a source field in the Nexus API for Users, which is not reflected in the Resource nor Data Source of nexus_security_user.

If set to LDAP it is possible to configure a LDAP user with roles.

E. g.

curl -v -X PUT \
  -d '{"userId": "johndoe","source": "LDAP","firstName": "ignored","lastName": "ignored","emailAddress": "[email protected]","status": "active","roles": ["BIA-Write"]}' https://artefact-repo.al-h-konzern.de/service/rest/v1/security/users/johndoe \
  -H "accept: application/json"  -H "Content-Type: application/json"`

Wouldn't that do the job if supported by the provider?

Best regards Sönke

xgcssch avatar Nov 17 '22 16:11 xgcssch

@SebastianJ91 What do you mean by "groups"? Do you mean repository groups? And would a new nexus_security_users data source be enough that enables you to query and list existing users?

joeyaurel avatar Jan 11 '24 13:01 joeyaurel

@xgcssch The API does not offer the ability to create users with a source field (the field will be ignored and the "default" source gets assigned). We could add the source field to the existing nexus_security_user data source and also add the mentioned nexus_security_users data source to query for existing users.

joeyaurel avatar Jan 11 '24 14:01 joeyaurel