aboutsummaryrefslogtreecommitdiff
path: root/scripts/hostclass/bitwarden_server
diff options
context:
space:
mode:
authorCullum Smith <cullum@sacredheartsc.com>2024-10-24 06:43:08 -0400
committerCullum Smith <cullum@sacredheartsc.com>2024-10-24 06:43:08 -0400
commite2fc0433de38c322ce46ad250bc0f0f03e7710c8 (patch)
treef04f079ed745f0c0350af93adf6491bbfec1cd13 /scripts/hostclass/bitwarden_server
parent393adb9a95913e1658afe3243e4a0498dced9090 (diff)
downloadinfrastructure-e2fc0433de38c322ce46ad250bc0f0f03e7710c8.tar.gz
add icinga
Diffstat (limited to 'scripts/hostclass/bitwarden_server')
-rw-r--r--scripts/hostclass/bitwarden_server7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/hostclass/bitwarden_server b/scripts/hostclass/bitwarden_server
index 1f025fe..ff67c3e 100644
--- a/scripts/hostclass/bitwarden_server
+++ b/scripts/hostclass/bitwarden_server
@@ -5,6 +5,7 @@
: ${vaultwarden_dbhost:="$postgres_host"}
: ${vaultwarden_fqdn:="$fqdn"}
+vaultwarden_dn="uid=${vaultwarden_username},${robots_basedn}"
vaultwarden_local_username=$nginx_user
vaultwarden_https_cert="${nginx_conf_dir}/vaultwarden.crt"
vaultwarden_https_key="${nginx_conf_dir}/vaultwarden.key"
@@ -17,7 +18,11 @@ pkg install -y \
nginx
# Create vaultwarden principal and keytab.
-add_principal -nokey -x "containerdn=${robots_basedn}" "$vaultwarden_username"
+ldap_add "$vaultwarden_dn" <<EOF
+objectClass: account
+uid: ${vaultwarden_username}
+EOF
+add_principal -nokey -x "dn=${vaultwarden_dn}" "$vaultwarden_username"
ktadd -k "$vaultwarden_client_keytab" "$vaultwarden_username"
chgrp "$vaultwarden_local_username" "$vaultwarden_client_keytab"