{"id":21396891,"url":"https://github.com/stklcode/jvaultconnector","last_synced_at":"2025-07-09T11:04:09.205Z","repository":{"id":38814888,"uuid":"54739472","full_name":"stklcode/jvaultconnector","owner":"stklcode","description":"Java Vault Connector - Connect Hashicorp's Vault with your Java application.","archived":false,"fork":false,"pushed_at":"2024-09-07T11:04:21.000Z","size":1084,"stargazers_count":8,"open_issues_count":3,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-09-07T12:25:04.626Z","etag":null,"topics":["connector","java","secret","vault"],"latest_commit_sha":null,"homepage":"https://jvault.stklcode.de","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/stklcode.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":"2016-03-25T18:42:01.000Z","updated_at":"2024-09-07T11:04:25.000Z","dependencies_parsed_at":"2023-02-16T19:31:19.513Z","dependency_job_id":"ae079d20-832f-4b64-b563-55729060845c","html_url":"https://github.com/stklcode/jvaultconnector","commit_stats":null,"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stklcode%2Fjvaultconnector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stklcode%2Fjvaultconnector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stklcode%2Fjvaultconnector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stklcode%2Fjvaultconnector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stklcode","download_url":"https://codeload.github.com/stklcode/jvaultconnector/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225912118,"owners_count":17544098,"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":["connector","java","secret","vault"],"created_at":"2024-11-22T14:30:18.452Z","updated_at":"2025-07-09T11:04:09.188Z","avatar_url":"https://github.com/stklcode.png","language":"Java","readme":"# Java Vault Connector\n\n[![CI](https://github.com/stklcode/jvaultconnector/actions/workflows/ci.yml/badge.svg)](https://github.com/stklcode/jvaultconnector/actions/workflows/ci.yml)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=de.stklcode.jvault%3Ajvault-connector\u0026metric=alert_status)](https://sonarcloud.io/summary/new_code?id=de.stklcode.jvault%3Ajvault-connector)\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/stklcode/jvaultconnector/blob/main/LICENSE.txt)\n[![Maven Central Version](https://img.shields.io/maven-central/v/de.stklcode.jvault/jvault-connector)](https://central.sonatype.com/artifact/de.stklcode.jvault/jvault-connector)\n\n![Logo](assets/logo.png)\n\nJava Vault Connector is a connector library for [Vault](https://www.vaultproject.io) by [Hashicorp](https://www.hashicorp.com) written in Java. The connector allows simple usage of Vault's secret store in own applications.\n\n## Features:\n\n* HTTP(S) backend connector\n    * Ability to provide or enforce custom CA certificate\n    * Optional initialization from environment variables\n* Authorization methods\n    * Token\n    * Username/Password\n    * AppRole (register and authenticate)\n* Tokens\n    * Creation and lookup of tokens and token roles\n    * TokenBuilder for speaking creation of complex configurations\n* Secrets\n    * Read secrets\n    * Write secrets\n    * List secrets\n    * Delete secrets\n    * Renew/revoke leases\n    * Raw secret content or JSON decoding\n    * KV v1 and v2 support\n    * Database secret handling\n* Transit API support\n* Connector Factory with builder pattern\n* Tested against Vault 1.2 to 1.20\n\n\n## Maven Artifact\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ede.stklcode.jvault\u003c/groupId\u003e\n    \u003cartifactId\u003ejvault-connector\u003c/artifactId\u003e\n    \u003cversion\u003e1.5.1\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## Usage Examples\n\n### Initialization\n\n```java\n// Instantiate using builder pattern style factory (TLS enabled by default)\nVaultConnector vault = HTTPVaultConnector.builder()\n .withHost(\"127.0.0.1\")\n .withPort(8200)\n .withTLS()\n .build();\n\n// Instantiate with custom SSL context\nVaultConnector vault = HTTPVaultConnector.builder(\"https://example.com:8200/v1/\")\n .withTrustedCA(Paths.get(\"/path/to/CA.pem\"))\n .build();\n\n// Initialization from environment variables\nVaultConnector vault = HTTPVaultConnector.builder()\n .fromEnv()\n .build();\n```\n\n### Authentication\n\n```java\n// Authenticate with token.\nvault.authToken(\"01234567-89ab-cdef-0123-456789abcdef\");\n\n// Authenticate with username and password.\nvault.authUserPass(\"username\", \"p4ssw0rd\");\n\n// Authenticate with AppRole (secret - 2nd argument - is optional).\nvault.authAppRole(\"01234567-89ab-cdef-0123-456789abcdef\", \"fedcba98-7654-3210-fedc-ba9876543210\");\n```\n\n### Secret read \u0026 write\n\n```java\n// Retrieve secret (prefix \"secret/\" assumed, use read() to read arbitrary paths)\nString secret = vault.read(\"secret/some/key\").get(\"value\", String.class);\n\n// Complex secret.\nMap\u003cString, Object\u003e secretData = vault.read(\"secret/another/key\").getData();\n\n// Write simple secret.\nvault.write(\"secret/new/key\", \"secret value\");\n\n// Write complex data.\nMap\u003cString, Object\u003e map = ...;\nvault.write(\"path/to/write\", map);\n\n// Delete secret.\nvault.delete(\"path/to/delete\");\n```\n\n### Token and role creation\n\n```java\n// Create token using TokenBuilder\nToken token = Token.builder()\n                   .withId(\"token id\")\n                   .withDisplayName(\"new test token\")\n                   .withPolicies(\"pol1\", \"pol2\")\n                   .build();\nvault.createToken(token);\n\n// Create AppRole credentials\nvault.createAppRole(\"testrole\", policyList);\nAppRoleSecretResponse secret = vault.createAppRoleSecret(\"testrole\");\n```\n\n## Links\n\n[Project Page](https://jvault.stklcode.de)\n\n[JavaDoc API](https://jvault.stklcode.de/apidocs/)\n\n## License\n\nThe project is licensed under [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstklcode%2Fjvaultconnector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstklcode%2Fjvaultconnector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstklcode%2Fjvaultconnector/lists"}