From e747fe4127bb0e94809b812aeb5b7d94043e99ae Mon Sep 17 00:00:00 2001 From: bparmar-splunk Date: Wed, 8 Dec 2021 15:21:41 +0530 Subject: [PATCH 1/2] Release v1.7.2 Update: - POM files updated. - Splunk version updated to 1.7.2 . - Splunk parent version pom is updated to v1.0.1 . - README.md and CHANGELOG.md updated with regards to v1.7.2 . --- CHANGELOG.md | 24 +++++++++++++++ README.md | 6 ++-- deploy | 2 +- deploy.md | 30 +++++++++---------- examples/pom.xml | 4 +-- pom.xml | 4 +-- splunk/pom.xml | 4 +-- .../src/main/java/com/splunk/HttpService.java | 2 +- 8 files changed, 50 insertions(+), 26 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e0416dd..c1e32e58 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,29 @@ # Splunk Enterprise SDK for Java Changelog +## Version 1.7.2 + +### New Features and APIs +* Added a support to add custom headers in Service class. (Github PR [#176](https://github.com/splunk/splunk-sdk-java/pull/176)). +* SSL Certificate validation (default implementation) added. (Github PR [#175](https://github.com/splunk/splunk-sdk-java/pull/175)). + * Boolean flag is introduced to skip/validate certificate. + * Implementation is modified to validate certificate(s) of local and non-local environments. +* Apps/app-install replaced with **apps/local**. (Github PR [#168](https://github.com/splunk/splunk-sdk-java/pull/168)) + +### Minor Changes + +* External Entities restricted in XML factory. (Github PR [#180](https://github.com/splunk/splunk-sdk-java/pull/180)). + * Prevent expansion of external entities in Document Builder factory. +* Headers modified in Socket creation. (Github PR [#179](https://github.com/splunk/splunk-sdk-java/pull/179)). + * Http Request uses raw request headers by including escape characters which seems vulnerable. It was replaced with PrintWriter methods to avoid escape characters. + * Host parameter used in Socket is omitted to prevent exposing it to external users. +* README.md file modified with all login methods along with Splunk Search creation example. (Github PR [#177](https://github.com/splunk/splunk-sdk-java/pull/177)). +* Deploy plugin is removed from Splunk module pom to avoid redundancy. (Github PR [#172](https://github.com/splunk/splunk-sdk-java/pull/172)). +* Setter methods for Session and Bearer token added along with test case. (Github PR [#171](https://github.com/splunk/splunk-sdk-java/pull/171)) +* Modular input folder name renamed based on newer splunk folder name validation. (Github PR [#168](https://github.com/splunk/splunk-sdk-java/pull/168)) +* SDK app collection URL has been updated to v1.1.0 in docker compose file. (Github PR [#168](https://github.com/splunk/splunk-sdk-java/pull/168)) + * Test files in sdk app collections are modified based on python v3 syntax. +* Added Saved Search test case based on title. (Github PR [#166](https://github.com/splunk/splunk-sdk-java/pull/166)) + ## Version 1.7.1 ### Minor Changes diff --git a/README.md b/README.md index a43ec8e4..8fa975d1 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -![Build Status](https://github.com/splunk/splunk-sdk-java/actions/workflows/release.yml/badge.svg?branch=master) +[![Java SDK Test](https://github.com/splunk/splunk-sdk-java/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/splunk/splunk-sdk-java/actions/workflows/test.yml) # The Splunk Software Development Kit for Java -#### Version 1.7.1 +#### Version 1.7.2 The Splunk Software Development Kit (SDK) for Java contains library code and examples designed to enable developers to build applications using Splunk. @@ -75,7 +75,7 @@ To add the Splunk SDK for Java `.JAR` file as a dependency: com.splunk splunk - 1.7.1 + 1.7.2 ``` diff --git a/deploy b/deploy index 9cb18855..11bc3961 100755 --- a/deploy +++ b/deploy @@ -2,7 +2,7 @@ declare -r scriptDirectory="$(dirname $(readlink -e $0))" declare -r scriptName="$(basename $0)" -declare -r version="1.7.1" +declare -r version="1.7.2" if [[ $# -ne 1 ]]; then echo 1>&2 "Usage: ${scriptName} {local|staging||production}" diff --git a/deploy.md b/deploy.md index f524be24..3e688c05 100644 --- a/deploy.md +++ b/deploy.md @@ -9,8 +9,8 @@ deploy \ ##DESCRIPTION -Deploy transmits **target/splunk-1.7.1.jar**, **target/splunk-1.7.1-javadoc.jar**, and -**target/splunk-1.7.1-sources.jar** to the **local**, **staging**, or **production** +Deploy transmits **target/splunk-1.7.2.jar**, **target/splunk-1.7.2-javadoc.jar**, and +**target/splunk-1.7.2-sources.jar** to the **local**, **staging**, or **production** maven repository. Repository names are mapped to locations as follows. | repository-name | location | @@ -21,18 +21,18 @@ maven repository. Repository names are mapped to locations as follows. After deployment you should find this tree structure at the location of your repository - com/splunk/splunk/1.7.1/ - ├── splunk-1.7.1-javadoc.jar - ├── splunk-1.7.1-javadoc.jar.md5 - ├── splunk-1.7.1-javadoc.jar.sha1 - ├── splunk-1.7.1-sources.jar - ├── splunk-1.7.1-sources.jar.md5 - ├── splunk-1.7.1-sources.jar.sha1 - ├── splunk-1.7.1.jar - ├── splunk-1.7.1.jar.md5 - ├── splunk-1.7.1.jar.sha1 - ├── splunk-1.7.1.pom - ├── splunk-1.7.1.pom.md5 - └── splunk-1.7.1.pom.sha1 + com/splunk/splunk/1.7.2/ + ├── splunk-1.7.2-javadoc.jar + ├── splunk-1.7.2-javadoc.jar.md5 + ├── splunk-1.7.2-javadoc.jar.sha1 + ├── splunk-1.7.2-sources.jar + ├── splunk-1.7.2-sources.jar.md5 + ├── splunk-1.7.2-sources.jar.sha1 + ├── splunk-1.7.2.jar + ├── splunk-1.7.2.jar.md5 + ├── splunk-1.7.2.jar.sha1 + ├── splunk-1.7.2.pom + ├── splunk-1.7.2.pom.md5 + └── splunk-1.7.2.pom.sha1 Verify this structure prior to release. diff --git a/examples/pom.xml b/examples/pom.xml index bd80052e..7a32d299 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -8,7 +8,7 @@ splunk-sdk-java com.splunk - 1.0.0 + 1.0.1 @@ -37,7 +37,7 @@ com.splunk splunk - 1.7.1 + 1.7.2 provided diff --git a/pom.xml b/pom.xml index 6b98d831..ec4ac168 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ 4.0.0 - 1.7.1 + 1.7.2 true UTF-8 8 @@ -15,7 +15,7 @@ com.splunk splunk-sdk-java - 1.0.0 + 1.0.1 pom Splunk SDK for Java https://dev.splunk.com/enterprise/docs/devtools/java/sdk-java diff --git a/splunk/pom.xml b/splunk/pom.xml index 46eb0625..e17ee521 100644 --- a/splunk/pom.xml +++ b/splunk/pom.xml @@ -5,11 +5,11 @@ 4.0.0 splunk - 1.7.1 + 1.7.2 splunk-sdk-java com.splunk - 1.0.0 + 1.0.1 TLSv1.2 diff --git a/splunk/src/main/java/com/splunk/HttpService.java b/splunk/src/main/java/com/splunk/HttpService.java index b7ec204e..fa11b24d 100644 --- a/splunk/src/main/java/com/splunk/HttpService.java +++ b/splunk/src/main/java/com/splunk/HttpService.java @@ -89,7 +89,7 @@ public boolean verify(String s, SSLSession sslSession) { private String prefix = null; static Map defaultHeader = new HashMap() {{ - put("User-Agent", "splunk-sdk-java/1.7.1"); + put("User-Agent", "splunk-sdk-java/1.7.2"); put("Accept", "*/*"); }}; From 43c535d18cbddb16041fa4f5e29c631df373f2ab Mon Sep 17 00:00:00 2001 From: bparmar-splunk Date: Thu, 9 Dec 2021 15:36:18 +0530 Subject: [PATCH 2/2] Release v1.8.0 --- CHANGELOG.md | 8 +++-- README.md | 4 +-- deploy | 2 +- deploy.md | 30 +++++++++---------- examples/pom.xml | 2 +- pom.xml | 2 +- splunk/pom.xml | 2 +- .../src/main/java/com/splunk/HttpService.java | 2 +- 8 files changed, 27 insertions(+), 25 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c1e32e58..2438cf0c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,13 +1,14 @@ # Splunk Enterprise SDK for Java Changelog -## Version 1.7.2 +## Version 1.8.0 ### New Features and APIs * Added a support to add custom headers in Service class. (Github PR [#176](https://github.com/splunk/splunk-sdk-java/pull/176)). * SSL Certificate validation (default implementation) added. (Github PR [#175](https://github.com/splunk/splunk-sdk-java/pull/175)). - * Boolean flag is introduced to skip/validate certificate. - * Implementation is modified to validate certificate(s) of local and non-local environments. + * Boolean flag is introduced to skip/validate certificate. Use _HttpService.setValidateCertificates()_ to enable/disable certificate validation. + * Breaking change: Certificate validation is now enforced by default, for local or non-production use cases use _HttpService.setValidateCertificates(false)_. * Apps/app-install replaced with **apps/local**. (Github PR [#168](https://github.com/splunk/splunk-sdk-java/pull/168)) +* Breaking change: HttpService.useTLS flag removed, please use _HttpService.setSslSecurityProtocol()_ to set a specific SSL/TLS implementation or else TLS v1.2 is used by default for Java 1.8. ### Minor Changes @@ -19,6 +20,7 @@ * README.md file modified with all login methods along with Splunk Search creation example. (Github PR [#177](https://github.com/splunk/splunk-sdk-java/pull/177)). * Deploy plugin is removed from Splunk module pom to avoid redundancy. (Github PR [#172](https://github.com/splunk/splunk-sdk-java/pull/172)). * Setter methods for Session and Bearer token added along with test case. (Github PR [#171](https://github.com/splunk/splunk-sdk-java/pull/171)) + * **Use:** service.setSplunkToken() for session tokens and service.setBearerToken() for long-lived tokens. * Modular input folder name renamed based on newer splunk folder name validation. (Github PR [#168](https://github.com/splunk/splunk-sdk-java/pull/168)) * SDK app collection URL has been updated to v1.1.0 in docker compose file. (Github PR [#168](https://github.com/splunk/splunk-sdk-java/pull/168)) * Test files in sdk app collections are modified based on python v3 syntax. diff --git a/README.md b/README.md index 8fa975d1..77483b8a 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ [![Java SDK Test](https://github.com/splunk/splunk-sdk-java/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/splunk/splunk-sdk-java/actions/workflows/test.yml) # The Splunk Software Development Kit for Java -#### Version 1.7.2 +#### Version 1.8.0 The Splunk Software Development Kit (SDK) for Java contains library code and examples designed to enable developers to build applications using Splunk. @@ -75,7 +75,7 @@ To add the Splunk SDK for Java `.JAR` file as a dependency: com.splunk splunk - 1.7.2 + 1.8.0 ``` diff --git a/deploy b/deploy index 11bc3961..5a7a6c0d 100755 --- a/deploy +++ b/deploy @@ -2,7 +2,7 @@ declare -r scriptDirectory="$(dirname $(readlink -e $0))" declare -r scriptName="$(basename $0)" -declare -r version="1.7.2" +declare -r version="1.8.0" if [[ $# -ne 1 ]]; then echo 1>&2 "Usage: ${scriptName} {local|staging||production}" diff --git a/deploy.md b/deploy.md index 3e688c05..af57427a 100644 --- a/deploy.md +++ b/deploy.md @@ -9,8 +9,8 @@ deploy \ ##DESCRIPTION -Deploy transmits **target/splunk-1.7.2.jar**, **target/splunk-1.7.2-javadoc.jar**, and -**target/splunk-1.7.2-sources.jar** to the **local**, **staging**, or **production** +Deploy transmits **target/splunk-1.8.0.jar**, **target/splunk-1.8.0-javadoc.jar**, and +**target/splunk-1.8.0-sources.jar** to the **local**, **staging**, or **production** maven repository. Repository names are mapped to locations as follows. | repository-name | location | @@ -21,18 +21,18 @@ maven repository. Repository names are mapped to locations as follows. After deployment you should find this tree structure at the location of your repository - com/splunk/splunk/1.7.2/ - ├── splunk-1.7.2-javadoc.jar - ├── splunk-1.7.2-javadoc.jar.md5 - ├── splunk-1.7.2-javadoc.jar.sha1 - ├── splunk-1.7.2-sources.jar - ├── splunk-1.7.2-sources.jar.md5 - ├── splunk-1.7.2-sources.jar.sha1 - ├── splunk-1.7.2.jar - ├── splunk-1.7.2.jar.md5 - ├── splunk-1.7.2.jar.sha1 - ├── splunk-1.7.2.pom - ├── splunk-1.7.2.pom.md5 - └── splunk-1.7.2.pom.sha1 + com/splunk/splunk/1.8.0/ + ├── splunk-1.8.0-javadoc.jar + ├── splunk-1.8.0-javadoc.jar.md5 + ├── splunk-1.8.0-javadoc.jar.sha1 + ├── splunk-1.8.0-sources.jar + ├── splunk-1.8.0-sources.jar.md5 + ├── splunk-1.8.0-sources.jar.sha1 + ├── splunk-1.8.0.jar + ├── splunk-1.8.0.jar.md5 + ├── splunk-1.8.0.jar.sha1 + ├── splunk-1.8.0.pom + ├── splunk-1.8.0.pom.md5 + └── splunk-1.8.0.pom.sha1 Verify this structure prior to release. diff --git a/examples/pom.xml b/examples/pom.xml index 7a32d299..49d8981c 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -37,7 +37,7 @@ com.splunk splunk - 1.7.2 + 1.8.0 provided diff --git a/pom.xml b/pom.xml index ec4ac168..9bfafba5 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ 4.0.0 - 1.7.2 + 1.8.0 true UTF-8 8 diff --git a/splunk/pom.xml b/splunk/pom.xml index e17ee521..4e0e361d 100644 --- a/splunk/pom.xml +++ b/splunk/pom.xml @@ -5,7 +5,7 @@ 4.0.0 splunk - 1.7.2 + 1.8.0 splunk-sdk-java com.splunk diff --git a/splunk/src/main/java/com/splunk/HttpService.java b/splunk/src/main/java/com/splunk/HttpService.java index fa11b24d..ef7d335d 100644 --- a/splunk/src/main/java/com/splunk/HttpService.java +++ b/splunk/src/main/java/com/splunk/HttpService.java @@ -89,7 +89,7 @@ public boolean verify(String s, SSLSession sslSession) { private String prefix = null; static Map defaultHeader = new HashMap() {{ - put("User-Agent", "splunk-sdk-java/1.7.2"); + put("User-Agent", "splunk-sdk-java/1.8.0"); put("Accept", "*/*"); }};