8000 1.5 support · Cleafy/elasticsearch-http-basic@e5e6971 · GitHub
[go: up one dir, main page]

Skip to content

Commit e5e6971

Browse files
author
emiguez
committed
1.5 support
- add travis configuration matrix for ES versions - add script to run travis with ES version variable - add travis cache - update pom to depend on elasticsearch-parent project, which spimplifies plugin mantenance
1 parent 96eed76 commit e5e6971

File tree

8 files changed

+135
-103
lines changed

8 files changed

+135
-103
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ deploy.sh
1212
.project
1313
.settings/
1414
data/
15+
/.local-execution-hints.log
16+
/.local-*-execution-hints.log

.travis.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,10 @@
1+
sudo: false
12
language: java
3+
script: ./script/ci/run_build.sh
4+
env:
5+
- ES_VERSION=1.5.0
6+
- ES_VERSION=1.5.1
7+
- ES_VERSION=1.5.2
8+
cache:
9+
directories:
10+
- $HOME/.m2

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![Build Status](https://travis-ci.org/Asquera/elasticsearch-http-basic.svg?branch=1.4)](https://travis-ci.org/Asquera/elasticsearch-http-basic)
1+
[![Build Status](https://travis-ci.org/emig/elasticsearch-http-basic.svg?branch=1.5)](https://travis-ci.org/emig/elasticsearch-http-basic)
22

33
**IMPORTANT NOTICE**: versions 1.0.4 is *insecure and should not be used*.
44
They have a bug that allows an attacker to get ip authentication by setting

pom.xml

Lines changed: 89 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -1,110 +1,98 @@
1-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3-
<modelVersion>4.0.0</modelVersion>
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
exmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
<groupId>com.asquera.elasticsearch</groupId>
7+
<artifactId>elasticsearch-http-basic</artifactId>
8+
<version>1.5.0</version>
9+
<packaging>jar</packaging>
10+
<name>Elasticsearch Http Basic plugin</name>
11+
<description>Adds HTTP Basic authentication (BA) to your Elasticsearch cluster</description>
12+
<url>https://github.com/Asquera/elasticsearch-http-basic/</url>
13+
<inceptionYear>2011</inceptionYear>
414

5-
<groupId>com.asquera.elasticsearch</groupId>
6-
<artifactId>elasticsearch-http-basic</artifactId>
7-
<version>1.4.1-pre</version>
8-
<packaging>jar</packaging>
15+
<parent>
16+
<groupId>org.elasticsearch</groupId>
17+
<artifactId>elasticsearch-parent</artifactId>
18+
<version>1.5.0</version>
19+
</parent>
920

10-
<name>Basic Authentication Plugin</name>
11-
<url>http://maven.apache.org</url>
21+
<properties>
22+
<tests.jvms>1</tests.jvms>
23+
<es.logger.level>INFO</es.logger.level>
24+
</properties>
1225

13-
<properties>
14-
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
15-
<elasticsearch.version>1.4.0</elasticsearch.version>
16-
<lucene.version>4.10.2</lucene.version>
17-
<lucene.maven.version>4.10.2</lucene.maven.version>
18-
</properties>
26+
<dependencies>
27+
<dependency>
28+
<groupId>org.apache.httpcomponents</groupId>
29+
<artifactId>httpclient</artifactId>
30+
<version>4.3.5</version>
31+
<scope>test</scope>
32+
</dependency>
33+
<dependency>
34+
<groupId>org.hamcrest</groupId>
35+
<artifactId>hamcrest-all</artifactId>
36+
</dependency>
37+
<dependency>
38+
<groupId>com.carrotsearch.randomizedtesting</groupId>
39+
<artifactId>randomizedtesting-runner</artifactId>
40+
</dependency>
41+
<dependency>
42+
<groupId>org.apache.lucene</groupId>
43+
<artifactId>lucene-test-framework</artifactId>
44+
</dependency>
1945

20-
<dependencies>
46+
<dependency>
47+
<groupId>org.elasticsearch</groupId>
48+
<artifactId>elasticsearch</artifactId>
49+
<scope>provided</scope>
50+
</dependency>
2151

22-
<dependency>
23-
<groupId>org.apache.lucene</groupId>
24-
<artifactId>lucene-test-framework</artifactId>
25-
<version>${lucene.maven.version}</version>
26-
<scope>test</scope>
27-
</dependency>
52+
<dependency>
53+
<groupId>org.elasticsearch</groupId>
54+
<artifactId>elasticsearch</artifactId>
55+
<type>test-jar</type>
56+
</dependency>
2857

29-
<dependency>
30-
<groupId>org.apache.httpcomponents</groupId>
31-
<artifactId>httpclient</artifactId>
32-
<version>4.3.5</version>
33-
<scope>test</scope>
34-
</dependency>
58+
</dependencies>
3559

36-
<dependency>
37-
<groupId>com.carrotsearch.randomizedtesting</groupId>
38-
<artifactId>randomizedtesting-runner</artifactId>
39-
<version>2.1.10</version>
40-
<scope>test</scope>
41-
</dependency>
42-
<dependency>
43-
<groupId>org.elasticsearch</groupId>
44-
<artifactId>elasticsearch</artifactId>
45-
<version>${elasticsearch.version}</version>
46-
</dependency>
60+
<build>
61+
<resources>
62+
<resource>
63+
<directory>src/main/resources</directory>
64+
<filtering>true</filtering>
65+
</resource>
66+
</resources>
67+
<plugins>
68+
<plugin>
69+
<groupId>org.apache.maven.plugins</groupId>
70+
<artifactId>maven-compiler-plugin</artifactId>
71+
</plugin>
72+
<plugin>
73+
<groupId>com.carrotsearch.randomizedtesting</groupId>
74+
<artifactId>junit4-maven-plugin</artifactId>
75+
</plugin>
76+
<plugin>
77+
<groupId>org.apache.maven.plugins</groupId>
78+
<artifactId>maven-surefire-plugin</artifactId>
79+
</plugin>
80+
<plugin>
81+
<groupId>org.apache.maven.plugins</groupId>
82+
<artifactId>maven-source-plugin</artifactId>
83+
</plugin>
84+
<plugin>
85+
<groupId>org.apache.maven.plugins</groupId>
86+
<artifactId>maven-assembly-plugin</artifactId>
87+
</plugin>
88+
</plugins>
89+
</build>
4790

48-
<dependency>
49-
<groupId>org.elasticsearch</groupId>
50-
<artifactId>elasticsearch</artifactId>
51-
<version>${elasticsearch.version}</version>
52-
<type>test-jar</type>
53-
<scope>test</scope>
54-
</dependency>
55-
56-
<dependency>
57-
<groupId>org.hamcrest</groupId>
58-
<artifactId>hamcrest-all</artifactId>
59-
<version>1.3</version>
60-
<scope>test</scope>
61-
</dependency>
62-
63-
<dependency>
64-
<groupId>junit</groupId>
65-
<artifactId>junit</artifactId>
66-
<version>4.10</version>
67-
<scope>test</scope>
68-
</dependency>
69-
70-
</dependencies>
71-
<build>
72-
<!-- Create a zip file according to elasticsearch naming scheme -->
73-
<plugins>
74-
<plugin>
75-
<groupId>org.apache.maven.plugins</groupId>
76-
<artifactId>maven-antrun-plugin</artifactId>
77-
<version>1.6</version>
78-
<executions>
79-
<execution>
80-
<id>zip</id>
81-
<phase>package</phase>
82-
<configuration>
83-
<target>
84-
<zip basedir="${project.build.directory}"
85-
includes="${project.build.finalName}.jar"
86-
destfile="${project.build.directory}/${project.artifactId}-${project.version}.zip" />
87-
</target>
88-
</configuration>
89-
<goals>
90-
<goal>run</goal>
91-
</goals>
92-
</execution>
93-
</executions>
94-
</plugin>
95-
</plugins>
96-
97-
<pluginManagement>
98-
<plugins>
99-
<plugin>
100-
<groupId>org.apache.maven.plugins</groupId>
101-
<artifactId>maven-compiler-plugin</artifactId>
102-
<configuration>
103-
<source>1.7</source>
104-
<target>1.7</target>
105-
</configuration>
106-
</plugin>
107-
</plugins>
108-
</pluginManagement>
109-
</build>
91+
<repositories>
92+
<repository>
93+
<id>oss-snapshots</id>
94+
<name>Sonatype OSS Snapshots</name>
95+
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
96+
</repository>
97+
</repositories>
11098
</project>

script/ci/run_build.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#! /usr/bin/env sh
2+
mvn -Delasticsearch.version=$ES_VERSION -Dtests.security.manager=false test

src/main/assemblies/plugin.xml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0"?>
2+
<assembly>
3+
<id>plugin</id>
4+
<formats>
5+
<format>zip</format>
6+
</formats>
7+
<includeBaseDirectory>false</includeBaseDirectory>
8+
<dependencySets>
9+
<dependencySet>
10+
<outputDirectory>/</outputDirectory>
11+
<useProjectArtifact>true</useProjectArtifact>
12+
<useTransitiveFiltering>true</useTransitiveFiltering>
13+
<excludes>
14+
<exclude>org.elasticsearch:elasticsearch</exclude>
15+
</excludes>
16+
</dependencySet>
17+
<dependencySet>
18+
<outputDirectory>/</outputDirectory>
19+
<useProjectArtifact>true</useProjectArtifact>
20+
<useTransitiveFiltering>true</useTransitiveFiltering>
21+
<includes>
22+
<include>com.asquera.elasticsearch:elasticsearch-http-basic</include>
23+
</includes>
24+
</dependencySet>
25+
</dependencySets>
26+
</assembly>

src/test/java/com/asquera/elasticsearch/plugins/http/auth/integration/HttpBasicServerPluginIntegrationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
* @author Ernesto Miguez (ernesto.miguez@asquera.de)
2020
*/
2121

22-
public abstract class HttpBasicServerPluginIntegrationTest extends
22+
public class HttpBasicServerPluginIntegrationTest extends
2323
ElasticsearchIntegrationTest {
2424

2525
protected final String localhost = "127.0.0.1";

src/test/resources/log4j.properties

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
log4j.rootLogger=INFO, out
2+
3+
log4j.appender.out=org.apache.log4j.ConsoleAppender
4+
log4j.appender.out.layout=org.apache.log4j.PatternLayout
5+
log4j.appender.out.layout.conversionPattern=[%d{ISO8601}][%-5p][%-25c] %m%n

0 commit comments

Comments
 (0)
0