From ae075df0ec81397cd92ad1f44c43137530f2b0b8 Mon Sep 17 00:00:00 2001
From: Daniel Hougaard <62331820+DanielHougaard@users.noreply.github.com>
Date: Tue, 28 May 2024 00:11:33 +0200
Subject: [PATCH 1/5] Fix: Old docs
---
docs/documentation/guides/node.mdx | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/docs/documentation/guides/node.mdx b/docs/documentation/guides/node.mdx
index 8bd9e743b..d1b8fe5e8 100644
--- a/docs/documentation/guides/node.mdx
+++ b/docs/documentation/guides/node.mdx
@@ -46,16 +46,19 @@ Finally, create an index.js file containing the application code.
```js
const express = require('express');
-const { InfisicalClient, LogLevel } = require("@infisical/sdk");
+const { InfisicalClient } = require("@infisical/sdk");
const app = express();
const PORT = 3000;
const client = new InfisicalClient({
- clientId: "YOUR_CLIENT_ID",
- clientSecret: "YOUR_CLIENT_SECRET",
- logLevel: LogLevel.Error
+ auth: {
+ universalAuth: {
+ clientId: "YOUR_CLIENT_ID",
+ clientSecret: "YOUR_CLIENT_SECRET",
+ }
+ }
});
app.get("/", async (req, res) => {
From aca71a7b6f40c35cd6d273c429b798c985db7334 Mon Sep 17 00:00:00 2001
From: Daniel Hougaard <62331820+DanielHougaard@users.noreply.github.com>
Date: Tue, 28 May 2024 00:11:49 +0200
Subject: [PATCH 2/5] Docs: Azure documentation
---
docs/sdks/languages/csharp.mdx | 55 ++++++++++++++++++++++++++++++++++
1 file changed, 55 insertions(+)
diff --git a/docs/sdks/languages/csharp.mdx b/docs/sdks/languages/csharp.mdx
index fc87a1efe..90351a986 100644
--- a/docs/sdks/languages/csharp.mdx
+++ b/docs/sdks/languages/csharp.mdx
@@ -228,6 +228,61 @@ The SDK supports a variety of authentication methods. The most common authentica
var infisicalClient = new InfisicalClient(settings);
```
+
+#### Azure Auth
+
+ Please note that this authentication method will only work if you're running your application on Azure.
+ Please [read more](/documentation/platform/identities/azure-auth) about this authentication method.
+
+
+**Using environment variables**
+- `INFISICAL_AZURE_AUTH_IDENTITY_ID` - Your Infisical Machine Identity ID.
+
+**Using the SDK directly**
+```csharp
+ ClientSettings settings = new ClientSettings
+ {
+ Auth = new AuthenticationOptions
+ {
+ Azure = new AzureAuthMethod
+ {
+ IdentityId = "YOUR_IDENTITY_ID",
+ }
+ }
+ };
+
+ var infisicalClient = new InfisicalClient(settings);
+```
+
+#### Kubernetes Auth
+
+ Please note that this authentication method will only work if you're running your application on Kubernetes.
+ Please [read more](/documentation/platform/identities/kubernetes-auth) about this authentication method.
+
+
+**Using environment variables**
+- `INFISICAL_KUBERNETES_IDENTITY_ID` - Your Infisical Machine Identity ID.
+- `INFISICAL_KUBERNETES_SERVICE_ACCOUNT_TOKEN_PATH_ENV_NAME` - The environment variable name that contains the path to the service account token. This is optional and will default to `/var/run/secrets/kubernetes.io/serviceaccount/token`.
+
+**Using the SDK directly**
+```csharp
+ ClientSettings settings = new ClientSettings
+ {
+ Auth = new AuthenticationOptions
+ {
+ Kubernetes = new KubernetesAuthMethod
+ {
+ ServiceAccountTokenPath = "/var/run/secrets/kubernetes.io/serviceaccount/token", // Optional
+ IdentityId = "YOUR_IDENTITY_ID",
+ }
+ }
+ };
+
+ var infisicalClient = new InfisicalClient(settings);
+```
+
+
+
### Caching
To reduce the number of API requests, the SDK temporarily stores secrets it retrieves. By default, a secret remains cached for 5 minutes after it's first fetched. Each time it's fetched again, this 5-minute timer resets. You can adjust this caching duration by setting the "cacheTTL" option when creating the client.
From c7a8e1102e936013485e858e69b6e421506d2604 Mon Sep 17 00:00:00 2001
From: Daniel Hougaard <62331820+DanielHougaard@users.noreply.github.com>
Date: Tue, 28 May 2024 00:11:52 +0200
Subject: [PATCH 3/5] Docs: Azure documentation
---
docs/sdks/languages/java.mdx | 49 ++++++++++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)
diff --git a/docs/sdks/languages/java.mdx b/docs/sdks/languages/java.mdx
index 102b28355..879bfa624 100644
--- a/docs/sdks/languages/java.mdx
+++ b/docs/sdks/languages/java.mdx
@@ -221,6 +221,55 @@ The SDK supports a variety of authentication methods. The most common authentica
InfisicalClient client = new InfisicalClient(settings);
```
+#### Azure Auth
+
+ Please note that this authentication method will only work if you're running your application on Azure.
+ Please [read more](/documentation/platform/identities/azure-auth) about this authentication method.
+
+
+**Using environment variables**
+- `INFISICAL_AZURE_AUTH_IDENTITY_ID` - Your Infisical Machine Identity ID.
+
+**Using the SDK directly**
+```java
+ ClientSettings settings = new ClientSettings();
+ AuthenticationOptions authOptions = new AuthenticationOptions();
+ AzureAuthMethod authMethod = new AzureAuthMethod();
+
+ authMethod.setIdentityID("YOUR_IDENTITY_ID");
+
+ authOptions.setAzure(authMethod);
+ settings.setAuth(authOptions);
+
+ InfisicalClient client = new InfisicalClient(settings);
+```
+
+#### Kubernetes Auth
+
+ Please note that this authentication method will only work if you're running your application on Kubernetes.
+ Please [read more](/documentation/platform/identities/kubernetes-auth) about this authentication method.
+
+
+**Using environment variables**
+- `INFISICAL_KUBERNETES_IDENTITY_ID` - Your Infisical Machine Identity ID.
+- `INFISICAL_KUBERNETES_SERVICE_ACCOUNT_TOKEN_PATH_ENV_NAME` - The environment variable name that contains the path to the service account token. This is optional and will default to `/var/run/secrets/kubernetes.io/serviceaccount/token`.
+
+**Using the SDK directly**
+```java
+ ClientSettings settings = new ClientSettings();
+ AuthenticationOptions authOptions = new AuthenticationOptions();
+ KubernetesAuthMethod authMethod = new KubernetesAuthMethod();
+
+ authMethod.setIdentityID("YOUR_IDENTITY_ID");
+ authMethod.setServiceAccountTokenPath("/var/run/secrets/kubernetes.io/serviceaccount/token"); // Optional
+
+ authOptions.setKubernetes(authMethod);
+ settings.setAuth(authOptions);
+
+ InfisicalClient client = new InfisicalClient(settings);
+```
+
+
### Caching
To reduce the number of API requests, the SDK temporarily stores secrets it retrieves. By default, a secret remains cached for 5 minutes after it's first fetched. Each time it's fetched again, this 5-minute timer resets. You can adjust this caching duration by setting the "cacheTTL" option when creating the client.
From eb8acba0371c3601d78e6ead5d0b6af628015d85 Mon Sep 17 00:00:00 2001
From: Daniel Hougaard <62331820+DanielHougaard@users.noreply.github.com>
Date: Tue, 28 May 2024 00:11:55 +0200
Subject: [PATCH 4/5] Docs: Azure documentation
---
docs/sdks/languages/node.mdx | 46 +++++++++++++++++++++++++++++++++---
1 file changed, 43 insertions(+), 3 deletions(-)
diff --git a/docs/sdks/languages/node.mdx b/docs/sdks/languages/node.mdx
index c626d2dcd..1546451b8 100644
--- a/docs/sdks/languages/node.mdx
+++ b/docs/sdks/languages/node.mdx
@@ -14,7 +14,7 @@ If you're working with Node.js, the official [Infisical Node SDK](https://github
```js
import express from "express";
-import { InfisicalClient, LogLevel } from "@infisical/sdk";
+import { InfisicalClient } from "@infisical/sdk";
const app = express();
@@ -27,8 +27,7 @@ const client = new InfisicalClient({
clientId: "YOUR_CLIENT_ID",
clientSecret: "YOUR_CLIENT_SECRET"
}
- },
- logLevel: LogLevel.Error
+ }
});
app.get("/", async (req, res) => {
@@ -226,7 +225,48 @@ const client = new InfisicalClient({
});
```
+#### Azure Auth
+
+ Please note that this authentication method will only work if you're running your application on Azure.
+ Please [read more](/documentation/platform/identities/azure-auth) about this authentication method.
+
+**Using environment variables**
+- `INFISICAL_AZURE_AUTH_IDENTITY_ID` - Your Infisical Machine Identity ID.
+
+**Using the SDK directly**
+```js
+const client = new InfisicalClient({
+ auth: {
+ azure: {
+ identityId: "YOUR_IDENTITY_ID"
+ }
+ }
+});
+```
+
+
+#### Kubernetes Auth
+
+ Please note that this authentication method will only work if you're running your application on Kubernetes.
+ Please [read more](/documentation/platform/identities/kubernetes-auth) about this authentication method.
+
+
+**Using environment variables**
+- `INFISICAL_KUBERNETES_IDENTITY_ID` - Your Infisical Machine Identity ID.
+- `INFISICAL_KUBERNETES_SERVICE_ACCOUNT_TOKEN_PATH_ENV_NAME` - The environment variable name that contains the path to the service account token. This is optional and will default to `/var/run/secrets/kubernetes.io/serviceaccount/token`.
+
+**Using the SDK directly**
+```js
+const client = new InfisicalClient({
+ auth: {
+ kubernetes: {
+ identityId: "YOUR_IDENTITY_ID",
+ serviceAccountTokenPathEnvName: "/var/run/secrets/kubernetes.io/serviceaccount/token" // Optional
+ }
+ }
+});
+```
### Caching
From a6dd36f6842313d3da10a58374da568c066013f4 Mon Sep 17 00:00:00 2001
From: Daniel Hougaard <62331820+DanielHougaard@users.noreply.github.com>
Date: Tue, 28 May 2024 00:11:57 +0200
Subject: [PATCH 5/5] Docs: Azure documentation
---
docs/sdks/languages/python.mdx | 47 ++++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)
diff --git a/docs/sdks/languages/python.mdx b/docs/sdks/languages/python.mdx
index d0a504b1f..d9ab49688 100644
--- a/docs/sdks/languages/python.mdx
+++ b/docs/sdks/languages/python.mdx
@@ -201,6 +201,53 @@ client = InfisicalClient(ClientSettings(
))
```
+#### Azure Auth
+
+ Please note that this authentication method will only work if you're running your application on Azure.
+ Please [read more](/documentation/platform/identities/azure-auth) about this authentication method.
+
+
+**Using environment variables**
+- `INFISICAL_AZURE_AUTH_IDENTITY_ID` - Your Infisical Machine Identity ID.
+
+**Using the SDK directly**
+```python
+from infisical_client import InfisicalClient, ClientSettings, AuthenticationOptions, AzureAuthMethod
+
+kubernetes_client = InfisicalClient(ClientSettings(
+ auth=AuthenticationOptions(
+ azure=AzureAuthMethod(
+ identity_id="YOUR_IDENTITY_ID",
+ )
+ )
+))
+```
+
+
+#### Kubernetes Auth
+
+ Please note that this authentication method will only work if you're running your application on Kubernetes.
+ Please [read more](/documentation/platform/identities/kubernetes-auth) about this authentication method.
+
+
+**Using environment variables**
+- `INFISICAL_KUBERNETES_IDENTITY_ID` - Your Infisical Machine Identity ID.
+- `INFISICAL_KUBERNETES_SERVICE_ACCOUNT_TOKEN_PATH_ENV_NAME` - The environment variable name that contains the path to the service account token. This is optional and will default to `/var/run/secrets/kubernetes.io/serviceaccount/token`.
+
+**Using the SDK directly**
+```python
+from infisical_client import InfisicalClient, ClientSettings, AuthenticationOptions, KubernetesAuthMethod
+
+kubernetes_client = InfisicalClient(ClientSettings(
+ auth=AuthenticationOptions(
+ kubernetes=KubernetesAuthMethod(
+ identity_id="YOUR_IDENTITY_ID",
+ service_account_token_path="/var/run/secrets/kubernetes.io/serviceaccount/token" # Optional
+ )
+ )
+))
+```
+
### Caching
To reduce the number of API requests, the SDK temporarily stores secrets it retrieves. By default, a secret remains cached for 5 minutes after it's first fetched. Each time it's fetched again, this 5-minute timer resets. You can adjust this caching duration by setting the "cache_ttl" option when creating the client.