{"id":18364020,"url":"https://github.com/tritondatacenter/java-http-signature","last_synced_at":"2026-01-11T17:46:37.516Z","repository":{"id":52315389,"uuid":"45357290","full_name":"TritonDataCenter/java-http-signature","owner":"TritonDataCenter","description":"Library for performing RSA signed HTTP requests in Java","archived":false,"fork":false,"pushed_at":"2023-05-09T18:07:40.000Z","size":413,"stargazers_count":17,"open_issues_count":8,"forks_count":13,"subscribers_count":33,"default_branch":"master","last_synced_at":"2025-04-06T15:41:09.266Z","etag":null,"topics":["http-signature","java","joyent","manta","triton"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TritonDataCenter.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","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}},"created_at":"2015-11-01T21:00:48.000Z","updated_at":"2024-10-16T17:21:56.000Z","dependencies_parsed_at":"2025-04-06T15:34:38.815Z","dependency_job_id":"7f930b58-a654-40e7-94d7-a539428dbc39","html_url":"https://github.com/TritonDataCenter/java-http-signature","commit_stats":null,"previous_names":["joyent/java-http-signature"],"tags_count":33,"template":false,"template_full_name":null,"purl":"pkg:github/TritonDataCenter/java-http-signature","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TritonDataCenter%2Fjava-http-signature","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TritonDataCenter%2Fjava-http-signature/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TritonDataCenter%2Fjava-http-signature/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TritonDataCenter%2Fjava-http-signature/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TritonDataCenter","download_url":"https://codeload.github.com/TritonDataCenter/java-http-signature/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TritonDataCenter%2Fjava-http-signature/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260639087,"owners_count":23040443,"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":["http-signature","java","joyent","manta","triton"],"created_at":"2024-11-05T23:08:53.040Z","updated_at":"2026-01-11T17:46:37.486Z","avatar_url":"https://github.com/TritonDataCenter.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/joyent/java-http-signature.svg?branch=master)](https://travis-ci.org/joyent/java-http-signature)\n\n# Java HTTP Signature Utilities\n\n[java-http-signature](https://github.com/joyent/java-http-signature) is a \ncommunity maintained set of utilities for making HTTP Signature requests against\nthe [Joyent Public Cloud](http://www.joyent.com).\n\nThis project is a fork of the code that once existed as part of the \n[Java Manta SDK](http://joyent.github.com/java-manta). Currently, this project\ninteracts directly with [Bouncy Castle](https://www.bouncycastle.org/) to create \nHTTP Signatures. In the future, we may use a project like \n[httpsig-java](https://github.com/adamcin/httpsig-java)\nor [http-signatures-java](https://github.com/tomitribe/http-signatures-java) to\ndo the signing.\n\n## Installation\n\n### Requirements\n* [Java 1.8](http://www.oracle.com/technetwork/java/javase/downloads/index.html) or higher.\n* [Maven 3.3](https://maven.apache.org/)\n\n## Using Maven\nAdd the latest dependency to your Maven `pom.xml`.\n\nFor Apache HTTP Client AuthScheme support: \n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.joyent.http-signature\u003c/groupId\u003e\n    \u003cartifactId\u003eapache-http-client-signature\u003c/artifactId\u003e\n    \u003cversion\u003eLATEST\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nFor Google HTTP Client support:\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.joyent.http-signature\u003c/groupId\u003e\n    \u003cartifactId\u003egoogle-http-client-signature\u003c/artifactId\u003e\n    \u003cversion\u003eLATEST\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nFor JAX-RS Client support:\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.joyent.http-signature\u003c/groupId\u003e\n    \u003cartifactId\u003ejaxrs-client-signature\u003c/artifactId\u003e\n    \u003cversion\u003eLATEST\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### From Source\nIf you prefer to build from source, you'll also need\n[Maven](https://maven.apache.org/), and then invoke:\n\n``` bash\n# mvn package\n```\n\n## Usage\n\n### Thread Safety Warning\n\nThe Java Cryptographic Extensions Signature class is not thread safe,\nbut it is entirely likely that you will want to use multiple threads\nto generate HTTP signatures. You can solve this problem by using the\nincluded `ThreadLocalSigner` class. However, this class has the limitation\nof storing one Signer class per invoking thread. Be very careful that\nyou properly shut down your threads and do not accidentally create a\nmemory leak. To nuke all of the thread references, you can call the \n`clearAll()` method on `ThreadLocalSigner`.\n\nThe `ThreadLocal` approach is used by default in the `jaxrs-client`,\nthe `google-http-client` and the `apache-http-client` modules.\n\n### Google HTTP Client Integration\n\nYou will need to create a HttpSigner object and then use that object as part\nof an Interceptor to sign the request object. For example:\n\n```java\npublic static HttpRequestFactory buildRequestFactory() {\n    String keyPath = \"/path/to/my/rsa/key\";\n    String login = \"account_name\";\n    String fingerprint = \"b2:b2:b2:b2:b2:b2:b2:b2:f7:f7:f7:f7:f7:f7:f7:f7\";\n    HttpSignerUtils.getKeyPair(new File(keyPath).toPath()); \n    HttpSigner signer = new HttpSigner(keyPair, login, fingerprint);\n    \n    HttpExecuteInterceptor signingInterceptor = new HttpExecuteInterceptor() {\n        @Override\n        public void intercept(final HttpRequest request) throws IOException {\n            httpSigner.signRequest(request);\n        }\n    };\n    \n    HttpRequestInitializer initializer = new HttpRequestInitializer() {\n        @Override\n        public void initialize(final HttpRequest request) throws IOException {\n            request.setInterceptor(signingInterceptor);\n            request.setParser(new JsonObjectParser(JSON_FACTORY));\n        }\n    };\n    \n    HttpTransport transport = new NetHttpTransport();\n    \n    return transport.createRequestFactory(initializer);\n}\n```\n\n### JAX-RS Client Integration\n\nTo use the JAX-RS Client integration, instantiate a `SignedRequestClientRequestFilter` with\nthe proper credentials, then register this instance with the JAX-RS Client.\nFor example:\n\n```java\n    String keyPath = \"/path/to/my/rsa/key\";\n    String login = \"account_name\";\n    String fingerprint = \"b2:b2:b2:b2:b2:b2:b2:b2:f7:f7:f7:f7:f7:f7:f7:f7\";\n    final SignedRequestClientRequestFilter signedRequestClientRequestFilter = new SignedRequestClientRequestFilter(\n        login,\n        fingerprint,\n        keyPath\n    );\n\n    Response response = ClientBuilder.newClient()\n        .register(signedRequestClientRequestFilter)\n        .target(endpointBaseUrl.toURI())\n        .request(MediaType.APPLICATION_JSON_TYPE)\n        .get();\n```                \n\n## Contributions\n\nContributions welcome! Please read the [CONTRIBUTING.md](CONTRIBUTING.md) document for details\non getting started.\n\n### Releasing\n\nPlease refer to the [release documentation](RELEASING.md).\n\n### Bugs\n\nSee \u003chttps://github.com/joyent/java-http-signature/issues\u003e.\n\n## License\nJava HTTP Signatures is licensed under the MPLv2. Please see the \n[LICENSE.txt](LICENSE.txt) file for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftritondatacenter%2Fjava-http-signature","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftritondatacenter%2Fjava-http-signature","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftritondatacenter%2Fjava-http-signature/lists"}