Commit Graph

483 Commits

Author SHA1 Message Date
Kevin Fenzi
8925937958 pagure: Drop incorrect robots.txt entry
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2024-07-13 10:21:28 -07:00
Stephen Smoogen
969bbfcf2a Add blockers to dl.fedoraproject.org
Looked at logs of servers being hit by the 'non-responsive' bots and
the following were hit heavily every day multiple times a day:

100006 nagios.fedoraproject.org-access.log
102150 koschei.fedoraproject.org-access.log
162296 lists.fedoraproject.org-access.log
495776 fedoraproject.org-access.log
850471 dl.fedoraproject.org-access.log

Added bloks to dl.fedoraproject to try and lower its hit rate. Others
need review from people who know their internals more.

Signed-off-by: Stephen Smoogen <ssmoogen@redhat.com>
2024-07-09 09:18:56 +00:00
Nils Philippsen
205e2c9ed5 distgit/pagure: Set git directories as safe
This was fixed previously for pagure.io in the context of
paguremirroring. Turns out, it affects all kinds of git operations, so
document and move accordingly.

Fixes: releng#12181
Fixes: fedora-infrastructure#12010

Signed-off-by: Nils Philippsen <nils@redhat.com>
2024-06-27 11:21:19 +02:00
Kevin Fenzi
c991e41638 pagure: allow https push on pagure.io too
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2024-06-17 15:09:03 -07:00
Michal Konecny
abe14b6489 [pagure] Change the folder permission for pagure
To create a new log file the as paguremirroring user we need to add write
permissions to /var/log/pagure/ folder as well. This is correctly set for
distgit/pagure role, but not for pagure itself.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-06-04 11:52:42 +02:00
Michal Konecny
c897c9c197 [pagure] Add tags to acl fix
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-06-04 10:28:39 +02:00
Kevin Fenzi
4701fd8783 pagure: fix typo
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2024-06-03 14:13:40 -07:00
Michal Konecny
c5b14f29fa [pagure] Add default ACLs to /var/log/pagure
This is a permanent fix for https://pagure.io/fedora-infrastructure/issue/11957

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-06-03 21:10:36 +00:00
Kevin Fenzi
4a3da58a9e pagure: drop Bytespider crawler
This crawler is hitting pagure.io really hard.
Sent it a 403 and block in robots.txt

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2024-05-01 12:19:43 -07:00
Kevin Fenzi
ec49ea3083 pagure: increase crawl delay to reduce load
This was causing pagure to not be very responsive.
Lets try increasing the delay to reduce load.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2024-02-28 14:04:02 -08:00
Kevin Fenzi
c471f29867 pagure: try increasing the number of processes for pagure.io
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2024-02-05 14:06:40 -08:00
Michal Konecny
17f02d725a [Pagure] Enable safe directories for production
See https://pagure.io/fedora-infrastructure/issue/11330 for more details.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2023-09-21 17:19:38 +02:00
Michal Konecny
ba7424bdf2 [Pagure] The value needs to be string
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2023-09-06 10:17:33 +02:00
Michal Konecny
3c9cd1ad34 [Pagure] Set git directories as safe system-wide
This will solve https://pagure.io/fedora-infrastructure/issue/11330

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2023-09-06 10:12:02 +02:00
Michal Konecny
4c2dc64958 [Pagure] Disable OIDC on production for now
Limiting the number of processes to 1 caused unexpected error on production
instance. For more info see https://pagure.io/fedora-infrastructure/issue/10372#comment-868823

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2023-08-14 12:30:45 +02:00
Michal Konecny
88f7258c7b [Pagure] Enable OIDC on production
As OIDC authentication works without issue on staging let's enable it on
production as well.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2023-08-14 11:25:39 +02:00
Aurélien Bompard
44ce99733e Pagure: only use a single apache process
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2023-08-11 12:29:10 +00:00
Michal Konecny
a4ddf54509 [Pagure] Limit the httplib2 task by tags
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2023-08-11 12:04:09 +02:00
Aurélien Bompard
1e26cf9246 Some more fixes to get Pagure to work with OIDC on staging
- patch the httplib2 library to avoid hardcoding TLSv1
- set the missing configuration variables in `pagure.cfg` (they have no
  defaults)
