mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-22 12:54:53 -05:00
48872d11ca
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 |
||
---|---|---|
.. | ||
source | ||
additional_scopes_test.go | ||
auth.go | ||
auth_test.go | ||
basic.go | ||
group.go | ||
httpsign.go | ||
interface.go | ||
main_test.go | ||
oauth2.go | ||
oauth2_test.go | ||
reverseproxy.go | ||
reverseproxy_test.go | ||
session.go | ||
signin.go | ||
source.go | ||
sspi.go | ||
sspiauth_posix.go | ||
sspiauth_windows.go | ||
sync.go |