0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-12-26 09:34:20 +01:00
gitea/templates
Giteabot f144521aea
Deprecate query string auth tokens (#28390) (#28430)
Backport #28390 by @jackHay22

## Changes
- Add deprecation warning to `Token` and `AccessToken` authentication
methods in swagger.
- Add deprecation warning header to API response. Example: 
  ```
  HTTP/1.1 200 OK
  ...
  Warning: token and access_token API authentication is deprecated
  ...
  ```
- Add setting `DISABLE_QUERY_AUTH_TOKEN` to reject query string auth
tokens entirely. Default is `false`

## Next steps
- `DISABLE_QUERY_AUTH_TOKEN` should be true in a subsequent release and
the methods should be removed in swagger
- `DISABLE_QUERY_AUTH_TOKEN` should be removed and the implementation of
the auth methods in question should be removed

## Open questions
- Should there be further changes to the swagger documentation?
Deprecation is not yet supported for security definitions (coming in
[OpenAPI Spec version
3.2.0](https://github.com/OAI/OpenAPI-Specification/issues/2506))
- Should the API router logger sanitize urls that use `token` or
`access_token`? (This is obviously an insufficient solution on its own)

Co-authored-by: Jack Hay <jack@allspice.io>
Co-authored-by: delvh <dev.lh@web.de>
2023-12-12 13:45:00 +08:00
..
admin
api/packages/pypi
base
code
custom
devtest
explore Keep profile tab when clicking on Language (#28320) (#28331) 2023-12-03 14:54:53 +00:00
mail
org
package
projects
repo Fix margin in server signed signature verification view (#28379) (#28381) 2023-12-07 10:37:12 +08:00
shared Refactor template empty checks (#28351) (#28354) 2023-12-05 06:07:15 +00:00
status
swagger Deprecate query string auth tokens (#28390) (#28430) 2023-12-12 13:45:00 +08:00
user Refactor template empty checks (#28351) (#28354) 2023-12-05 06:07:15 +00:00
webhook
home.tmpl
install.tmpl
post-install.tmpl