Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ public static class EnterpriseTestConfiguration
{
public const string Realm = "LINUX.CONTOSO.COM";
public const string NegotiateAuthWebServer = "http://apacheweb.linux.contoso.com";
public const string AlternativeService = "http://altweb.linux.contoso.com:8080";

public static bool Enabled => !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("DOTNET_RUNTIME_ENTERPRISETESTS_ENABLED"));
public static NetworkCredential ValidNetworkCredentials => new NetworkCredential("user1", "password");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
FROM httpd:2.4

COPY ./common/krb5.conf /etc/
COPY ./apacheweb/httpd.conf /usr/local/apache2/conf/httpd.conf

WORKDIR /setup
COPY ./apacheweb/*.sh ./
RUN chmod +x *.sh
RUN chmod +x *.sh ; \
mkdir -p /usr/local/apache2/altdocs ; \
cp /usr/local/apache2/htdocs/index.html /usr/local/apache2/altdocs

# Prevents dialog prompting when installing packages
ARG DEBIAN_FRONTEND=noninteractive
Expand All @@ -16,10 +19,7 @@ RUN apt-get update && \
# Link apache2 kerb module to the right place since the apt-get install puts it in the wrong place for this docker image
RUN ln -s /usr/lib/apache2/modules/mod_auth_kerb.so /usr/local/apache2/modules

# Modify httpd.conf to add Negotiate auth as required
RUN echo "LoadModule auth_kerb_module modules/mod_auth_kerb.so" >> /usr/local/apache2/conf/httpd.conf && \
sed -i 's/Require all granted/AuthType Kerberos\nAuthName "Kerberos Login"\nKrbAuthRealm LINUX\.CONTOSO\.COM\nKrb5Keytab \/etc\/krb5\.keytab\nKrbMethodK5Passwd off\nRequire valid-user/' /usr/local/apache2/conf/httpd.conf

EXPOSE 80
EXPOSE 80/tcp
EXPOSE 8080/tcp

ENTRYPOINT ["/bin/sh", "/setup/run.sh"]
Loading