mirror of
https://github.com/bitwarden/server.git
synced 2024-11-21 12:05:42 +01:00
[PM-6630][INT-188] krb5 to dockerfile and kinit entrypoint (#3841)
This commit is contained in:
parent
8a515a3f2b
commit
ab8c3af685
@ -6,6 +6,7 @@ RUN apt-get update \
|
|||||||
&& apt-get install -y --no-install-recommends \
|
&& apt-get install -y --no-install-recommends \
|
||||||
gosu \
|
gosu \
|
||||||
curl \
|
curl \
|
||||||
|
krb5-user \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
ENV ASPNETCORE_URLS http://+:5000
|
ENV ASPNETCORE_URLS http://+:5000
|
||||||
|
@ -40,4 +40,10 @@ if [[ $globalSettings__selfHosted == "true" ]]; then
|
|||||||
&& update-ca-certificates
|
&& update-ca-certificates
|
||||||
fi
|
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
|
exec gosu $USERNAME:$GROUPNAME dotnet /app/Scim.dll
|
||||||
|
@ -6,6 +6,7 @@ RUN apt-get update \
|
|||||||
&& apt-get install -y --no-install-recommends \
|
&& apt-get install -y --no-install-recommends \
|
||||||
gosu \
|
gosu \
|
||||||
curl \
|
curl \
|
||||||
|
krb5-user \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
ENV ASPNETCORE_URLS http://+:5000
|
ENV ASPNETCORE_URLS http://+:5000
|
||||||
|
@ -46,4 +46,10 @@ if [[ $globalSettings__selfHosted == "true" ]]; then
|
|||||||
&& update-ca-certificates
|
&& update-ca-certificates
|
||||||
fi
|
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
|
exec gosu $USERNAME:$GROUPNAME dotnet /app/Sso.dll
|
||||||
|
@ -6,6 +6,7 @@ RUN apt-get update \
|
|||||||
&& apt-get install -y --no-install-recommends \
|
&& apt-get install -y --no-install-recommends \
|
||||||
gosu \
|
gosu \
|
||||||
curl \
|
curl \
|
||||||
|
krb5-user \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
ENV ASPNETCORE_URLS http://+:5000
|
ENV ASPNETCORE_URLS http://+:5000
|
||||||
|
@ -40,4 +40,10 @@ if [[ $globalSettings__selfHosted == "true" ]]; then
|
|||||||
&& update-ca-certificates
|
&& update-ca-certificates
|
||||||
fi
|
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
|
exec gosu $USERNAME:$GROUPNAME dotnet /app/Admin.dll
|
||||||
|
@ -6,6 +6,7 @@ RUN apt-get update \
|
|||||||
&& apt-get install -y --no-install-recommends \
|
&& apt-get install -y --no-install-recommends \
|
||||||
gosu \
|
gosu \
|
||||||
curl \
|
curl \
|
||||||
|
krb5-user \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
ENV ASPNETCORE_URLS http://+:5000
|
ENV ASPNETCORE_URLS http://+:5000
|
||||||
|
@ -40,4 +40,10 @@ if [[ $globalSettings__selfHosted == "true" ]]; then
|
|||||||
&& update-ca-certificates
|
&& update-ca-certificates
|
||||||
fi
|
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
|
exec gosu $USERNAME:$GROUPNAME dotnet /app/Api.dll
|
||||||
|
@ -6,6 +6,7 @@ RUN apt-get update \
|
|||||||
&& apt-get install -y --no-install-recommends \
|
&& apt-get install -y --no-install-recommends \
|
||||||
gosu \
|
gosu \
|
||||||
curl \
|
curl \
|
||||||
|
krb5-user \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
ENV ASPNETCORE_URLS http://+:5000
|
ENV ASPNETCORE_URLS http://+:5000
|
||||||
|
@ -40,4 +40,10 @@ if [[ $globalSettings__selfHosted == "true" ]]; then
|
|||||||
&& update-ca-certificates
|
&& update-ca-certificates
|
||||||
fi
|
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
|
exec gosu $USERNAME:$GROUPNAME dotnet /app/Events.dll
|
||||||
|
@ -6,6 +6,7 @@ RUN apt-get update \
|
|||||||
&& apt-get install -y --no-install-recommends \
|
&& apt-get install -y --no-install-recommends \
|
||||||
gosu \
|
gosu \
|
||||||
curl \
|
curl \
|
||||||
|
krb5-user \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
ENV ASPNETCORE_URLS http://+:5000
|
ENV ASPNETCORE_URLS http://+:5000
|
||||||
|
@ -46,4 +46,10 @@ if [[ $globalSettings__selfHosted == "true" ]]; then
|
|||||||
&& update-ca-certificates
|
&& update-ca-certificates
|
||||||
fi
|
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
|
exec gosu $USERNAME:$GROUPNAME dotnet /app/Identity.dll
|
||||||
|
Loading…
Reference in New Issue
Block a user