- set the password for the future production version of
  `client_secrets.json`

Also note that in the private ansible repo, the Pagure client
configuration in Ipsilon was fixed: the `token_endpoint_auth_method`
variable was set to `"client_secret_post"`.

Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2023-08-11 11:39:03 +02:00
Michal Konecny
a05113b48d [Pagure] Fix the client_secrets.json
The `env_suffix` variable doesn't work in case of pagure. So we need to do it
different way.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2023-08-11 11:36:38 +02:00
Michal Konecny
d737ecb396 [Pagure] Disable OIDC for staging pagure
The OIDC is not working yet on staging pagure and the work is being done in
https://pagure.io/fedora-infra/ansible/pull-request/1514

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2023-07-28 14:14:52 +02:00
Kevin Fenzi
07f9caa49f pagure: drop this websites block
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2023-07-21 12:58:11 -07:00
Michal Konečný
5238a92325 [Pagure] Add flask OIDC package to dependencies
Signed-off-by: Michal Konečný <mkonecny@redhat.com>
2023-07-18 16:12:05 +02:00
Michal Konečný
e54dae6574 [Pagure] Use correct staging env variable
Also change the client_secrets.json permissions to match pagure.cfg.

Signed-off-by: Michal Konečný <mkonecny@redhat.com>
2023-07-18 14:53:16 +02:00
Stephen Smoogen
7d7d0bf0a8 Remove smooge from various aliases
Currently, I (Stephen Smoogen) do not have the time to work on Fedora
system administration items. However, I get a lot of email and people
see my email address in various places to ping me for working on
things. I feel it would be better to remove myself from those places
and let Fedora Infrastructure add someone else to replace me when it
is possible to do so.

Signed-off-by: Stephen Smoogen <ssmoogen@redhat.com>
2023-07-17 23:34:18 +00:00
Michal Konečný
b34e3e08e6 [Pagure] Use the correct name of variable
Signed-off-by: Michal Konečný <mkonecny@redhat.com>
2023-07-17 18:45:31 +02:00
Michal Konečný
82cc3661a7 [Pagure] Remove undefined variable
We are enabling OIDC just for staging now, so no need to have production
variable in place.

Signed-off-by: Michal Konečný <mkonecny@redhat.com>
2023-07-17 18:37:21 +02:00
Michal Konečný
4e14997780 [Pagure] Fix yamllint errors
Signed-off-by: Michal Konečný <mkonecny@redhat.com>
2023-07-17 18:04:18 +02:00
Michal Konečný
d1dc3f649b [Pagure] Enable OIDC in staging
Signed-off-by: Michal Konečný <mkonecny@redhat.com>
2023-07-17 17:35:38 +02:00
Ryan Lerch
ce04d4a22f Add ryanlerch to pagure admins
Adding myself to pagure admins list so i have permissions to be able to
delete spam.

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2023-04-20 10:48:32 +10:00
Michal Konečný
52d38cc4bd [Pagure] Add zlopez to admin list
Based on the discussion with kevin in https://pagure.io/fedora-infrastructure/issue/11158

Signed-off-by: Michal Konečný <mkonecny@redhat.com>
2023-03-08 13:36:23 +00:00
Kevin Fenzi
d44bc3991c pagure: handle stunnel bundled cert in letsencrypt renews
This commit removes the old tasks to try and create a cert/intermediate
bundle file for stunnel in favor of just doing it when we renew/get the
cert. It also fixes stunnel to use the correct bundled cert.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2023-01-20 11:55:13 -08:00
Kevin Fenzi
c3718a166a pagure: put websites block back in place
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2023-01-17 16:10:04 -08:00
Kevin Fenzi
639fb415e9 pagure: try and put fedora-websites back to normal
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2023-01-11 11:22:25 -08:00
Kevin Fenzi
1c1780c931 pagure / staging: set correct env
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-09-19 14:28:17 -07:00
Kevin Fenzi
f183f5262b pagure-stg01 / ipsilon*.stg: split db passwords from stg and prod
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-09-19 13:53:15 -07:00
Kevin Fenzi
12b64f5370 Revert "pagure: drop websites rule for old DDoS"
This reverts commit 415f621bdf.

