You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitea/modules
Jack Hay 4e879fed90
Deprecate query string auth tokens (#28390)
## 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: delvh <dev.lh@web.de>
1 year ago
..
actions
activitypub Upgrade to golangci-lint@v1.55.0 (#27756) 1 year ago
analyze
assetfs
auth Next round of `db.DefaultContext` refactor (#27089) 1 year ago
avatar
base
cache
charset
container
context Second part of refactor `db.Find` (#28194) 1 year ago
contexttest Replace assert.Fail with assert.FailNow (#27578) 1 year ago
csv
doctor Improve doctor cli behavior (#28422) 1 year ago
emoji
eventsource Final round of `db.DefaultContext` refactor (#27587) 1 year ago
generate
git Make gogit Repository.GetBranchNames consistent (#28348) 1 year ago
gitgraph More `db.DefaultContext` refactor (#27265) 1 year ago
graceful Refactor graceful manager to use shared code (#28073) 1 year ago
hcaptcha
highlight
hostmatcher Support allowed hosts for webhook to work with proxy (#27655) 1 year ago
html
httpcache
httplib
indexer Include public repos in doer's dashboard for issue search (#28304) 1 year ago
issue/template
json
label
lfs Upgrade to golangci-lint@v1.55.0 (#27756) 1 year ago
log
markup Use restricted sanitizer for repository description (#28141) 1 year ago
mcaptcha
metrics
migration
nosql
options
packages Close all hashed buffers (#27787) 1 year ago
paginator
pprof
private
process Replace assert.Fail with assert.FailNow (#27578) 1 year ago
proxy
proxyprotocol
public
queue Increase queue length (#27555) 1 year ago
recaptcha
references
regexplru
repository Second part of refactor `db.Find` (#28194) 1 year ago
secret
session Next round of `db.DefaultContext` refactor (#27089) 1 year ago
setting Deprecate query string auth tokens (#28390) 1 year ago
sitemap
ssh Remove SSH workaround (#27893) 1 year ago
storage
structs Fix package webhook (#27839) 1 year ago
svg
sync
system Replace more db.DefaultContext (#27628) 1 year ago
templates Render PyPi long description as document (#28272) 1 year ago
test
testlogger
timeutil
translation
turnstile
typesniffer
updatechecker Replace more db.DefaultContext (#27628) 1 year ago
upload
uri
user
util Upgrade to golangci-lint@v1.55.0 (#27756) 1 year ago
validation
web Make CORS work for oauth2 handlers (#28184) 1 year ago
webhook