-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added secure restclient, and other gradlew settings
- Loading branch information
1 parent
3f11d53
commit ab091fc
Showing
10 changed files
with
918 additions
and
55 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,17 +1,61 @@ | ||
## My Project | ||
# Open Distro for Elasticsearch Common-Utils | ||
|
||
TODO: Fill this README out! | ||
Open Distro for Elasticsearch Common-Utils is focused on providing reusable Java components for Elasticsearch plugins. | ||
|
||
Be sure to: | ||
This library is composed of following parts: | ||
1. SecureRestClientBuilder - provides methods to create secure low-level and high-level REST client. This is | ||
useful to make secure REST calls to Elasticsearch or other plugin api's. | ||
2. InjectSecurity - provides methods to inject user or roles. This is useful for running background jobs securely. | ||
|
||
* Change the title in this README | ||
* Edit your repository description on GitHub | ||
Next: | ||
3. IntegTestsWithSecurity - provides methods to create users, roles for running integ tests with security plugin. | ||
4. Shared Request/Response/Action classes used for plugin to plugin transport layer calls. | ||
5. Any common functionality across Elasticsearch plugins could be moved to this. | ||
|
||
## Security | ||
|
||
See [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more information. | ||
## Setup | ||
|
||
## License | ||
1. Check out this package from version control. | ||
1. Launch Intellij IDEA, choose **Import Project**, and select the `settings.gradle` file in the root of this package. | ||
1. To build from the command line, set `JAVA_HOME` to point to a JDK >= 14 before running `./gradlew`. | ||
|
||
This project is licensed under the Apache-2.0 License. | ||
|
||
## Build | ||
[todo]: how to publish this project jar to maven/jcenter | ||
|
||
|
||
|
||
### Building from the command line | ||
``` | ||
./gradlew clean | ||
./gradlew build | ||
./gradlew publishToMavenLocal | ||
``` | ||
|
||
### Logging | ||
|
||
To change loglevel, add below to `config/log4j2.properties` or use REST API to set. | ||
``` | ||
logger.commons.name = com.amazon.opendistroforelasticsearch.commons | ||
logger.commons.level = debug | ||
``` | ||
|
||
## Code of Conduct | ||
|
||
This project has adopted an [Open Source Code of Conduct](https://opendistro.github.io/for-elasticsearch/codeofconduct.html). | ||
|
||
|
||
## Security issue notifications | ||
|
||
If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public GitHub issue. | ||
|
||
|
||
## Licensing | ||
|
||
See the [LICENSE](./LICENSE.txt) file for our project's licensing. We will ask you to confirm the licensing of your contribution. | ||
|
||
|
||
## Copyright | ||
|
||
Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. |
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,87 @@ | ||
/* | ||
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"). | ||
* You may not use this file except in compliance with the License. | ||
* A copy of the License is located at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* or in the "license" file accompanying this file. This file is distributed | ||
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | ||
* express or implied. See the License for the specific language governing | ||
* permissions and limitations under the License. | ||
*/ | ||
|
||
buildscript { | ||
ext { | ||
es_group = "org.elasticsearch" | ||
es_version = '7.8.0' | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
maven { url "https://plugins.gradle.org/m2/" } | ||
jcenter() | ||
} | ||
|
||
dependencies { | ||
classpath "${es_group}.gradle:build-tools:${es_version}" | ||
} | ||
} | ||
|
||
plugins { | ||
id 'nebula.ospackage' version "8.3.0" apply false | ||
id 'java-library' | ||
id 'checkstyle' | ||
id 'maven-publish' | ||
} | ||
|
||
repositories { | ||
mavenLocal() | ||
mavenCentral() | ||
maven { url "https://plugins.gradle.org/m2/" } | ||
jcenter() | ||
} | ||
|
||
|
||
group 'com.amazon.opendistroforelasticsearch.commons' | ||
|
||
|
||
sourceCompatibility = 1.8 | ||
|
||
ext { | ||
es_version = '7.8.0' | ||
opendistroVersion = '1.9.0' | ||
} | ||
|
||
publishing { | ||
publications { | ||
mavenJava(MavenPublication) { | ||
from components.java | ||
} | ||
} | ||
} | ||
|
||
|
||
apply plugin: 'java' | ||
apply plugin: 'idea' | ||
apply plugin: 'base' | ||
apply plugin: 'jacoco' | ||
|
||
dependencies { | ||
testCompile group: 'junit', name: 'junit', version: '4.12' | ||
compile "org.elasticsearch.client:elasticsearch-rest-high-level-client:${es_version}" | ||
} | ||
|
||
|
||
/* | ||
spotless { | ||
java { | ||
removeUnusedImports() | ||
importOrder 'java', 'javax', 'org', 'com' | ||
licenseHeaderFile 'spotless.license.java' | ||
|
||
eclipse().configFile rootProject.file('.eclipseformat.xml') | ||
} | ||
}*/ |
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,15 @@ | ||
/* | ||
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"). | ||
* You may not use this file except in compliance with the License. | ||
* A copy of the License is located at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* or in the "license" file accompanying this file. This file is distributed | ||
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | ||
* express or implied. See the License for the specific language governing | ||
* permissions and limitations under the License. | ||
*/ | ||
|
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
Oops, something went wrong.