{"id":18636697,"url":"https://github.com/localstack/aws-java-sdk-v2-trust-certs-patch","last_synced_at":"2026-02-17T02:35:27.017Z","repository":{"id":196067445,"uuid":"694233687","full_name":"localstack/aws-java-sdk-v2-trust-certs-patch","owner":"localstack","description":"A small java agent to patch the AWS Java SDK v2 to disable certificate name validation.","archived":false,"fork":false,"pushed_at":"2024-11-10T15:41:38.000Z","size":72,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":16,"default_branch":"main","last_synced_at":"2024-12-27T09:11:59.908Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/localstack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-09-20T15:31:30.000Z","updated_at":"2024-11-10T15:41:39.000Z","dependencies_parsed_at":"2023-09-21T07:13:30.412Z","dependency_job_id":null,"html_url":"https://github.com/localstack/aws-java-sdk-v2-trust-certs-patch","commit_stats":null,"previous_names":["localstack/aws-java-sdk-v2-trust-certs-patch"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localstack%2Faws-java-sdk-v2-trust-certs-patch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localstack%2Faws-java-sdk-v2-trust-certs-patch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localstack%2Faws-java-sdk-v2-trust-certs-patch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localstack%2Faws-java-sdk-v2-trust-certs-patch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/localstack","download_url":"https://codeload.github.com/localstack/aws-java-sdk-v2-trust-certs-patch/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239433908,"owners_count":19637806,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-07T05:31:17.575Z","updated_at":"2025-10-14T01:08:29.106Z","avatar_url":"https://github.com/localstack.png","language":"Java","readme":"# AWS Java SDK v2 - Trust all Certificates Patch\n\n## Overview\n\nThis repository contains the code to a small java agent, which will disable the certificate name validation for your [AWS Java SDK v2](https://github.com/aws/aws-sdk-java-v2) clients.\n\nThis tool was made necessary due to the decision of the AWS Java SDK team to remove the global configuration option for this functionality with the AWS SDK v2. See: aws/aws-sdk-java-v2#1230\n\nFor the AWS Java SDK v1, please set the [`-Dcom.amazonaws.sdk.disableCertChecking`](https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/SDKGlobalConfiguration.html#DISABLE_CERT_CHECKING_SYSTEM_PROPERTY) system property.\n\n**Warning**: Please note that the usage of this tool is meant for testing/development purposes only.\nPlease do not disable certificate name validation on your production stack.\n\n## Usage\n\n1) Download the latest [release](https://github.com/localstack/aws-java-sdk-v2-trust-certs-patch/releases)\n2) Load the jar file as java agent using `-javaagent:\u003cpath-to-file\u003e` either specified as command line argument, or setting it in the `JAVA_TOOL_OPTIONS` environment variable when starting your process like this: `JAVA_TOOL_OPTIONS=-javaagent:\u003cpath-to-file\u003e`.\n3) You can now use for example DNS to redirect your SDK calls to any endpoint you want, e.g. to [LocalStack](https://github.com/localstack/localstack).\n\nPlease remember to use a separate profile/configuration for your development and production environments, to avoid accidentally disabling the certificate name verification in production.\n\n## How does it work?\n\nThis utility works by using [java instrumentation](https://docs.oracle.com/javase/8/docs/api/java/lang/instrument/package-summary.html) to set the [`TRUST_ALL_CERTIFICATES`](https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/http/SdkHttpConfigurationOption.html#TRUST_ALL_CERTIFICATES) option per default on all created clients.\nIt does so by merging passed AttributeMaps of the SDK with a new one setting this option in the `buildWithDefaults` methods of all client builders.\n\nThis tool uses [javassist](https://www.javassist.org/) to insert and compile the bytecode on the load of the respective client classes.\n\n## Supported HTTP Clients\n\nThis tools supports the following http clients, if used:\n\nSynchronous:\n\n* [ApacheHttpClient](https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/http/apache/ApacheHttpClient.html)\n* [UrlConnectionHttpClient](https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/http/urlconnection/UrlConnectionHttpClient.html)\n\nAsynchronous:\n\n* [NettyNioAsyncHttpClient](https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/http/nio/netty/NettyNioAsyncHttpClient.html)\n* [AwsCrtAsyncHttpClient](https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/http/crt/AwsCrtAsyncHttpClient.html)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flocalstack%2Faws-java-sdk-v2-trust-certs-patch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flocalstack%2Faws-java-sdk-v2-trust-certs-patch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flocalstack%2Faws-java-sdk-v2-trust-certs-patch/lists"}