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

Create Access Tokens for other users using the Access service #739

Open
rzaldana opened this issue Apr 10, 2023 · 0 comments
Open

Create Access Tokens for other users using the Access service #739

rzaldana opened this issue Apr 10, 2023 · 0 comments
Labels
feature request New feature or request

Comments

@rzaldana
Copy link

rzaldana commented Apr 10, 2023

Is your feature request related to a problem? Please describe.
It's currently not possible to create an access token for a user other than the one that's currently authenticated using the Access service. This is possible through the REST API by setting the "username" field in the HTTP request to a value that's different from the current user. However, the CreateTokenParams struct that the (CreateAccessToken) function takes, does not have a "Username" field to specify a different user.

func (sm *AccessServicesManager) CreateAccessToken(params services.CreateTokenParams) (auth.CreateTokenResponseData, error) {

This functionality is present in the (CreateToken) function of the artifactory service but the latter uses the deprecated API endpoints for token management.

func (sm *ArtifactoryServicesManagerImp) CreateToken(params services.CreateTokenParams) (auth.CreateTokenResponseData, error) {

Describe the solution you'd like to see
A username field added to the CreateTokenParams struct and the respective functionality in the functions that create the tokens so we can create tokens for users others than the one that's currently authenticated in the service.

Describe alternatives you've considered
Using the CreateToken function from the artifactory service but this uses the deprecated APIs, meaning the tokens created through this function cannot be used to create tokens using the new API endpoints, which is no good for my use-case.

Additional context
Add any other context or screenshots about the feature request here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant