Open-source, end-to-end encrypted tool to manage secrets and configs across your team and infrastructure.
- Java 1.8 or later
- Maven
The recommended way to use the Infisical SDK for Java in your project is to consume it from Maven.
First, Add sonatype release repositories in your pom.xml
file
<repositories>
<repository>
<id>sonatype</id>
<url>https://s01.oss.sonatype.org/content/repositories/releases/</url>
</repository>
<repository>
<id>sonatype</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
</repository>
</repositories>
Then import as follows:
<dependency>
<groupId>io.github.piyushchhabra</groupId>
<artifactId>infisical-client</artifactId>
<version>1.0.0</version>
</dependency>
Initialize the InfisicalClient
with your Infisical Token.
InfisicalClientOptions options = InfisicalClientOptions.builder()
.token("YOUR_TOKEN_HERE")
.cacheTtlInSeconds(60L)
.debugMode(true)
.build();
InfisicalClient client = new InfisicalClient(options);
Parameter | Type | Description |
---|---|---|
token |
string |
An Infisical Token scoped to a project and environment. |
siteURL |
string |
Your self-hosted Infisical site URL. Default: https://app.infisical.com . |
cacheTtlInSeconds |
number |
Time-to-live (in seconds) for refreshing cached secrets. Minimum: 60 and Default: 300 . |
debugMode |
boolean |
Turns debug mode on or off. Default: false . |
Bug fixes, docs, and library improvements are always welcome. Please refer to our Contributing Guide for detailed information on how you can contribute.