Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,14 @@ Please do not file GitHub issues or post on our public forum for security vulner

Infisical takes security issues very seriously. If you have any concerns about Infisical or believe you have uncovered a vulnerability, please get in touch via the e-mail address security@infisical.com. In the message, try to provide a description of the issue and ideally a way of reproducing it. The security team will get back to you as soon as possible.

Note that this security address should be used only for undisclosed vulnerabilities. Please report any security problems to us before disclosing it publicly.
Note that this security address should be used only for undisclosed vulnerabilities. Please report any security problems to us before disclosing it publicly.

## Contributing
### Code style

The non-generated Java code in this project should be formatted with [google-java-format](https://github.com/google/google-java-format).
To run it for all the Java files in the project, use the following command:

```bash
docker-compose run format
```
15 changes: 15 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: '3.8'

services:
format:
image: cimg/openjdk:21.0
volumes:
- .:/app
working_dir: /app
environment:
- GOOGLE_JAVA_FORMAT_VERSION=1.30.0
command: >
bash -c '
curl -sSL https://github.com/google/google-java-format/releases/download/v${GOOGLE_JAVA_FORMAT_VERSION}/google-java-format-${GOOGLE_JAVA_FORMAT_VERSION}-all-deps.jar -o /tmp/google-java-format.jar &&
java -jar /tmp/google-java-format.jar --replace $(find . -type f -name "*.java")
'
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>1.5.13</version>
<version>1.5.19</version>
Copy link

@PrathameshBhagat PrathameshBhagat Oct 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just mentioning, #12.

Updating logback classic and core will resolve this issue too.

</dependency>

<dependency>
Expand All @@ -95,7 +95,7 @@
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.5.6</version>
<version>1.5.19</version>
</dependency>

<!-- HTTP request dependencies-->
Expand Down
31 changes: 15 additions & 16 deletions src/main/java/com/infisical/sdk/InfisicalSdk.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,39 @@
import com.infisical.sdk.resources.AuthClient;
import com.infisical.sdk.resources.FoldersClient;
import com.infisical.sdk.resources.SecretsClient;
import com.squareup.okhttp.OkHttpClient;
import com.squareup.okhttp.Request;


public class InfisicalSdk {
private SecretsClient secretsClient;
private FoldersClient foldersClient;
private AuthClient authClient;
private SecretsClient secretsClient;
private FoldersClient foldersClient;
private AuthClient authClient;

private ApiClient apiClient;
private ApiClient apiClient;

public InfisicalSdk(SdkConfig config) {

this.apiClient = new ApiClient(config.getSiteUrl(), null);
this.apiClient = new ApiClient(config.getSiteUrl(), null);

this.authClient = new AuthClient(apiClient, this::onAuthenticate);
this.secretsClient = new SecretsClient(apiClient);
}

private void onAuthenticate(String accessToken) {
this.apiClient = new ApiClient(apiClient.GetBaseUrl(), accessToken);
this.apiClient = new ApiClient(apiClient.GetBaseUrl(), accessToken);

this.secretsClient = new SecretsClient(apiClient);
this.foldersClient = new FoldersClient(apiClient);
this.authClient = new AuthClient(apiClient, this::onAuthenticate);
this.secretsClient = new SecretsClient(apiClient);
this.foldersClient = new FoldersClient(apiClient);
this.authClient = new AuthClient(apiClient, this::onAuthenticate);
}

public AuthClient Auth() {
return this.authClient;
return this.authClient;
}

public SecretsClient Secrets() {
return this.secretsClient;
return this.secretsClient;
}

public FoldersClient Folders() {
return this.foldersClient;
return this.foldersClient;
}
}
}
Loading