{"id":43318633,"url":"https://github.com/acm19/aws-request-signing-apache-interceptor","last_synced_at":"2026-02-01T22:10:50.017Z","repository":{"id":41250749,"uuid":"260889387","full_name":"acm19/aws-request-signing-apache-interceptor","owner":"acm19","description":null,"archived":false,"fork":false,"pushed_at":"2025-12-10T09:10:09.000Z","size":181,"stargazers_count":23,"open_issues_count":3,"forks_count":10,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-12-10T11:26:53.995Z","etag":null,"topics":["aws","java","opensearch"],"latest_commit_sha":null,"homepage":"https://acm19.github.io/aws-request-signing-apache-interceptor/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/acm19.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-05-03T10:59:29.000Z","updated_at":"2025-12-10T09:10:12.000Z","dependencies_parsed_at":"2024-01-01T12:37:30.767Z","dependency_job_id":"d991e4f9-c02e-48ee-8788-b27e79096581","html_url":"https://github.com/acm19/aws-request-signing-apache-interceptor","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/acm19/aws-request-signing-apache-interceptor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acm19%2Faws-request-signing-apache-interceptor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acm19%2Faws-request-signing-apache-interceptor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acm19%2Faws-request-signing-apache-interceptor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acm19%2Faws-request-signing-apache-interceptor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/acm19","download_url":"https://codeload.github.com/acm19/aws-request-signing-apache-interceptor/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acm19%2Faws-request-signing-apache-interceptor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28992750,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T22:01:47.507Z","status":"ssl_error","status_checked_at":"2026-02-01T21:58:37.335Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","java","opensearch"],"created_at":"2026-02-01T22:10:49.956Z","updated_at":"2026-02-01T22:10:50.007Z","avatar_url":"https://github.com/acm19.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AWS Request Signing Interceptor\n\n[![tests](https://github.com/acm19/aws-request-signing-apache-interceptor/actions/workflows/test.yml/badge.svg)](https://github.com/acm19/aws-request-signing-apache-interceptor/actions/workflows/test.yml)\n[![Maven Central](https://img.shields.io/maven-central/v/io.github.acm19/aws-request-signing-apache-interceptor)](https://search.maven.org/artifact/io.github.acm19/aws-request-signing-apache-interceptor)\n\nAn AWS request signing interceptor for arbitrary HTTP requests. It supports both [Apache HTTP Client](https://search.maven.org/artifact/org.apache.httpcomponents/httpclient) and [Apache HTTP Client V5](https://search.maven.org/artifact/org.apache.httpcomponents.client5/httpclient5).\n\nThis library enables you to sign requests to any service that leverages SigV4, and thus access any AWS Service or APIG-backed service, including Amazon managed OpenSearch and OpenSearch Serverless.\n\nThis library is based on [AWS Interceptor](https://github.com/awslabs/aws-request-signing-apache-interceptor), but using AWS SDK 2.x.\n\n## Usage\n\nAdd [io.github.acm19.aws-request-signing-apache-interceptor](https://repo1.maven.org/maven2/io/github/acm19/aws-request-signing-apache-interceptor/) as a dependency.\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003eio.github.acm19\u003c/groupId\u003e\n  \u003cartifactId\u003eaws-request-signing-apache-interceptor\u003c/artifactId\u003e\n  \u003cversion\u003e4.0.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### Apache HTTP Client\n\nTo sign requests made with pre-5 versions of the clients the following interceptor should be used `io.github.acm19.aws.interceptor.http.AwsRequestSigningApacheInterceptor`.\n\n```java\nimport java.io.IOException;\nimport org.apache.http.HttpRequestInterceptor;\nimport org.apache.http.client.ClientProtocolException;\nimport org.apache.http.client.methods.HttpGet;\nimport org.apache.http.impl.client.CloseableHttpClient;\nimport org.apache.http.impl.client.HttpClients;\nimport io.github.acm19.aws.interceptor.http.AwsRequestSigningApacheInterceptor;\nimport software.amazon.awssdk.auth.credentials.DefaultCredentialsProvider;\nimport software.amazon.awssdk.http.auth.aws.signer.AwsV4HttpSigner;\nimport software.amazon.awssdk.regions.Region;\nimport software.amazon.awssdk.utils.IoUtils;\n\nfinal class Example {\n    public static void main(String[] args) throws IOException {\n        AwsRequestSigningApacheInterceptor interceptor = new AwsRequestSigningApacheInterceptor(\n                \"service\",\n                AwsV4HttpSigner.create(),\n                DefaultCredentialsProvider.builder().build(),\n                Region.US_WEST_2\n        );\n\n        try (CloseableHttpClient client = HttpClients.custom()\n                .addInterceptorLast(interceptor)\n                .build()) {\n            HttpGet httpGet = new HttpGet(\"https://...\");\n            httpClient.execute(request, response -\u003e {\n                System.out.println(response.getStatusLine());\n                System.out.println(IoUtils.toUtf8String(response.getEntity().getContent()));\n            });\n        }\n    }\n}\n```\n\n### Apache HTTP Client V5\n\nTo sign requests made with version 5 of the client the following interceptor should be used `io.github.acm19.aws.interceptor.http.AwsRequestSigningApacheV5Interceptor`.\n\n```java\nimport java.io.IOException;\nimport org.apache.hc.client5.http.classic.methods.HttpGet;\nimport org.apache.hc.client5.http.impl.classic.CloseableHttpClient;\nimport org.apache.hc.client5.http.impl.classic.HttpClients;\nimport io.github.acm19.aws.interceptor.http.AwsRequestSigningApacheV5Interceptor;\nimport software.amazon.awssdk.auth.credentials.DefaultCredentialsProvider;\nimport software.amazon.awssdk.http.auth.aws.signer.AwsV4HttpSigner;\nimport software.amazon.awssdk.regions.Region;\nimport software.amazon.awssdk.utils.IoUtils;\n\nfinal class Example {\n    public static void main(String[] args) throws IOException {\n        AwsRequestSigningApacheV5Interceptor interceptor = new AwsRequestSigningApacheV5Interceptor(\n                \"service\",\n                AwsV4HttpSigner.create(),\n                DefaultCredentialsProvider.builder().build(),\n                Region.US_WEST_2\n        );\n\n        try (CloseableHttpClient client = HttpClients.custom()\n                .addExecInterceptorLast(\"aws-signing-interceptor\", interceptor)\n                .build()) {\n            HttpGet httpGet = new HttpGet(\"https://...\");\n            client.execute(httpGet, response -\u003e {\n                System.out.println(response.getCode());\n                System.out.println(IoUtils.toUtf8String(response.getEntity().getContent()));\n            });\n        }\n    }\n}\n```\n\n## Examples\n\n### Apache HTTP Client\n\nTo run the [Amazon OpenSearch Sample](src/test/java/io/github/acm19/aws/interceptor/test/AmazonOpenSearchServiceSample.java) pass the values of `endpoint` and `region` into `exec.args`.\n\n```\nexport AWS_ACCESS_KEY_ID=\nexport AWS_SECRET_ACCESS_KEY=\nexport AWS_SESSION_TOKEN=\n\nmvn test-compile exec:java -Dexec.classpathScope=test -Dexec.mainClass=\"io.github.acm19.aws.interceptor.test.AmazonOpenSearchServiceSample\" -Dexec.args=\"--endpoint=https://...us-west-2.es.amazonaws.com --region=us-west-2 --service=es\"\n```\n\nAlternatively use `make` as follows:\n\n```\nENDPOINT=\u003cyour-endpoint\u003e SERVICE=es REGION=\u003cyour-region\u003e SERVICE=es make run_sample\n```\n\nSee [examples](src/test/java/io/github/acm19/aws/interceptor/test) for more valid requests.\n\n### Apache HTTP Client V5\n\nTo run the [Amazon OpenSearch Sample](src/test/java/io/github/acm19/aws/interceptorv5/test/AmazonOpenSearchServiceSample.java) pass the values of `endpoint` and `region` into `exec.args`.\n\n```\nexport AWS_ACCESS_KEY_ID=\nexport AWS_SECRET_ACCESS_KEY=\nexport AWS_SESSION_TOKEN=\n\nmvn test-compile exec:java -Dexec.classpathScope=test -Dexec.mainClass=\"io.github.acm19.aws.interceptorv5.test.AmazonOpenSearchServiceSample\" -Dexec.args=\"--endpoint=https://...us-west-2.aoss.amazonaws.com --region=us-west-2 --service=aoss\"\n```\n\nAlternatively use `make` as follows:\n\n```\nENDPOINT=\u003cyour-endpoint\u003e REGION=\u003cyour-region\u003e SERVICE=aoss make run_v5_sample\n```\n\nSee [examples](src/test/java/io/github/acm19/aws/interceptorv5/test) for more valid requests.\n\n## Contributing\n\nYou're encouraged to contribute to this project. See [CONTRIBUTING](CONTRIBUTING.md) for details.\n\n## Copyright\n\nCopyright Amazon.com, Inc. or its affiliates, and Project Contributors.\nSee [NOTICE](NOTICE) for details.\n\n## License\n\nThis library is licensed under the [Apache 2.0 License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facm19%2Faws-request-signing-apache-interceptor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Facm19%2Faws-request-signing-apache-interceptor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facm19%2Faws-request-signing-apache-interceptor/lists"}