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

Allow users invite #1033

Open
aalvarezaph opened this issue Jul 22, 2024 · 3 comments
Open

Allow users invite #1033

aalvarezaph opened this issue Jul 22, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request no API support We can't implement it, because there is no public API support

Comments

@aalvarezaph
Copy link

Is your feature request related to a problem? Please describe.

When enabling MFA, users created through the provider (belonging to the internal realm) are not able to edit their profile regardless of their "Can update profile" status.

Users invited into Artifactory (api/v1/access/api/ui/users/invite API endpoint) are able to sign up using personal SSO (Github, Google) and will belong to the oauth realm. In that scenario, they are able to edit their profile.

Describe the solution you'd like

I would like the provider to be able to invite users to avoid manual steps.

Describe alternatives you've considered

At the moment I am creating those invites outside of IaC, and then having an import block on Terraform (once invitation is sent, user can be imported).

Additional context

I am new to Artifactory and its provider, so hopefully not missing something obvious here

@aalvarezaph aalvarezaph added the enhancement New feature or request label Jul 22, 2024
@alexhung alexhung added the no API support We can't implement it, because there is no public API support label Jul 22, 2024
@alexhung
Copy link
Member

@aalvarezaph The API api/v1/access/api/ui/users/invite is for JFrog UI uses only. There's no public REST API for this purpose. Even if there's one, Terraform centers around managing resources, which in this case of invitation, it doesn't fit that model. Unless there's APIs to do CRUD for invitation (create invite, get invite status, delete invite).

@aalvarezaph
Copy link
Author

aalvarezaph commented Jul 23, 2024

@aalvarezaph The API api/v1/access/api/ui/users/invite is for JFrog UI uses only. There's no public REST API for this purpose.

Sorry to hear!

Even if there's one, Terraform centers around managing resources, which in this case of invitation, it doesn't fit that model. Unless there's APIs to do CRUD for invitation (create invite, get invite status, delete invite).

Thought about that but what I observed is that once the invite is sent, I can import the user in Terraform the same way I would if I had created it through the resource. So from Terraform perspective I was thinking of some create_invite variable that would instruct to use the other API to send the invitation instead of the regular user creation endpoint.

But if it's a private UI endpoint only that's a no go anyway :(

Edit: Thanks for your fast response @alexhung ! Should we then create the issue as until (/if) this is supported by the API there's not much that can be done about it ( I was surprised that edit profile doesn't show up with MFA enabled anyways, so if someone reading this knows why please enlighthen me, I might be doing something wrong :) )

@alexhung
Copy link
Member

alexhung commented Aug 1, 2024

@aalvarezaph Yes, please work with your JFrog contact to create a feature request for new REST API. Once that's implemented then I can consider how to implement it with the existing user resources.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request no API support We can't implement it, because there is no public API support
Projects
None yet
Development

No branches or pull requests

2 participants