Seems the DDoS is back
2022-08-18 08:55:33 -07:00
Kevin Fenzi
ebcf1ff795 pagure: fix "ServerLimit cannot occur within <VirtualHost> section" error
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-08-03 11:59:46 -07:00
Kevin Fenzi
c11827de9f pagure/src: see about enabling h2
I'll try this in stg first and then roll to prod if all looks ok.
I don't see any reason why it wouldn't work off hand.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-08-03 11:46:46 -07:00
Kevin Fenzi
415f621bdf pagure: drop websites rule for old DDoS
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-07-31 12:04:12 -07:00
Kevin Fenzi
7105387724 pagure: increase some httpd worker limits
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-06-15 14:23:06 -07:00
Kevin Fenzi
45c28c27c5 pagure: add hack to 403 DDoS attack
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-06-15 14:18:39 -07:00
Kevin Fenzi
575d1ea238 pagure: increase processes
pagure was processing a lot of things, increasing this seemed to help.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-06-03 11:41:11 -07:00
Kevin Fenzi
f7490bfd81 pagure: fix pagure_mirror.service
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-05-23 10:43:29 -07:00
Kevin Fenzi
9bfed779bb pagure: also use the pagure.io cert for pagure.org as it has a alt name for that
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-04-30 09:58:07 -07:00
Kevin Fenzi
1133e45da3 pagure: fix ssl cert deployment
The current playbook assumes the old digicert ssl cert thats in private.
However, we got that in 2020 and it's expired. We switched pagure.io
over to letsencrypt a while back. Somehow we didn't change the playbook
however, or the change was lost somewhere. :(

So, this adds 2 calls to the letsencrypt role to get certs for the prod
and staging pagure instances. I think this should do the right thing
with placement of files, but more eyes welcome.

Without this playbooks runs have the chance of messing up pagure.io
certs, so I think we should fix this asap.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-04-30 16:52:39 +00:00
Nick Bebout
608d769edc Add nb to pagure.io admins 2022-04-27 16:07:48 -05:00
Michal Konečný
2be4e10676 [pagure] Enable ACLs for API key for closing issue
In https://pagure.io/fedora-infra/ansible/pull-request/1013 change to enable
new ACLs for API tokens was introduced, unfortunately the `issue_close` ACL
don't exists and to close the issue in Pagure it needs
`issue_change_status` and `issue_update` ACLs. This commit is fixing the
previous mistake.

Signed-off-by: Michal Konečný <mkonecny@redhat.com>
2022-03-31 13:01:45 +02:00
Michal Konečný
34af94b291 [pagure] Make more ACLs available for API token
Add issue_close and pull_request_close ACLs to cross project ACLs. These ACLs
are already used in Pagure API, you can't just create API token with these ACLs.

Signed-off-by: Michal Konečný <mkonecny@redhat.com>
2022-03-30 11:07:56 +00:00
Michael Scherer
989b0c433d Fix pagure templating to take its own IP v6 in account
ssh git@pagure.io was broken (no longer accepting ssh connection).
A quick debug show that it was caused by the helper script not working,
showing a 403 error. And the httpd logs were complaining about
authorized IPs not present in the configuration.

The root cause is in 938e63fa71 as the variables were renamed
from eth0_ip and eth0_ipv6 to eth0_ipv4_ip and eth0_ipv6_ip

Then pagure config got regenerated later and this triggered the
bug preventing people from pushing.
2022-01-27 15:53:38 +01:00