1
1
mirror of https://gitlab.archlinux.org/archlinux/infrastructure.git synced 2025-01-18 08:06:16 +01:00
Commit Graph

88 Commits

Author SHA1 Message Date
Christian Heusel
388f7b7efb
tf-stage2: use 1h timeout for keycloak pw resets
Recently somebody complained that the email only reached them after the
password reset link had already become invalid, which is definitely
something that can happen with the previously set 5min timeout. 5
minutes timeout are too short aswell for any complex email analysis
setup or greylisting, and we therefore bump this value to one hour,
which is still short enough from a security perspective but gives our
users a bit more time to act on the reset.

Signed-off-by: Christian Heusel <christian@heusel.eu>
2024-12-02 19:00:49 +01:00
Kristian Klausen
7936c65266
tf-stage2: Remove no longer needed openid client for buildbot PoC
The PoC has concluded.

This reverts commit c56fbb55 (tf/keycloak: Add openid client for buildbot, 2022-09-01).
2024-12-01 14:58:32 +01:00
Evangelos Foutras
d757af82ed
tf-stage2: remove userProfileEnabled attribute
"The user profile feature is now enabled by default." [1]

[1] https://www.keycloak.org/docs/24.0.2/upgrading/#user-profile-changes
2024-08-04 11:49:20 +03:00
Kristian Klausen
e128cd0f4c
tf-stage2: Update code to reflect that Keycloak registration is disabled
Registration has been disabled since 2023-07-09, so the code should have
been updated a long time ago.
2024-03-23 15:13:38 +01:00
Kristian Klausen
4e5550a877
Decommission bugs.archlinux.org and replace it with a static copy[1]
As announced[2][3] the bugtracker has been migrated to gitlab, so
bugs.a.o can be decommissioned and replaced with a static copy[1](to
avoid link rot).

[1] https://gitlab.archlinux.org/archlinux/bugs-archive/
[2] https://archlinux.org/news/bugtracker-migration-to-gitlab-completed/
[3] https://lists.archlinux.org/hyperkitty/list/arch-dev-public@lists.archlinux.org/thread/WYXDTJ3TR2DWRQCDZK44BQDH67IDVGTS/

Fix #550
Fix #551
2024-02-10 17:07:38 +01:00
Evangelos Foutras
c53e1ad5d0
tf-stage2: remove RegistrationProfile form action
The form action RegistrationProfile has been removed in Keycloak 23.

Relevant information from the upgrading guide [1]:

> The validation of user attributes as well as creation of the user
> including all that user’s attributes is handled by
> RegistrationUserCreation form action and hence RegistrationProfile
> is not needed anymore.

[1] https://www.keycloak.org/docs/23.0.0/upgrading/#removed-registrationprofile-form-action

Co-authored-by: Kristian Klausen <kristian@klausen.dk>
2023-12-24 01:29:20 +02:00
Evangelos Foutras
515837f690
tf-stage2: set UptimeRobot monitor interval to 300
Our free plan no longer supports 60-second interval for monitors.
2023-12-10 11:40:57 +02:00
Kristian Klausen
2885730582
tf-stage2: Make specifying a last name optional
We have a few staff and users who prefer using a alias/mononym, so let's
make it optional.

Since our custom Keycloak theme does not use v3[1][2] of the account
console yet, it is not aware that the last name is optional, so
unfortunately the user cannot change "personal info" in the account
console without also specifying the last name. This only affects the
account console, the initial user configuration can be done without
specifying a last name.

[1] 238889fb36/lib/src/main/resources/theme/archlinux/account/theme.properties (L1)
[2] https://www.keycloak.org/2023/04/keycloak-2110-released#_experimental_account_console_version_3
2023-12-10 02:17:11 +01:00
Kristian Klausen
140b9acd07
tf-stage2: Add an arch specific question for signing up to reduce spam
Ref #518
2023-06-17 01:46:52 +02:00
Sven-Hendrik Haase
ced598b176
Add hCaptcha to Keycloak registration forms 2023-06-16 00:01:50 +02:00
Leonidas Spyropoulos
44d040a5b5
Revert "keycloak: temporarily disable keycloak-metrics-spi"
This reverts commit 903129d4e84108c92c01e0cd195d8cb7ff60ab3c

With the release of keycloak-metrics-spi 3.0.0 they added support
for Keycloak > 21.x [1]

[1]: https://github.com/aerogear/keycloak-metrics-spi/pull/157

