From fa5c52f7855d31d299cabebc308e624a9d14ad1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=B3pez=20L=C3=B3pez=2C=20Roberto?= Date: Tue, 26 Oct 2021 10:18:53 +0200 Subject: [PATCH 1/6] TFP-980 update jdk for travis --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 55a8903..f92d408 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,4 +2,4 @@ dist: trusty sudo: false language: java jdk: - - openjdk7 + - openjdk8 From ba9dd213d481f0156483207ff68c36b96ffd01d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=B3pez=20L=C3=B3pez=2C=20Roberto?= Date: Tue, 26 Oct 2021 11:04:59 +0200 Subject: [PATCH 2/6] TFP-981 documentation fixes --- CHANGELOG.md | 60 +++++++++++++++++++- README.md | 45 +++------------ edgegrid-signer-apache-http-client/README.md | 2 +- edgegrid-signer-async-http-client/README.md | 2 +- edgegrid-signer-gatling/README.md | 2 +- edgegrid-signer-google-http-client/README.md | 2 +- edgegrid-signer-rest-assured/README.md | 2 +- 7 files changed, 70 insertions(+), 45 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 29a2de4..5c9889b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,59 @@ -# 4.1.0 (August 26, 2021) +# Change log + +## 4.1.1 (?) + +### Fixes + +* Correct README.md inconsistencies. + +## 4.1.0 (August 26, 2021) + +### Enhancements -## Enhancements * Upgrade project dependencies. -* Ensure compatibility with Java > v9. \ No newline at end of file +* Ensure compatibility with Java > v9. + +## 4.0.1 + +### Fixes + +* Fix Issue #35, a broken unit test. +* Use [URI#getRawPath()](https://docs.oracle.com/javase/8/docs/api/java/net/URI.html#getRawPath--) when constructing a signature. + +## 4.0 + +### BREAKING CHANGES + +* Split the edgerc file reader into new module [edgerc-reader](edgerc-reader). +* Drop dependency on commons-configuration2 from edgegrid-signer-core. +* Drop dependency on commons-lang3. +* Drop dependency on commons-codec (use Base64 methods from JDK instead). +* Use maven-bundle-plugin to add OSGi headers to MANIFEST.MF. + +## 3.0 + +### BREAKING CHANGES + +* Minimum Java version is now 8. + +### Improvements + +* Adding binding for Async HTTP Client. +* Adding binding for Gatling. + +## 2.1 + +### Improvements + +* Adding binding for Apache HTTP Client. +* Splitting README.md between relevant modules. + +## 2.0 + +### Improvements + +* Signing algorithm tweaks +* Separating binding for Google HTTP Client Library for Java from core +* Adding binding for REST-assured +* Unit tests with TestNG +* Publishing to Maven Central! \ No newline at end of file diff --git a/README.md b/README.md index c1b6396..715e0b8 100644 --- a/README.md +++ b/README.md @@ -24,39 +24,6 @@ This project contains a core implementation module and five bindings to specific * [edgegrid-signer-async-http-client](edgegrid-signer-async-http-client) is a binding for [Async HTTP Client][13]. * [edgegrid-signer-gatling](edgegrid-signer-gatling) is a binding for [Gatling][14]. -## Changes - -4.0.2: -- Upgrade libraries. -- Add missing dependencies for Java ≥ 9. - -4.0.1: -- Fix Issue #35, a broken unit test. -- Use [URI#getRawPath()](https://docs.oracle.com/javase/8/docs/api/java/net/URI.html#getRawPath--) when constructing a signature. - -4.0: -- BREAKING CHANGE: Split the edgerc file reader into new module [edgerc-reader](edgerc-reader). -- Drop dependency on commons-configuration2 from edgegrid-signer-core. -- Drop dependency on commons-lang3. -- Drop dependency on commons-codec (use Base64 methods from JDK instead). -- Use maven-bundle-plugin to add OSGi headers to MANIFEST.MF. - -3.0: -- Minimum Java version is now 8. -- Adding binding for Async HTTP Client. -- Adding binding for Gatling. - -2.1: -- Adding binding for Apache HTTP Client. -- Splitting README.md between relevant modules. - -2.0: -- Signing algorithm tweaks -- Separating binding for Google HTTP Client Library for Java from core -- Adding binding for REST-assured -- Unit tests with TestNG -- Publishing to Maven Central! - ## Similar tools A number of similar libraries for signing requests exist for popular @@ -87,13 +54,17 @@ programming languages: ## Authors -### Active authors -Martin Meyer +### Active + +Roberto López López +Michał Wójcik -### Inactive authors +### Inactive + +Martin Meyer Maciej Gawinecki -## Contribute! +## Contribute This is an open-source library, and contributions are welcome. You're welcome to fork this project and send us a pull request. diff --git a/edgegrid-signer-apache-http-client/README.md b/edgegrid-signer-apache-http-client/README.md index d1b572a..f76367b 100644 --- a/edgegrid-signer-apache-http-client/README.md +++ b/edgegrid-signer-apache-http-client/README.md @@ -18,7 +18,7 @@ Include the following Maven dependency in your project POM: com.akamai.edgegrid edgegrid-signer-apache-http-client - 4.0.2 + 4.1.1 ``` diff --git a/edgegrid-signer-async-http-client/README.md b/edgegrid-signer-async-http-client/README.md index 24e4bfb..6276ccf 100644 --- a/edgegrid-signer-async-http-client/README.md +++ b/edgegrid-signer-async-http-client/README.md @@ -18,7 +18,7 @@ Include the following Maven dependency in your project POM: com.akamai.edgegrid edgegrid-signer-async-http-client - 4.0.2 + 4.1.1 ``` diff --git a/edgegrid-signer-gatling/README.md b/edgegrid-signer-gatling/README.md index e32be5d..f56bf18 100644 --- a/edgegrid-signer-gatling/README.md +++ b/edgegrid-signer-gatling/README.md @@ -18,7 +18,7 @@ Include the following Maven dependency in your project POM: com.akamai.edgegrid edgegrid-signer-gatling - 4.0.2 + 4.1.1 ``` diff --git a/edgegrid-signer-google-http-client/README.md b/edgegrid-signer-google-http-client/README.md index 57ffec3..ce3af53 100644 --- a/edgegrid-signer-google-http-client/README.md +++ b/edgegrid-signer-google-http-client/README.md @@ -18,7 +18,7 @@ Include the following Maven dependency in your project POM: com.akamai.edgegrid edgegrid-signer-google-http-client - 4.0.2 + 4.1.1 ``` diff --git a/edgegrid-signer-rest-assured/README.md b/edgegrid-signer-rest-assured/README.md index 7d199ce..2015965 100644 --- a/edgegrid-signer-rest-assured/README.md +++ b/edgegrid-signer-rest-assured/README.md @@ -18,7 +18,7 @@ Include the following Maven dependency in your project POM: com.akamai.edgegrid edgegrid-signer-rest-assured - 4.0.2 + 4.1.1 ``` From a3b93c9d51c5059f3f3bb3fd09e49b17f04318e5 Mon Sep 17 00:00:00 2001 From: azani Date: Mon, 15 Nov 2021 14:42:05 -0800 Subject: [PATCH 3/6] DXDOCS-45 documentation update --- README.md | 42 +++++++++++++++++++++++++++++++++--------- 1 file changed, 33 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 715e0b8..e4be3c7 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,40 @@ # EdgeGrid Client for Java -Java implementation of Akamai {OPEN} EdgeGrid signing. +This library implements [EdgeGrid authentication](https://techdocs.akamai.com/developer/docs/authenticate-with-edgegrid) for Java. -[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.akamai.edgegrid/edgegrid-signer-parent/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.akamai.edgegrid/edgegrid-signer-parent) -[![Javadocs](http://www.javadoc.io/badge/com.akamai.edgegrid/edgegrid-signer-parent.svg)](http://www.javadoc.io/doc/com.akamai.edgegrid/edgegrid-signer-parent) +Before you begin, you need to [Create authentication credentials](https://techdocs.akamai.com/developer/docs/set-up-authentication-credentials). + +## Install required software -## Description +In order to use EdgeGrid Client for Java, you need [Java version 8+](https://www.java.com/en/download/help/download_options.xml). -This library implements [Akamai {OPEN} EdgeGrid Authentication][1] for Java. -It is presented as a core module which can be used independently of any -particular HTTP client library and three implementations for specific HTTP client -libraries. +[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.akamai.edgegrid/edgegrid-signer-parent/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.akamai.edgegrid/edgegrid-signer-parent) +[![Javadocs](http://www.javadoc.io/badge/com.akamai.edgegrid/edgegrid-signer-parent.svg)](https://www.javadoc.io/doc/com.akamai.edgegrid) + +## Make an API call +You'll need the values for the tokens from your [.edgerc](doc:set-up-authentication-credentials#add-credential-to-edgerc-file) file. + +``` +ClientCredential credential = ClientCredential.builder() + .accessToken("akaa-xxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxx") + .clientToken("akaa-xxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxx") + .clientSecret("SOMESECRET") + .host("akaa-baseurl-xxxxxxxxxxx-xxxxxxxxxxxxx.luna.akamaiapis.net") + .build(); +``` + +Example API call: +``` +Request request = Request.builder() + .method("POST") + .uri("https://akaa-baseurl-xxxxxxxxxxx-xxxxxxxxxxxxx.luna.akamaiapis.net/diagnostic-tools/v2/ghost-locations/available") + .body("{ \"field\": \"field value\" }".getBytes()) + .header("X-Some-Signed-Header", "header value") + .header("X-Some-Other-Signed-Header", "header value 2") + .build(); +``` + +This is an example of an API call to [List available edge server locations](https://techdocs.akamai.com/diagnostic-tools/reference/ghost-locationsavailable). Change the `uri` element to reference an endpoint in any of the [Akamai APIs](https://developer.akamai.com/api). ## Modules @@ -69,4 +93,4 @@ Maciej Gawinecki This is an open-source library, and contributions are welcome. You're welcome to fork this project and send us a pull request. -For more information about OPEN API visit the [Akamai {OPEN} Developer Community](https://developer.akamai.com/). +Find valuable resources on the [Akamai Developer](https://developer.akamai.com/) website. From 2a9210bf57876695d65d22c5bb8d987fc344c82f Mon Sep 17 00:00:00 2001 From: azani Date: Fri, 17 Dec 2021 11:05:03 -0800 Subject: [PATCH 4/6] DXDOCS-45 update submodule READMEs --- README.md | 18 ++++-------- edgegrid-signer-apache-http-client/README.md | 28 +++++++----------- edgegrid-signer-async-http-client/README.md | 30 ++++++++----------- edgegrid-signer-core/README.md | 11 +------ edgegrid-signer-gatling/README.md | 24 +++++---------- edgegrid-signer-google-http-client/README.md | 31 ++++++++------------ edgegrid-signer-rest-assured/README.md | 22 ++++---------- edgerc-reader/README.md | 17 ++++------- 8 files changed, 59 insertions(+), 122 deletions(-) diff --git a/README.md b/README.md index e4be3c7..77cc283 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ In order to use EdgeGrid Client for Java, you need [Java version 8+](https://www [![Javadocs](http://www.javadoc.io/badge/com.akamai.edgegrid/edgegrid-signer-parent.svg)](https://www.javadoc.io/doc/com.akamai.edgegrid) ## Make an API call -You'll need the values for the tokens from your [.edgerc](doc:set-up-authentication-credentials#add-credential-to-edgerc-file) file. +You'll need the values for the tokens from your [.edgerc](https://techdocs.akamai.com/developer/docs/set-up-authentication-credentials#add-credential-to-edgerc-file) file. ``` ClientCredential credential = ClientCredential.builder() @@ -41,27 +41,19 @@ This is an example of an API call to [List available edge server locations](http This project contains a core implementation module and five bindings to specific HTTP client libraries. * [edgegrid-signer-core](edgegrid-signer-core) is the core signing implementation and base classes used by the individual library implementations. -* [edgerc-reader](edgerc-reader) is a configuration file reader that supports edgerc files. These files are basically INI files with certain sections and properties. +* [edgerc-reader](edgerc-reader) is a configuration file reader that supports `.edgerc` files. These files are basically INI files with certain sections and properties. * [edgegrid-signer-apache-http-client](edgegrid-signer-apache-http-client) is a binding for [Apache HTTP Client][2]. * [edgegrid-signer-google-http-client](edgegrid-signer-google-http-client) is a binding for [Google HTTP Client Library for Java][3]. * [edgegrid-signer-rest-assured](edgegrid-signer-rest-assured) is a binding for [REST-assured][4]. * [edgegrid-signer-async-http-client](edgegrid-signer-async-http-client) is a binding for [Async HTTP Client][13]. * [edgegrid-signer-gatling](edgegrid-signer-gatling) is a binding for [Gatling][14]. -## Similar tools -A number of similar libraries for signing requests exist for popular -programming languages: +> Note: A number of similar libraries for signing requests exist for popular +programming languages, and you can find them at [https://github.com/akamai?q=edgegrid](https://github.com/akamai?q=edgegrid) -* There are two Python bindings: a [command line tool similar to curl][5] and a [Python library][6]. -* [Ruby binding][7] -* [Perl binding][8] -* [Powershell binding][9] -* [NodeJS binding][10] -* [C# binding][11] -* [Go binding][12] -[1]: https://developer.akamai.com/introduction/Client_Auth.html +[1]: https://techdocs.akamai.com/developer/docs/authenticate-with-edgegrid [2]: https://hc.apache.org/ [3]: https://github.com/google/google-http-java-client [4]: https://github.com/rest-assured/rest-assured diff --git a/edgegrid-signer-apache-http-client/README.md b/edgegrid-signer-apache-http-client/README.md index f76367b..741c274 100644 --- a/edgegrid-signer-apache-http-client/README.md +++ b/edgegrid-signer-apache-http-client/README.md @@ -1,16 +1,13 @@ -# EdgeGrid Client for Java +# Apache HTTP Client module - EdgeGrid Client for Java -Java implementation of Akamai {OPEN} EdgeGrid signing. +-[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.akamai.edgegrid/edgegrid-signer-apache-http-client/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.akamai.edgegrid/edgegrid-signer-apache-http-client) +-[![Javadoc](http://www.javadoc.io/badge/com.akamai.edgegrid/edgegrid-signer-apache-http-client.svg)](http://www.javadoc.io/doc/com.akamai.edgegrid/edgegrid-signer-apache-http-client) -[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.akamai.edgegrid/edgegrid-signer-apache-http-client/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.akamai.edgegrid/edgegrid-signer-apache-http-client) -[![Javadoc](http://www.javadoc.io/badge/com.akamai.edgegrid/edgegrid-signer-apache-http-client.svg)](http://www.javadoc.io/doc/com.akamai.edgegrid/edgegrid-signer-apache-http-client) +This library implements [Akamai EdgeGrid Authentication](https://techdocs.akamai.com/developer/docs/authenticate-with-edgegrid) for Java. +This particular module is a binding for the [Apache HTTP Client library](https://hc.apache.org/). +This project contains installation and usage instructions in the [README.md](../README.md). -## Description - -This library implements [Akamai {OPEN} EdgeGrid Authentication][1] for Java. -This particular module is a binding for the [Apache HTTP Client library][2]. - -## Usage of Apache HTTP Client +## Use Apache HTTP Client Include the following Maven dependency in your project POM: @@ -34,10 +31,10 @@ HttpGet request = new HttpGet("http://endpoint.net/billing-usage/v1/reportSource client.execute(request); ``` -## Usage with REST-assured +## Use with REST-assured -This signing module can also be used with [REST-assured][3] instead of using the -[REST-assured signing module][4]. In this situation you would be configuring the +This signing module can also be used with [REST-assured](https://github.com/rest-assured/rest-assured) instead of using the +[EdgeGrid REST-assured signing module](../edgegrid-signer-rest-assured). In this situation you'd configure the Apache HTTP Client as the low-level transport for REST-assured requests and the `RestAssuredEdgeGridFilter` would not be used at all. This may be advantageous because of some capabilities available to the Apache HTTP Client that are not @@ -71,8 +68,3 @@ given() .then() .statusCode(200); ``` - -[1]: https://developer.akamai.com/introduction/Client_Auth.html -[2]: https://hc.apache.org/ -[3]: https://github.com/rest-assured/rest-assured -[4]: ../edgegrid-signer-rest-assured diff --git a/edgegrid-signer-async-http-client/README.md b/edgegrid-signer-async-http-client/README.md index 6276ccf..83ca60c 100644 --- a/edgegrid-signer-async-http-client/README.md +++ b/edgegrid-signer-async-http-client/README.md @@ -1,16 +1,13 @@ -# EdgeGrid Client for Java +# Async HTTP Client library - EdgeGrid Client for Java -Java implementation of Akamai {OPEN} EdgeGrid signing. +-[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.akamai.edgegrid/edgegrid-signer-async-http-client/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.akamai.edgegrid/edgegrid-signer-async-http-client) +-[![Javadoc](http://www.javadoc.io/badge/com.akamai.edgegrid/edgegrid-signer-async-http-client.svg)](http://www.javadoc.io/doc/com.akamai.edgegrid/edgegrid-signer-async-http-client) -[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.akamai.edgegrid/edgegrid-signer-async-http-client/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.akamai.edgegrid/edgegrid-signer-async-http-client) -[![Javadoc](http://www.javadoc.io/badge/com.akamai.edgegrid/edgegrid-signer-async-http-client.svg)](http://www.javadoc.io/doc/com.akamai.edgegrid/edgegrid-signer-async-http-client) +This library implements [Akamai EdgeGrid Authentication](https://techdocs.akamai.com/developer/docs/authenticate-with-edgegrid) for Java. +This particular module is a binding for the [Async HTTP Client library](https://github.com/AsyncHttpClient/async-http-client). +This project contains installation and usage instructions in the [README.md](../README.md). -## Description - -This library implements [Akamai {OPEN} EdgeGrid Authentication][1] for Java. -This particular module is a binding for the [Async HTTP Client library][2]. - -## Usage of Async HTTP Client +## Use Async HTTP Client Include the following Maven dependency in your project POM: @@ -35,6 +32,10 @@ Request request = new RequestBuilder("POST") .build(); asyncHttpClient().executeRequest(request).get(); + +> Note: The `host` part of the URI will be replaced by the provided `AsyncHttpClientEdgeGridSignatureCalculator` +with the host from the client credential in the `.edgerc` file. + ``` Alternatively, create an HTTP client that will sign each HTTP request with a defined client @@ -52,11 +53,4 @@ client.preparePost("https://localhost/papi/v0/properties") .execute().get(); ``` -Note, in the latter case requests *must* be prepared with the HTTP client. - -Note, in both cases the host part of the URI does not matter, because it will be replaced by -the provided `AsyncHttpClientEdgeGridSignatureCalculator` with the host from the provided client -credential. - -[1]: https://developer.akamai.com/introduction/Client_Auth.html -[2]: https://github.com/AsyncHttpClient/async-http-client +> Note: In this case you need to prepare requests with the HTTP client. diff --git a/edgegrid-signer-core/README.md b/edgegrid-signer-core/README.md index 5d04d5f..4273e75 100644 --- a/edgegrid-signer-core/README.md +++ b/edgegrid-signer-core/README.md @@ -1,13 +1,6 @@ # EdgeGrid Client for Java -Java implementation of Akamai {OPEN} EdgeGrid signing. - -[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.akamai.edgegrid/edgegrid-signer-core/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.akamai.edgegrid/edgegrid-signer-core) -[![Javadoc](http://www.javadoc.io/badge/com.akamai.edgegrid/edgegrid-signer-core.svg)](http://www.javadoc.io/doc/com.akamai.edgegrid/edgegrid-signer-core) - -## Description - -This library implements [Akamai {OPEN} EdgeGrid Authentication][1] for Java. +This library implements [Akamai EdgeGrid Authentication](https://techdocs.akamai.com/developer/docs/authenticate-with-edgegrid) for Java. This particular module is the core implementation, containing base classes and a signing algorithm implementation. @@ -81,5 +74,3 @@ credential. `ClientCredentialProvider` which always returns the same `ClientCredential`. The constructors for all the `AbstractEdgeGridRequestSigner` implementations create one of these transparently whenever they are passed a `ClientCredential`. - -[1]: https://developer.akamai.com/introduction/Client_Auth.html diff --git a/edgegrid-signer-gatling/README.md b/edgegrid-signer-gatling/README.md index f56bf18..b3d6867 100644 --- a/edgegrid-signer-gatling/README.md +++ b/edgegrid-signer-gatling/README.md @@ -1,16 +1,15 @@ -# EdgeGrid Client for Java - -Java implementation of Akamai {OPEN} EdgeGrid signing. +# Gatling - EdgeGrid Client for Java [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.akamai.edgegrid/edgegrid-signer-gatling/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.akamai.edgegrid/edgegrid-signer-gatling) [![Javadoc](http://www.javadoc.io/badge/com.akamai.edgegrid/edgegrid-signer-gatling.svg)](http://www.javadoc.io/doc/com.akamai.edgegrid/edgegrid-signer-gatling) -## Description +This library implements [Akamai EdgeGrid Authentication](https://techdocs.akamai.com/developer/docs/authenticate-with-edgegrid) for Java. +This particular module is a binding for [Gatling](https://gatling.io/). +This project contains installation and usage instructions in the [README.md](../README.md). -This library implements [Akamai {OPEN} EdgeGrid Authentication][1] for Java. -This particular module is a binding for the [Gatling][2]. +## Use Gatling -## Usage of Gatling +> Note: The binding works only with Gatling 2, not Gatling 3. Include the following Maven dependency in your project POM: @@ -52,13 +51,4 @@ class YourSimulation extends OpenApiSimulation(clientCredential) { } ``` -Note, `httpConf` is a protocol configured to use the defined `clientCredential`. - -The binding works only with Gatling 2. It will not work Gatling 3. - - - - - -[1]: https://developer.akamai.com/introduction/Client_Auth.html -[2]: https://gatling.io/ +> Note: `httpConf` is a protocol configured to use the defined `clientCredential`. diff --git a/edgegrid-signer-google-http-client/README.md b/edgegrid-signer-google-http-client/README.md index ce3af53..911a36a 100644 --- a/edgegrid-signer-google-http-client/README.md +++ b/edgegrid-signer-google-http-client/README.md @@ -1,16 +1,13 @@ -# EdgeGrid Client for Java - -Java implementation of Akamai {OPEN} EdgeGrid signing. +# Google HTTP Client Library - EdgeGrid Client for Java [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.akamai.edgegrid/edgegrid-signer-google-http-client/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.akamai.edgegrid/edgegrid-signer-google-http-client) [![Javadoc](http://www.javadoc.io/badge/com.akamai.edgegrid/edgegrid-signer-google-http-client.svg)](http://www.javadoc.io/doc/com.akamai.edgegrid/edgegrid-signer-google-http-client) -## Description - -This library implements [Akamai {OPEN} EdgeGrid Authentication][1] for Java. -This particular module is a binding for the [Google HTTP Client Library for Java][2]. +This library implements [Akamai EdgeGrid Authentication](https://techdocs.akamai.com/developer/docs/authenticate-with-edgegrid) for Java. +This particular module is a binding for [Google HTTP Client Library for Java](https://github.com/google/google-http-java-client). +This project contains installation and usage instructions in the [README.md](../README.md). -## Usage with Google HTTP Client Library for Java +## Use Google HTTP Client Library for Java Include the following Maven dependency in your project POM: @@ -37,7 +34,8 @@ requestSigner.sign(request); request.execute(); ``` -This, however, requires remembering to sign explicitly every request. +This, however, requires remembering to sign every request explicitly. + Alternately, you may create an `HttpRequestFactory` that will automatically sign requests via an Interceptor: @@ -52,7 +50,7 @@ private HttpRequestFactory createSigningRequestFactory() { } ``` -And then +And then: ```java HttpRequestFactory requestFactory = createSigningRequestFactory(); @@ -62,11 +60,8 @@ HttpRequest request = requestFactory.buildGetRequest(new GenericUrl(uri)); request.execute(); ``` -NOTE: In this example we have used a `ClientCredentialProvider` rather than -a more simple `ClientCredential`. `ClientCredentialProvider` provides a -mechanism to construct a `ClientCredential` at the time of a request based on -any logic you may want. For example, your own implementation could read -credentials from a database or other secret store. - -[1]: https://developer.akamai.com/introduction/Client_Auth.html -[2]: https://github.com/google/google-http-java-client +> Note: In this example we used a `clientCredentialProvider` rather than +a simpler `ClientCredential`. `clientCredentialProvider` provides a +mechanism to construct a `ClientCredential` at the time of the request based on +any logic you define. For example, your implementation could read +credentials from a database or another secret store. diff --git a/edgegrid-signer-rest-assured/README.md b/edgegrid-signer-rest-assured/README.md index 2015965..7759766 100644 --- a/edgegrid-signer-rest-assured/README.md +++ b/edgegrid-signer-rest-assured/README.md @@ -1,16 +1,13 @@ -# EdgeGrid Client for Java - -Java implementation of Akamai {OPEN} EdgeGrid signing. +# REST-assured - EdgeGrid Client for Java [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.akamai.edgegrid/edgegrid-signer-rest-assured/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.akamai.edgegrid/edgegrid-signer-rest-assured) [![Javadoc](http://www.javadoc.io/badge/com.akamai.edgegrid/edgegrid-signer-rest-assured.svg)](http://www.javadoc.io/doc/com.akamai.edgegrid/edgegrid-signer-rest-assured) -## Description - -This library implements [Akamai {OPEN} EdgeGrid Authentication][1] for Java. -This particular module is a binding for the [REST-assured library][2]. +This library implements [Akamai EdgeGrid Authentication](https://techdocs.akamai.com/developer/docs/authenticate-with-edgegrid) for Java. +This particular module is a binding for [REST-assured library](https://github.com/rest-assured/rest-assured). +This project contains installation and usage instructions in the [README.md](../README.md). -## Usage with REST-assured +## Use with REST-assured Include the following Maven dependency in your project POM: @@ -44,11 +41,4 @@ does not support re-triggering its filters when following a 301/302 redirect. The result of following a redirect is presently an invalid request signature and a rejected request. -If you experience this problem you can use the [Apache HTTP Client binding][3] -instead of the REST-assured binding. This will be functionally equivalent, and -will also sign redirected requests properly. Usage instructions can be found in -the readme for that module. - -[1]: https://developer.akamai.com/introduction/Client_Auth.html -[2]: https://github.com/rest-assured/rest-assured -[3]: ../edgegrid-signer-apache-http-client +If you experience this problem, you can use the [Apache HTTP Client binding](../edgegrid-signer-apache-http-client) instead of the REST-assured binding. This will be functionally equivalent, and will also sign redirected requests properly. Usage instructions can be found in the README file for that module. diff --git a/edgerc-reader/README.md b/edgerc-reader/README.md index 16b5bdb..afcdcbc 100644 --- a/edgerc-reader/README.md +++ b/edgerc-reader/README.md @@ -1,20 +1,15 @@ -# EdgeGrid Client for Java - -Java implementation of Akamai {OPEN} EdgeGrid signing. +# EdgeRC Reader - EdgeGrid Client for Java [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.akamai.edgegrid/edgerc-reader/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.akamai.edgegrid/edgerc-reader) [![Javadoc](http://www.javadoc.io/badge/com.akamai.edgegrid/edgerc-reader.svg)](http://www.javadoc.io/doc/com.akamai.edgegrid/edgerc-reader) -## Description - -This library implements [Akamai {OPEN} EdgeGrid Authentication][1] for Java. -This particular module is a `ClientCredentialProvider` implementation which is capable of reading -credentials from an EdgeRC file. +This library implements [Akamai EdgeGrid Authentication](https://techdocs.akamai.com/developer/docs/authenticate-with-edgegrid) for Java. +This particular module is a `ClientCredentialProvider` implementation which is capable of reading credentials from an `.edgerc` file. +This project contains installation and usage instructions in the [README.md](../README.md). ## Overview of EdgeRC Files -The format of an EdgeRC file is simply an INI file where each section corresponds to an OPEN -credential. Each section MUST have the following properties: +The format of an EdgeRC file is simply an INI file where each section corresponds to an authentication token. Each section MUST have the following properties: * access_token * client_secret * client_token @@ -31,5 +26,3 @@ else. ```java ClientCredential credential = EdgeRcClientCredentialProvider.fromEdgeRc("~/.edgerc", "good1").getClientCredential("section"); ``` - -[1]: https://developer.akamai.com/introduction/Client_Auth.html From 3870731623f0fd5cb326dfbc41724b592aa034e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=B3pez=20L=C3=B3pez=2C=20Roberto?= Date: Tue, 8 Feb 2022 13:07:50 +0100 Subject: [PATCH 5/6] TFP-266 fix for multiple CVE vulnerabilities --- pom.xml | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 06cb99e..4ce2ab8 100644 --- a/pom.xml +++ b/pom.xml @@ -85,14 +85,24 @@ 3.5.1 1.7.30 2.13.6 + 4.1.73.Final + 1.2.10 + 6.5.3 + + io.netty + netty-bom + ${netty.version} + pom + import + ch.qos.logback logback-classic - 1.2.3 + ${logback.version} test @@ -289,6 +299,18 @@ + + org.owasp + dependency-check-maven + ${dependency-check.version} + + + + check + + + + From e1fd58c356c10cfbfdc085b733bf420bfc854915 Mon Sep 17 00:00:00 2001 From: Piyush Kaushik Date: Thu, 17 Feb 2022 08:32:41 +0000 Subject: [PATCH 6/6] DXE-561 DXE-562 release change log and versioning Merge in DEVEXP/akamaiopen-edgegrid-java from DXE-561-DXE-562-release-candidate to develop --- CHANGELOG.md | 10 ++++++++-- edgegrid-signer-apache-http-client/pom.xml | 2 +- edgegrid-signer-async-http-client/pom.xml | 2 +- edgegrid-signer-core/pom.xml | 2 +- edgegrid-signer-gatling/pom.xml | 2 +- edgegrid-signer-google-http-client/pom.xml | 2 +- edgegrid-signer-rest-assured/pom.xml | 2 +- edgerc-reader/pom.xml | 2 +- pom.xml | 2 +- 9 files changed, 16 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c9889b..93dee82 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,15 @@ # Change log -## 4.1.1 (?) +## 4.1.1 (February 17, 2022) + +### Enhancements + +* Added OWASP dependency check plugin to maven pipeline. ### Fixes +* Fix multiple CVE vulnerabilities by upgrading logback and netty dependencies. +* Fix Travis build by updating Java version to 8. * Correct README.md inconsistencies. ## 4.1.0 (August 26, 2021) @@ -11,7 +17,7 @@ ### Enhancements * Upgrade project dependencies. -* Ensure compatibility with Java > v9. +* Ensure compatibility with Java >= v9. ## 4.0.1 diff --git a/edgegrid-signer-apache-http-client/pom.xml b/edgegrid-signer-apache-http-client/pom.xml index e13efdc..0bb33d3 100644 --- a/edgegrid-signer-apache-http-client/pom.xml +++ b/edgegrid-signer-apache-http-client/pom.xml @@ -6,7 +6,7 @@ edgegrid-signer-parent com.akamai.edgegrid - 4.1.0 + 4.1.1 4.0.0 diff --git a/edgegrid-signer-async-http-client/pom.xml b/edgegrid-signer-async-http-client/pom.xml index 4dbb210..04cfc3c 100644 --- a/edgegrid-signer-async-http-client/pom.xml +++ b/edgegrid-signer-async-http-client/pom.xml @@ -5,7 +5,7 @@ edgegrid-signer-parent com.akamai.edgegrid - 4.1.0 + 4.1.1 4.0.0 diff --git a/edgegrid-signer-core/pom.xml b/edgegrid-signer-core/pom.xml index dd7c08a..a4e1165 100644 --- a/edgegrid-signer-core/pom.xml +++ b/edgegrid-signer-core/pom.xml @@ -6,7 +6,7 @@ edgegrid-signer-parent com.akamai.edgegrid - 4.1.0 + 4.1.1 edgegrid-signer-core diff --git a/edgegrid-signer-gatling/pom.xml b/edgegrid-signer-gatling/pom.xml index f894c75..4e5d822 100644 --- a/edgegrid-signer-gatling/pom.xml +++ b/edgegrid-signer-gatling/pom.xml @@ -7,7 +7,7 @@ edgegrid-signer-parent com.akamai.edgegrid - 4.1.0 + 4.1.1 edgegrid-signer-gatling diff --git a/edgegrid-signer-google-http-client/pom.xml b/edgegrid-signer-google-http-client/pom.xml index ae37a1e..262a416 100644 --- a/edgegrid-signer-google-http-client/pom.xml +++ b/edgegrid-signer-google-http-client/pom.xml @@ -6,7 +6,7 @@ edgegrid-signer-parent com.akamai.edgegrid - 4.1.0 + 4.1.1 edgegrid-signer-google-http-client diff --git a/edgegrid-signer-rest-assured/pom.xml b/edgegrid-signer-rest-assured/pom.xml index 22d8702..e5e2f7b 100644 --- a/edgegrid-signer-rest-assured/pom.xml +++ b/edgegrid-signer-rest-assured/pom.xml @@ -6,7 +6,7 @@ edgegrid-signer-parent com.akamai.edgegrid - 4.1.0 + 4.1.1 edgegrid-signer-rest-assured diff --git a/edgerc-reader/pom.xml b/edgerc-reader/pom.xml index 928b448..349ce55 100644 --- a/edgerc-reader/pom.xml +++ b/edgerc-reader/pom.xml @@ -5,7 +5,7 @@ edgegrid-signer-parent com.akamai.edgegrid - 4.1.0 + 4.1.1 4.0.0 diff --git a/pom.xml b/pom.xml index 4ce2ab8..10685f8 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.akamai.edgegrid edgegrid-signer-parent - 4.1.0 + 4.1.1 edgegrid-signer-apache-http-client