jfrog / jfrog-client-go

All go clients for JFrog products
Apache License 2.0
260 stars 140 forks source link

Feature to support Projects API and Security-Groups API #401

Open harishgoudb opened 3 years ago

harishgoudb commented 3 years ago

The customer is looking for a feature to support Projects API and Security-Groups API in the Go client to automate

Projects API: - https://www.jfrog.com/confluence/display/JFROG/Artifactory+REST+API#ArtifactoryRESTAPI-PROJECTS Security-Groups API: - https://www.jfrog.com/confluence/display/JFROG/Artifactory+REST+API#ArtifactoryRESTAPI-CreateorReplaceGroup

eyalbe4 commented 3 years ago

@harishgoudb - Is this what you're looking for in terms of User Groups management? Notice that there are additionbal related management APIs there that are also available. As for Projects Management, this is something that we're considering to add in the near future.

ghost commented 3 years ago

Thank you for the clarification @eyalbe4! I overlooked the Groups service, but as you linked it's there.

Just to elaborate more on our use case, we need to implement automation to:

  1. Create a new Project for a product team
  2. Create default roles for the Project (Admin/Contributor/Reader)
  3. If they not exist already: a. Create new default Groups (Admin/Contrib/Read) for the product team b. Sync these groups with the related Azure AD security groups of the product team
  4. Assign the Groups to the Project with related roles

The goal here is to provision an isolated Project for a product team, give them a default group permissions setup that can fulfill most teams needs, but still giving them admin rights (admin_privileges.manage_resoures) so that they will be able to further customize anything they need on the Project.

sverdlov93 commented 3 years ago

Hi, @amazzotti. The PR's above are addressing some (but not all) of the features requests mentioned here - Creating, updating and deleting projects, as well as assigning and unassign repositories to and from projects.

ghost commented 2 years ago

Hello @sverdlov93, apologies if it took me such a long time to give you feedback.
I think the additions are great! One thing I'm missing still is the ability to assign groups to a certain project.
This would be about exposing the PUT /v1/projects/{project_key}/groups/{group} endpoint.
Would it be possible to add it to the client? Thank you.

eyalbe4 commented 2 years ago

@amazzotti - Are you asking about enhancing this API to also support projects? If so, would you like to create a PR with this addition? We'd love to have it.

ghost commented 2 years ago

@eyalbe4 If you agree, I think it would be more appropriate to extend the ProjectService, to maintain consistency with the API.
I'll discuss with my team if we can implement it and submit a PR, we are a bit short on capacity at this moment.

ghost commented 2 years ago

I submitted the PR, however I'm having some issues with test coverage. Any help or feedback is appreciated.

455