AWS Signing Request Interceptor

Request Interceptor for Apache Client that signs the request for AWS

Лицензия

Лицензия

Категории

Категории

AWS Контейнер PaaS Providers
Группа

Группа

vc.inreach.aws
Идентификатор

Идентификатор

aws-signing-request-interceptor
Последняя версия

Последняя версия

0.0.22
Дата

Дата

Тип

Тип

jar
Описание

Описание

AWS Signing Request Interceptor
Request Interceptor for Apache Client that signs the request for AWS
Ссылка на сайт

Ссылка на сайт

https://github.com/inreachventures/aws-signing-request-interceptor
Система контроля версий

Система контроля версий

https://github.com/inreachventures/aws-signing-request-interceptor

Скачать aws-signing-request-interceptor

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/vc.inreach.aws/aws-signing-request-interceptor/ -->
<dependency>
    <groupId>vc.inreach.aws</groupId>
    <artifactId>aws-signing-request-interceptor</artifactId>
    <version>0.0.22</version>
</dependency>
// https://jarcasting.com/artifacts/vc.inreach.aws/aws-signing-request-interceptor/
implementation 'vc.inreach.aws:aws-signing-request-interceptor:0.0.22'
// https://jarcasting.com/artifacts/vc.inreach.aws/aws-signing-request-interceptor/
implementation ("vc.inreach.aws:aws-signing-request-interceptor:0.0.22")
'vc.inreach.aws:aws-signing-request-interceptor:jar:0.0.22'
<dependency org="vc.inreach.aws" name="aws-signing-request-interceptor" rev="0.0.22">
  <artifact name="aws-signing-request-interceptor" type="jar" />
</dependency>
@Grapes(
@Grab(group='vc.inreach.aws', module='aws-signing-request-interceptor', version='0.0.22')
)
libraryDependencies += "vc.inreach.aws" % "aws-signing-request-interceptor" % "0.0.22"
[vc.inreach.aws/aws-signing-request-interceptor "0.0.22"]

Зависимости

compile (5)

Идентификатор библиотеки Тип Версия
com.google.guava : guava jar 18.0
commons-codec : commons-codec jar 1.9
org.apache.httpcomponents : httpcore jar 4.4.1
org.apache.httpcomponents : httpclient jar 4.4.1
com.amazonaws : aws-java-sdk-core jar 1.10.19

test (3)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.12
org.mockito : mockito-core jar 1.10.19
org.assertj : assertj-core jar 3.2.0

Модули Проекта

Данный проект не имеет модулей.

aws-signing-request-interceptor

Request Interceptor for Apache Client that signs the request for AWS.

Originally created to support AWS' Elasticsearch Service using the Jest client.

Usage

You have to add the AWSSigningRequestInterceptor to the end of the Apache client request chain. Otherwise it won't have visibility of all of the headers being added to the request.

This depends on the AWS core SDK as it relies on an AWSCredentialsProvider to get the key, secret and optional session token. It's advised that you use dependencyManagement to lock in the version of aws-java-sdk-core that works for your project.

private static final String SERVICE = "es";
private static final String REGION = "eu-west-1";
...
final Supplier<LocalDateTime> clock = () -> LocalDateTime.now(ZoneOffset.UTC);
final AWSSigner awsSigner = new AWSSigner(awsCredentialsProvider, REGION, SERVICE, clock);
builder.addInterceptorLast(new AWSSigningRequestInterceptor(awsSigner));

To be able to add the AWSSigningRequestInterceptor to Jest, and thus be able to sign requests to the Elasticsearch Service, you need to override the configureHttpClient method in the JestClientFactory.

final AWSSigningRequestInterceptor requestInterceptor = new AWSSigningRequestInterceptor(awsSigner);
final JestClientFactory factory = new JestClientFactory() {
    @Override
    protected HttpClientBuilder configureHttpClient(HttpClientBuilder builder) {
        builder.addInterceptorLast(requestInterceptor);
        return builder;
    }
    @Override
    protected HttpAsyncClientBuilder configureHttpClient(HttpAsyncClientBuilder builder) {
        builder.addInterceptorLast(requestInterceptor);
        return builder;
    }
};

The project can be found in maven central:

<dependency>
    <groupId>vc.inreach.aws</groupId>
    <artifactId>aws-signing-request-interceptor</artifactId>
    <version>0.0.22</version>
</dependency>

Other Languages

If you're looking for a native Scala version of the AWSSigner then take a look at @ticofab's port: https://github.com/ticofab/aws-request-signer

vc.inreach.aws

InReach Ventures

Scaling early stage investment across Europe through software

Версии библиотеки

Версия
0.0.22
0.0.21
0.0.20
0.0.18
0.0.17
0.0.16
0.0.15
0.0.14
0.0.13
0.0.12
0.0.11
0.0.10
0.0.9
0.0.8
0.0.7
0.0.6
0.0.5
0.0.4
0.0.3
0.0.2