0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-03-09 13:12:16 -05:00
forgejo/services
Rowan Bohde ddabba5f89
allow the actions user to login via the jwt token (#32527)
We have some actions that leverage the Gitea API that began receiving
401 errors, with a message that the user was not found. These actions
use the `ACTIONS_RUNTIME_TOKEN` env var in the actions job to
authenticate with the Gitea API. The format of this env var in actions
jobs changed with go-gitea/gitea/pull/28885 to be a JWT (with a
corresponding update to `act_runner`) Since it was a JWT, the OAuth
parsing logic attempted to parse it as an OAuth token, and would return
user not found, instead of falling back to look up the running task and
assigning it to the actions user.

Make ACTIONS_RUNTIME_TOKEN in action runners could be used,
attempting to parse Oauth JWTs. The code to parse potential old
`ACTION_RUNTIME_TOKEN` was kept in case someone is running an older
version of act_runner that doesn't support the Actions JWT.

(cherry picked from commit 407b6e6dfc7ee9ebb8a16c7f1a786e4c24d0516e)

Conflicts:
	services/auth/oauth2.go
  trivial context conflicts because OAuth2 scopes are in Forgejo and
  not yet in Gitea
2024-11-24 10:41:56 +00:00
..
actions allow the actions user to login via the jwt token (#32527) 2024-11-24 10:41:56 +00:00
agit
asymkey tests: improve actvititypub integration test code 2024-11-01 22:39:49 +01:00
attachment tests: improve actvititypub integration test code 2024-11-01 22:39:49 +01:00
auth allow the actions user to login via the jwt token (#32527) 2024-11-24 10:41:56 +00:00
automerge Add branch auto deletion for scheduled PRs 2024-10-31 03:49:15 +01:00
context Remove unnecessary code (#32560) 2024-11-24 10:17:44 +00:00
contexttest [TESTS] Fix usage of LoadRepoCommit 2024-08-26 08:03:48 +02:00
convert tests: improve actvititypub integration test code 2024-11-01 22:39:49 +01:00
cron
doctor Add a doctor check to disable the "Actions" unit for mirrors (#32424) 2024-11-17 08:38:34 +01:00
externalaccount
f3
federation
feed tests: improve actvititypub integration test code 2024-11-01 22:39:49 +01:00
forgejo tests: improve actvititypub integration test code 2024-11-01 22:39:49 +01:00
forms [FEAT]Allow changing git notes (#4753) 2024-11-18 22:56:17 +00:00
gitdiff improve performance of diffs (#32393) 2024-11-05 09:39:21 +01:00
indexer
issue fix: check read permissions for code owner review requests 2024-11-17 20:12:59 +01:00
lfs Fix missing signature key error when pulling Docker images with SERVE_DIRECT enabled (#32365) 2024-11-05 09:33:15 +01:00
mailer Improve usage of HMAC output for mailer tokens 2024-11-15 10:59:36 +01:00
markup
migrations Merge pull request 'test: enable gitea migration tests' (#5817) from viceice/test/migrations/gitea into forgejo 2024-11-05 10:55:30 +00:00
mirror [PORT] Fix git error handling (gitea#32401) 2024-11-03 16:47:44 +01:00
notify
org
packages Fix missing signature key error when pulling Docker images with SERVE_DIRECT enabled (#32365) 2024-11-05 09:33:15 +01:00
pull tests: improve actvititypub integration test code 2024-11-01 22:39:49 +01:00
release Trim title before insert/update to database to match the size requirements of database (#32498) 2024-11-17 12:18:56 +01:00
remote
repository Remove transaction for archive download (#32186) 2024-11-17 12:18:57 +01:00
secrets
shared/automerge create "shared" package to workaround import loop issues 2024-10-31 03:49:14 +01:00
task
uinotification
user fix: extend forgejo_auth_token table 2024-11-15 10:59:36 +01:00
webhook Escaping specific markdown in commit messages on Discord-type embeds #3664 (#5811) 2024-11-18 21:47:11 +00:00
wiki git-grep: support regexp 2024-09-16 16:20:40 +02:00