diff --git a/bitwarden_license/src/Scim/Dockerfile b/bitwarden_license/src/Scim/Dockerfile index ae9e693c2..6970dfa7b 100644 --- a/bitwarden_license/src/Scim/Dockerfile +++ b/bitwarden_license/src/Scim/Dockerfile @@ -6,6 +6,7 @@ RUN apt-get update \ && apt-get install -y --no-install-recommends \ gosu \ curl \ + krb5-user \ && rm -rf /var/lib/apt/lists/* ENV ASPNETCORE_URLS http://+:5000 diff --git a/bitwarden_license/src/Scim/entrypoint.sh b/bitwarden_license/src/Scim/entrypoint.sh index 4d593ef1a..edc3bbe14 100644 --- a/bitwarden_license/src/Scim/entrypoint.sh +++ b/bitwarden_license/src/Scim/entrypoint.sh @@ -40,4 +40,10 @@ if [[ $globalSettings__selfHosted == "true" ]]; then && update-ca-certificates fi +if [[ -f "/etc/bitwarden/kerberos/bitwarden.keytab" && -f "/etc/bitwarden/kerberos/krb5.conf" ]]; then + chown -R $USERNAME:$GROUPNAME /etc/bitwarden/kerberos + cp -f /etc/bitwarden/kerberos/krb5.conf /etc/krb5.conf + gosu $USERNAME:$GROUPNAME kinit $globalSettings__kerberosUser -k -t /etc/bitwarden/kerberos/bitwarden.keytab +fi + exec gosu $USERNAME:$GROUPNAME dotnet /app/Scim.dll diff --git a/bitwarden_license/src/Sso/Dockerfile b/bitwarden_license/src/Sso/Dockerfile index ae9e693c2..6970dfa7b 100644 --- a/bitwarden_license/src/Sso/Dockerfile +++ b/bitwarden_license/src/Sso/Dockerfile @@ -6,6 +6,7 @@ RUN apt-get update \ && apt-get install -y --no-install-recommends \ gosu \ curl \ + krb5-user \ && rm -rf /var/lib/apt/lists/* ENV ASPNETCORE_URLS http://+:5000 diff --git a/bitwarden_license/src/Sso/entrypoint.sh b/bitwarden_license/src/Sso/entrypoint.sh index 3f6a5eee2..2c7bd18b8 100644 --- a/bitwarden_license/src/Sso/entrypoint.sh +++ b/bitwarden_license/src/Sso/entrypoint.sh @@ -46,4 +46,10 @@ if [[ $globalSettings__selfHosted == "true" ]]; then && update-ca-certificates fi +if [[ -f "/etc/bitwarden/kerberos/bitwarden.keytab" && -f "/etc/bitwarden/kerberos/krb5.conf" ]]; then + chown -R $USERNAME:$GROUPNAME /etc/bitwarden/kerberos + cp -f /etc/bitwarden/kerberos/krb5.conf /etc/krb5.conf + gosu $USERNAME:$GROUPNAME kinit $globalSettings__kerberosUser -k -t /etc/bitwarden/kerberos/bitwarden.keytab +fi + exec gosu $USERNAME:$GROUPNAME dotnet /app/Sso.dll diff --git a/src/Admin/Dockerfile b/src/Admin/Dockerfile index 54ecbac0d..79d117681 100644 --- a/src/Admin/Dockerfile +++ b/src/Admin/Dockerfile @@ -6,6 +6,7 @@ RUN apt-get update \ && apt-get install -y --no-install-recommends \ gosu \ curl \ + krb5-user \ && rm -rf /var/lib/apt/lists/* ENV ASPNETCORE_URLS http://+:5000 diff --git a/src/Admin/entrypoint.sh b/src/Admin/entrypoint.sh index 975460bad..2c564b1ce 100644 --- a/src/Admin/entrypoint.sh +++ b/src/Admin/entrypoint.sh @@ -40,4 +40,10 @@ if [[ $globalSettings__selfHosted == "true" ]]; then && update-ca-certificates fi +if [[ -f "/etc/bitwarden/kerberos/bitwarden.keytab" && -f "/etc/bitwarden/kerberos/krb5.conf" ]]; then + chown -R $USERNAME:$GROUPNAME /etc/bitwarden/kerberos + cp -f /etc/bitwarden/kerberos/krb5.conf /etc/krb5.conf + gosu $USERNAME:$GROUPNAME kinit $globalSettings__kerberosUser -k -t /etc/bitwarden/kerberos/bitwarden.keytab +fi + exec gosu $USERNAME:$GROUPNAME dotnet /app/Admin.dll diff --git a/src/Api/Dockerfile b/src/Api/Dockerfile index ae9e693c2..6970dfa7b 100644 --- a/src/Api/Dockerfile +++ b/src/Api/Dockerfile @@ -6,6 +6,7 @@ RUN apt-get update \ && apt-get install -y --no-install-recommends \ gosu \ curl \ + krb5-user \ && rm -rf /var/lib/apt/lists/* ENV ASPNETCORE_URLS http://+:5000 diff --git a/src/Api/entrypoint.sh b/src/Api/entrypoint.sh index 76c46596f..37d117215 100644 --- a/src/Api/entrypoint.sh +++ b/src/Api/entrypoint.sh @@ -40,4 +40,10 @@ if [[ $globalSettings__selfHosted == "true" ]]; then && update-ca-certificates fi +if [[ -f "/etc/bitwarden/kerberos/bitwarden.keytab" && -f "/etc/bitwarden/kerberos/krb5.conf" ]]; then + chown -R $USERNAME:$GROUPNAME /etc/bitwarden/kerberos + cp -f /etc/bitwarden/kerberos/krb5.conf /etc/krb5.conf + gosu $USERNAME:$GROUPNAME kinit $globalSettings__kerberosUser -k -t /etc/bitwarden/kerberos/bitwarden.keytab +fi + exec gosu $USERNAME:$GROUPNAME dotnet /app/Api.dll diff --git a/src/Events/Dockerfile b/src/Events/Dockerfile index ae9e693c2..6970dfa7b 100644 --- a/src/Events/Dockerfile +++ b/src/Events/Dockerfile @@ -6,6 +6,7 @@ RUN apt-get update \ && apt-get install -y --no-install-recommends \ gosu \ curl \ + krb5-user \ && rm -rf /var/lib/apt/lists/* ENV ASPNETCORE_URLS http://+:5000 diff --git a/src/Events/entrypoint.sh b/src/Events/entrypoint.sh index 57cd16c5b..f1bd48e1a 100644 --- a/src/Events/entrypoint.sh +++ b/src/Events/entrypoint.sh @@ -40,4 +40,10 @@ if [[ $globalSettings__selfHosted == "true" ]]; then && update-ca-certificates fi +if [[ -f "/etc/bitwarden/kerberos/bitwarden.keytab" && -f "/etc/bitwarden/kerberos/krb5.conf" ]]; then + chown -R $USERNAME:$GROUPNAME /etc/bitwarden/kerberos + cp -f /etc/bitwarden/kerberos/krb5.conf /etc/krb5.conf + gosu $USERNAME:$GROUPNAME kinit $globalSettings__kerberosUser -k -t /etc/bitwarden/kerberos/bitwarden.keytab +fi + exec gosu $USERNAME:$GROUPNAME dotnet /app/Events.dll diff --git a/src/Identity/Dockerfile b/src/Identity/Dockerfile index d93414a45..050859a49 100644 --- a/src/Identity/Dockerfile +++ b/src/Identity/Dockerfile @@ -6,6 +6,7 @@ RUN apt-get update \ && apt-get install -y --no-install-recommends \ gosu \ curl \ + krb5-user \ && rm -rf /var/lib/apt/lists/* ENV ASPNETCORE_URLS http://+:5000 diff --git a/src/Identity/entrypoint.sh b/src/Identity/entrypoint.sh index eb96642d3..cf59bee47 100644 --- a/src/Identity/entrypoint.sh +++ b/src/Identity/entrypoint.sh @@ -46,4 +46,10 @@ if [[ $globalSettings__selfHosted == "true" ]]; then && update-ca-certificates fi +if [[ -f "/etc/bitwarden/kerberos/bitwarden.keytab" && -f "/etc/bitwarden/kerberos/krb5.conf" ]]; then + chown -R $USERNAME:$GROUPNAME /etc/bitwarden/kerberos + cp -f /etc/bitwarden/kerberos/krb5.conf /etc/krb5.conf + gosu $USERNAME:$GROUPNAME kinit $globalSettings__kerberosUser -k -t /etc/bitwarden/kerberos/bitwarden.keytab +fi + exec gosu $USERNAME:$GROUPNAME dotnet /app/Identity.dll