Skip to content

Commit b72332c

Browse files
committed
Set config in elasticsearch.yml
1 parent c423684 commit b72332c

File tree

4 files changed

+16
-14
lines changed

4 files changed

+16
-14
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ RUN gradle assemble
2424

2525
FROM elasticsearch:5.5.2
2626

27-
COPY log4j2.properties /config/log4j2.properties
27+
COPY elasticsearch.yml /usr/share/elasticsearch/config/elasticsearch.yml
2828
COPY --from=builder /src/build/distributions/tinyauth-0.0.1-SNAPSHOT.zip /
2929
RUN elasticsearch-plugin install file:/tinyauth-0.0.1-SNAPSHOT.zip

elasticsearch.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
http.host: 0.0.0.0
2+
3+
# Uncomment the following lines for a production cluster deployment
4+
#transport.host: 0.0.0.0
5+
#discovery.zen.minimum_master_nodes: 1
6+
#
7+
8+
tinyauth.endpoint: https://tinyauth:5000/
9+
tinyauth.access_key_id: gatekeeper
10+
tinyauth.secret_access_key: keymaster

log4j2.properties

Lines changed: 0 additions & 13 deletions
This file was deleted.

src/main/java/io/tinyauth/elasticsearch/TinyauthActionFilter.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,11 @@ public <Request extends ActionRequest, Response extends ActionResponse> void app
115115
Request request,
116116
ActionListener<Response> listener,
117117
ActionFilterChain<Request, Response> chain) {
118+
if (action.startsWith("internal")) {
119+
logger.debug("No authentication required for internal requests");
120+
return;
121+
}
122+
118123
if (endpoint == null || access_key_id == null || secret_access_key == null) {
119124
logger.error("Authentication endpoint for tinyauth not configured");
120125
listener.onFailure(new ConnectionError("Authentication not attempted"));

0 commit comments

Comments
 (0)