Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7124468
D5284.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D5284.diff
View Options
diff --git a/data/common/common.yaml b/data/common/common.yaml
--- a/data/common/common.yaml
+++ b/data/common/common.yaml
@@ -1874,6 +1874,14 @@
swh::deploy::deposit::db::dbname: softwareheritage-deposit
swh::deploy::deposit::db::dbuser: swhstorage
+swh::config::keycloak::realm_name: SoftwareHeritage
+swh::deploy::deposit::config::keycloak:
+ server_url: "https://%{hiera('keycloak::vhost::name')}/auth/"
+ realm_name: "%{alias('swh::config::keycloak::realm_name')}"
+
+swh::deploy::deposit::config::authentication:
+ authentication_provider: basic
+
# swh::deploy::deposit::db::password: in private data
# swh::deploy::deposit::runtime_secret_key in private data
swh::deploy::deposit::config:
diff --git a/data/deployments/staging/common.yaml b/data/deployments/staging/common.yaml
--- a/data/deployments/staging/common.yaml
+++ b/data/deployments/staging/common.yaml
@@ -314,3 +314,8 @@
swh::deploy::vault::e2e::storage: "%{alias('swh::remote_service::storage0::url')}"
swh::deploy::vault::e2e::webapp: "https://webapp.staging.swh.network"
+
+swh::config::keycloak::realm_name: SoftwareHeritageStaging
+swh::deploy::deposit::config::authentication:
+ authentication_provider: keycloak
+ keycloak: "%{alias('swh::deploy::deposit::config::keycloak')}"
diff --git a/site-modules/profile/manifests/swh/deploy/deposit.pp b/site-modules/profile/manifests/swh/deploy/deposit.pp
--- a/site-modules/profile/manifests/swh/deploy/deposit.pp
+++ b/site-modules/profile/manifests/swh/deploy/deposit.pp
@@ -23,7 +23,10 @@
$cert_name = lookup('swh::deploy::deposit::vhost::letsencrypt_cert')
$vhosts = lookup('letsencrypt::certificates')[$cert_name]['domains']
- $full_conf = $conf_hiera + {allowed_hosts => $vhosts}
+ # authentication provider + optional keycloak config
+ $conf_authent = lookup('swh::deploy::deposit::config::authentication')
+
+ $full_conf = $conf_hiera + $conf_authent + {allowed_hosts => $vhosts}
if $swh_hostname['fqdn'] in $vhosts {
$vhost_name = $swh_hostname['fqdn']
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Dec 21 2024, 11:47 AM (11 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3221006
Attached To
D5284: deposit: Configure deposit to use keycloak in staging
Event Timeline
Log In to Comment