Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

Feat: Added project slug support

Daniel Hougaard11edefa66faf
diff --git a/k8-operator/packages/api/api.go b/k8-operator/packages/api/api.go
index e69930ce13..05a58e8cb4 100644
--- a/k8-operator/packages/api/api.go
+++ b/k8-operator/packages/api/api.go
@@ -153,7 +153,7 @@ func CallGetDecryptedSecretsV3(httpClient *resty.Client, request GetDecryptedSec
SetResult(&decryptedSecretsResponse).
SetHeader("User-Agent", USER_AGENT_NAME).
SetQueryParam("secretPath", request.SecretPath).
- SetQueryParam("workspaceId", request.ProjectID).
+ SetQueryParam("workspaceSlug", request.ProjectSlug).
SetQueryParam("environment", request.Environment).
Get(fmt.Sprintf("%v/v3/secrets/raw", API_HOST_URL))
diff --git a/k8-operator/packages/api/models.go b/k8-operator/packages/api/models.go
index fa618791b9..ff4ea3e100 100644
--- a/k8-operator/packages/api/models.go
+++ b/k8-operator/packages/api/models.go
@@ -97,7 +97,7 @@ type GetDecryptedSecretsV3Response struct {
}
type GetDecryptedSecretsV3Request struct {
- ProjectID string `json:"projectId"`
+ ProjectSlug string `json:"workspaceSlug"`
Environment string `json:"environment"`
SecretPath string `json:"secretPath"`
ETag string `json:"etag,omitempty"`
diff --git a/k8-operator/packages/util/secrets.go b/k8-operator/packages/util/secrets.go
index 3c9eca3e3a..6321e1582a 100644
--- a/k8-operator/packages/util/secrets.go
+++ b/k8-operator/packages/util/secrets.go
@@ -58,7 +58,7 @@ func GetPlainTextSecretsViaUniversalAuthMachineIdentity(accessToken string, etag
httpClient.SetAuthToken(accessToken)
secretsResponse, err := api.CallGetDecryptedSecretsV3(httpClient, api.GetDecryptedSecretsV3Request{
- ProjectID: secretScope.ProjectId,
+ ProjectSlug: secretScope.ProjectSlug,
Environment: secretScope.EnvSlug,
SecretPath: secretScope.SecretsPath,
ETag: etag,