WIP: set reasonable defaults for timeouts/limits #48
Draft
Brooke
wants to merge 1 commits from
ratelimiting into main
pull from: ratelimiting
merge into: :main
:main
:renovate/codeberg.org-forgejo-forgejo-16.x
:renovate/codeberg.org-forgejo-forgejo-15.x
:ratelimiting
:ssh-optional
:renovate/mariadb-12.x
:renovate/mariadb-10.x
:renovate/postgres-18.x
:renovate/postgres-15.x
:produccion
:signing
:metrics
:export-metrics
:session
:shutdown
:caching
:gallinero
:s3
:gems
:sutty
:renovate/codeberg.org-forgejo-forgejo-14.x
:internal-registration
:max-creation-limit
:reviewers
:maintainers
:anubis
Labels
No items
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Assignees
3wordchant
aadil (Aadil Ayub)
abra-bot (Abra Bot)
ammaratef45
amras (Sarma)
Apfelwurm
appletalk
arjan
basebuilder
BornDeleuze
Brooke
carla
cas (Cassowary)
codegod100
coopcloud
cyrnel
decentral1se (d1)
dede
devydave
fauno (fauno)
flancian
Frando
iexos
jade (Jade Ambrose)
javielico (Javielico)
jjsfunhouse
jmakdah2 (Jackie Makdah)
joe-irving (Joe Irving)
kawaiipunk (KawaiiPunk)
knoflook
kolaente
lambdabundesverband
linnealovespie (April)
marlon (marlon)
mayel
mirsal
moosemower
moritz
nicksellen (Nick Sellen)
notplants
oxaliq (sorrel)
p4u1
pau
pharaohgraphy (Andrew 🐦🔥❤️🔥✴️)
PhiNatalie
renovate-bot (Comrade Renovate Bot)
ripclap
rix
rscmbbng
sef (sef)
simon
sixsmith (Sixsmith)
stevensting
tobias
trav (Trav Fryer)
val (val (he/him))
vaznasty
virtualboys
wolcen (Chris Thompson)
wykwit
xynosis
yksflip
Clear assignees
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: coop-cloud/forgejo#48
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Recently it seems to have become more popular to do very low hanging fruit attacks on forgejo/gitea instances. One of these being many login and registration attempts.
Considering gitea/forgejo already has tools for limiting the frequency of these attempts I'm proposing some defaults for webhooks, logins, and api requests.
To be clear, this is currently untested and it remains to be seen if these rate limits work with the current architecture of traefik as the main load balancer.
@@ -46,2 +46,4 @@REQUIRE_SIGNIN_VIEW = {{ env "GITEA_REQUIRE_SIGNIN_VIEW" }}ENABLE_INTERNAL_SIGNIN = {{ env "GITEA_ENABLE_INTERNAL_SIGNIN" }}MAX_FAILED_ATTEMPTS = {{ or (env "GITEA_LOGIN_MAX_FAILED_ATTEMPTS") "5" }}LOCKOUT_DURATION = {{ or (env "GITEA_LOGIN_LOCKOUT_DURATION") "1h" }}nice! i didn't know this syntax :O
@@ -157,0 +164,4 @@[api]MAX_RESPONSE_ITEMS = {{ or (env "GITEA_API_MAX_RESPONSE_ITEMS") "50" }}DEFAULT_PAGING_NUM = {{ or (env "GITEA_API_DEFAULT_PAGING_NUM") "20" }}ENABLE_SWAGGER = {{ or (env "GITEA_API_ENABLE_SWAGGER") "false" }}is swagger enabled by default? could it affect api clients?
It is enabled by default but It should not have any effect on actual usage of the api.
i'm open to testing it but not sure how to monitor this. i found a
gitea_accessesmetric on grafana, would that be useful? it only moved from 309 to 315 in the data i have, but our instance is privateView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.