-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add optional HTTP Basic Authentication
- Loading branch information
Paul Bowsher
committed
Oct 8, 2014
1 parent
16024f8
commit 7f4e1a3
Showing
4 changed files
with
46 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ FROM thefactory/java | |
MAINTAINER Mike Babineau [email protected] | ||
|
||
# Get ZK | ||
ADD http://www.apache.org/dist/zookeeper/zookeeper-3.4.6/zookeeper-3.4.6.tar.gz /tmp/zookeeper-3.4.6.tar.gz | ||
RUN curl -o /tmp/zookeeper-3.4.6.tar.gz http://www.apache.org/dist/zookeeper/zookeeper-3.4.6/zookeeper-3.4.6.tar.gz | ||
RUN tar -xzf /tmp/zookeeper-3.4.6.tar.gz -C /opt && rm /tmp/zookeeper-3.4.6.tar.gz | ||
RUN ln -s /opt/zookeeper-3.4.6 /opt/zookeeper | ||
RUN mkdir /opt/zookeeper/transactions /opt/zookeeper/snapshots | ||
|
@@ -21,8 +21,11 @@ RUN ln -s /opt/exhibitor/target/exhibitor-1.0-jar-with-dependencies.jar /opt/exh | |
# Add the wrapper script to setup configs and exec exhibitor | ||
ADD include/wrapper.sh /opt/exhibitor/wrapper.sh | ||
|
||
# Add the optional web.xml for authentication | ||
ADD include/web.xml /opt/exhibitor/web.xml | ||
|
||
USER root | ||
WORKDIR /opt/exhibitor | ||
EXPOSE 2181 2888 3888 8181 | ||
|
||
ENTRYPOINT ["bash", "-ex", "/opt/exhibitor/wrapper.sh"] | ||
ENTRYPOINT ["bash", "-ex", "/opt/exhibitor/wrapper.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<web-app xmlns="http://java.sun.com/xml/ns/javaee" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee | ||
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" | ||
version="2.5"> | ||
<security-constraint> | ||
<web-resource-collection> | ||
<web-resource-name>A Protected Page</web-resource-name> | ||
<url-pattern>/*</url-pattern> | ||
</web-resource-collection> | ||
<auth-constraint> | ||
<role-name>zk</role-name> | ||
</auth-constraint> | ||
</security-constraint> | ||
|
||
<security-constraint> | ||
<web-resource-collection> | ||
<web-resource-name>A Protected Page</web-resource-name> | ||
<url-pattern>/exhibitor/v1/cluster/state</url-pattern> | ||
</web-resource-collection> | ||
</security-constraint> | ||
|
||
<security-role> | ||
<role-name>zk</role-name> | ||
</security-role> | ||
|
||
<login-config> | ||
<auth-method>BASIC</auth-method> | ||
<realm-name>Zookeeper</realm-name> | ||
</login-config> | ||
</web-app> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters