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

Use IDs for tokens #3695

Merged
merged 14 commits into from
May 27, 2024
Merged

Use IDs for tokens #3695

merged 14 commits into from
May 27, 2024

Conversation

anbraten
Copy link
Member

We currently used user and repo names for tokens. Users will need to login again. Repo hooks don't need to be updated as we never actually check the tokens content, but just use the token as hash.

@anbraten anbraten requested a review from a team May 12, 2024 06:28
@anbraten anbraten added the enhancement improve existing features label May 12, 2024
@xoxys
Copy link
Member

xoxys commented May 12, 2024

Why is it better to use IDs? What's the motivation for this change?

@anbraten
Copy link
Member Author

Repos can be renamed and multiple users with the same username can exist when using multiple forges.

@qwerty287
Copy link
Contributor

Repo hooks don't need to be updated as we never actually check the tokens content, but just use the token as hash.

I don't think so: https://github.com/woodpecker-ci/woodpecker/blob/main/server/api/hook.go#L191-L207

shared/token/token.go Outdated Show resolved Hide resolved
@anbraten anbraten requested a review from lafriks May 20, 2024 13:18
@woodpecker-bot
Copy link
Collaborator

woodpecker-bot commented May 20, 2024

Deployment of preview was torn down

@anbraten anbraten requested a review from a team May 27, 2024 09:07
Copy link
Contributor

@qwerty287 qwerty287 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

untested

@anbraten anbraten enabled auto-merge (squash) May 27, 2024 09:31
@anbraten anbraten merged commit fd57e4a into woodpecker-ci:main May 27, 2024
7 checks passed
@anbraten anbraten deleted the auth-id-token branch May 27, 2024 09:53
@woodpecker-bot woodpecker-bot mentioned this pull request May 28, 2024
1 task
jeromerobert added a commit to jeromerobert/woodpecker-pat that referenced this pull request Jul 8, 2024
6543 pushed a commit to 6543-forks/woodpecker that referenced this pull request Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement improve existing features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants