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

Cli admin create user --access-token option should also require a --scopes option #24819

Open
akarasulu opened this issue May 20, 2023 · 2 comments
Labels
type/enhancement An improvement of existing functionality type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@akarasulu
Copy link

akarasulu commented May 20, 2023

Feature Description

The token created via gitea admin create user --access-token is effectively useless without providing some minimal scope options. The generated scopeless access token, as expected, always results in a 403 with "token does not have required scope" messages via REST API. There's no way to change the scope afterward either.

Without the ability to provide scopes the --access-token features is completely useless.

Screenshots

This shows the current token scopes (none) as the feature stands without having the option to specify scopes. Another option is from my comment below where all powers are granted to the access token generated for admins from the CLI.

image

@akarasulu akarasulu added type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first. labels May 20, 2023
@delvh
Copy link
Member

delvh commented May 20, 2023

That strongly depends on #24767 first…

@akarasulu
Copy link
Author

That strongly depends on #24767 first…

From a DevOps point of view, the token created with an admin user (via CLI) should have all scopes automatically set when creating the token, including the ability to delete this "all-powers" token after the automated configuration completes.

@lunny lunny added type/enhancement An improvement of existing functionality and removed type/feature Completely new functionality. Can only be merged if feature freeze is not active. labels May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement An improvement of existing functionality type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

No branches or pull requests

3 participants