Resolve: #499

Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org>
2023-04-08 15:24:01 +03:00
Levente Polyak
86d282320f
terraform: update tf-stage2 lock file
This syncs the lock file with the latest change where we switched the
provider for uptimerobot
2023-03-31 22:58:25 +02:00
Levente Polyak
d7734b22d1
terraform: update stage2 provider version declaration
In commit d31f8404c208c35abde2a3a801065b06844a058d we changed the
terraform provider for uptimerobot. Reflect this change in the terraform
lock file and provider version declaration.
2023-03-31 22:51:09 +02:00
Levente Polyak
b956572cfc
terraform: fix package maintainer team groups
Previously we have declared explicit resources for the roles under the
root. This lead to the desired groups getting created twice, once via
toSet of the package maintainer team and once per resource under the
root.

Furthermore remove the package maintainer roles, currently we do not
need any roles to define permissions. We can simply use the groups to
easily assign users into. Those group assignments can be queries for
example by gluebuddy to act upon or queried by a saml client.

Fixes 941563f2f35fcb2ba70559088fa0cc2f5d37ff71
2023-03-31 22:42:14 +02:00
Leonidas Spyropoulos
941563f2f3
terraform: add junior packager groups and roles for core/extra
Signed-off-by: Leonidas Spyropoulos <artafinde@gmail.com>
2023-03-27 18:47:21 +02:00
Kristian Klausen
1507dd48f9
tf-state2: Uppercase required action "Terms and Conditions"[1]
[1] https://github.com/keycloak/keycloak/pull/15746

Fix #501
2023-03-26 15:38:44 +02:00
Leonidas Spyropoulos
d31f8404c2
terraform: uptimerobot remove the alert_contact
https://blog.uptimerobot.com/december-2022-we-are-introducing-sub-users-and-new-plans/

Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org>
2023-03-23 16:41:17 +00:00
Evangelos Foutras
eec60d95d7
tf-stage2: fix formatting error from previous commit 2023-03-12 20:51:40 +02:00
Evangelos Foutras
903129d4e8
keycloak: temporarily disable keycloak-metrics-spi
It's incompatible with Keycloak 21.

Re-enabling of metrics is tracked in #499.

[1] https://github.com/aerogear/keycloak-metrics-spi/issues/155
2023-03-12 20:48:01 +02:00
Leonidas Spyropoulos
591431b707
keycloak: use email templates from archlinux-theme
Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org>
2022-11-15 19:15:09 +00:00
Evangelos Foutras
228419b83e
tf-stage2: alphabetically sort uptimerobot monitors 2022-11-14 22:21:11 +02:00
Kristian Klausen
d93baf67ea
tf-stage2: Monitor accounts with UptimeRobot
Fix #475
2022-11-13 19:21:27 +01:00
Evangelos Foutras
ed19221404
keycloak: remove /auth from all Keycloak endpoints
From [1]: "By default, the new Quarkus distribution removes /auth from
           the context-path."

[1] https://www.keycloak.org/migration/migrating-to-quarkus
2022-11-12 17:33:36 +02:00
Jan Alexander Steffens (heftig)
a7cc74f489
matrix: Enable backchannel logouts from keycloak to synapse 2022-11-12 17:32:33 +02:00
Evangelos Foutras
cd29b68d72
tf-stage2: update keycloak provider to 4.0.1
Set the base_path provider attribute to "/auth" until we move the /auth
endpoint to be served from the root of https://accounts.archlinux.org/.
2022-10-29 16:01:43 +03:00
Kristian Klausen
c56fbb55e0
tf/keycloak: Add openid client for buildbot
The buildbot POC wants to use Keycloak for user authentication. The
client is public, because it doesn't make sense to have a client secret,
which can't be kept under wrap anyway (it would need to be shipped with
the CLI[1]).

[1] https://gitlab.archlinux.org/foxboron/buildctl
2022-09-18 11:55:11 +02:00
Evangelos Foutras
55f20a14e1
tf/keycloak: add "Configure OTP" to default actions
When signing into GitLab, opting to create a new keycloak account
results in being able to sign into GitLab without setting up OTP.

Since any subsequent login will require configuring OTP, it seems
well advised to prompt for it as part of the registration process.
2022-07-24 20:48:38 +03:00
Evangelos Foutras
2b9e29ca2e
tf-stage2: update keycloak provider to 3.8.1
OpenID clients:
- 'use_refresh_tokens' set to false to preserve the values on live
- 'backchannel_logout_session_required' implicitly changed to true
  for the 'grafana_openid_client' and 'openid_gitlab' clients

SAML client (GitLab):
- 'front_channel_logout' set to false to preserve the live setting
2022-05-10 14:44:13 +03:00
Evangelos Foutras
9f738eb95f
tf/keycloak: make "terraform fmt --check" happy 2022-04-05 10:54:11 +03:00
Jelle van der Waa
1a4a742ee4
Prepare Security Tracker SSO configuration
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
2022-04-05 02:15:10 +02:00
Evangelos Foutras
f8b9927cc3
tf/keycloak: change saml_gitlab's name to GitLab 2022-03-25 13:29:10 +02:00
Kristian Klausen
21836b0390 tf/keycloak: Create staff group for "Project Maintainers"
We are onboarding "Project Maintainers" now[1].

[1] https://lists.archlinux.org/private/staff/2022-February/000881.html
2022-02-23 20:40:01 +00:00
Jelle van der Waa
1160eb68e4
Add gluebuddy client
The gluebuddy client is required for gluebuddy to retrieve users and
groups membership without being able to change other keycloak data. The
realm-management roles cannot be assigned yet via keycloak as it does
not know about the roles and realm-management client.
2022-01-21 10:30:05 +01:00
Jakub Klinkovský
b75f2a5604 Create a group for Wiki Maintainers in Keycloak 2021-10-29 21:38:57 +00:00
Sven-Hendrik Haase
729fd21542 keycloak: Enable account registation (fixes 39) 2021-09-04 15:16:15 +02:00
Ira ㋡
249ae2a728 Make terms and conditions required by default via terraform provider 2021-09-04 13:01:55 +02:00
Evangelos Foutras
faba3a3d7c
misc/get_key.py: load vault file without chdir'ing
Now that misc/get_key.py checks if the vault file passed to it exists,
we cannot pass paths only resolvable from the root directory. Instead,
use paths that make sense relative to the current directory and avoid
calling chdir when loading the vault file.

Fixes: 7754214604ba ("Rewrite get_key.py to use click instead of typer")
2021-07-07 15:18:41 +03:00
Thorben Günther
e7aa7f09a7 grafana: Use builtin functionality to restrict access
This reverts commit 649568e7 ("Restrict Grafana access to Arch Linux
Staff group on Keycloak (fixes #151)").
2021-07-06 22:53:04 +02:00
Jelle van der Waa
f741bc6a20
Terraform uptimerobot monitors
Add our uptimerobot to terraform so it's managed in code and we can
easily extend it. This currently only adds our to be monitored sites and
leaves the status page as is now.

Deleting resources on uptimerobot will cause terraform unable to run
see: https://github.com/louy/terraform-provider-uptimerobot/issues/82

References: #209
2021-05-18 22:51:16 +02:00
Jan Alexander Steffens (heftig)
745795594f
keycloak: Enable add_to_id_token for matrix role mapper
Synapse only inspects the userinfo.
2021-04-15 15:02:53 +02:00
Jan Alexander Steffens (heftig)
3e475457c5 matrix: Integrate with Keycloak
Closes https://gitlab.archlinux.org/archlinux/infrastructure/-/issues/94
2021-04-15 12:37:34 +00:00
Jelle van der Waa
a434870b9f
Restrict Grafana access to DevOps
As our grafana now contains Loki logs, we don't want non devops to view
logs which potentially contain sensitive data. As Grafana does not have
a system to easily restrict data sources to roles we use Keycloak.
2021-04-08 21:01:22 +02:00
Sven-Hendrik Haase
75146bcc8b
Fix mode of .terraform.lock.hcl 2021-03-19 13:53:50 +01:00
Jelle van der Waa
3124cfd933
Add hedgedoc as new service
This adds a collaborative markdown editor as newly offered service which
is available via login for all Arch Linux Staff with an option to allow
anonymous edits by users (not default). Users are managed via keycloak
and require the Staff role to be allowed in, non staff keycloak users
currently will receive an internal server error due to an upstream
issue.
2021-02-01 21:59:30 +01:00
Kristian Klausen
56865f8c9e Migrate all services to use implicit TLS for SMTP Submission 2020-12-24 23:43:57 +00:00
Sven-Hendrik Haase
649568e703 Restrict Grafana access to Arch Linux Staff group on Keycloak (fixes #151) 2020-12-11 19:59:57 +00:00
Sven-Hendrik Haase
e049e89e9a
Upgrade to Terraform 0.14
This process didn't need any source changes but it added the new Terraform lockfiles.
2020-12-10 21:53:50 +01:00
Frederik Schwan
80c22539b9
introduce terraform fmt to the CI to improve readability 2020-10-22 13:45:19 +02:00
Sven-Hendrik Haase
1f9c854d46
Import config from Keycloak
This is now possible because of terraform-provider-keycloak 2.0.0 :D
2020-09-23 01:34:02 +02:00
Kristian Klausen
2fd1c89a04 keycloak: Bump provider version 2020-09-22 22:30:54 +00:00