This commit is contained in:
x032205
2025-06-09 10:01:56 -04:00
parent ca39e75434
commit 8ab710817d
12 changed files with 26 additions and 17 deletions

View File

@@ -69,7 +69,9 @@ export const GcpIamProvider = (): TDynamicProviderFns => {
return true;
};
const create = async (inputs: unknown, expireAt: number) => {
const create = async (data: { inputs: unknown; expireAt: number }) => {
const { inputs, expireAt } = data;
const providerInputs = await validateProviderInputs(inputs);
const now = Math.floor(Date.now() / 1000);
@@ -88,7 +90,7 @@ export const GcpIamProvider = (): TDynamicProviderFns => {
const renew = async (inputs: unknown, entityId: string, expireAt: number) => {
// To renew a token it must be re-created
const data = await create(inputs, expireAt);
const data = await create({ inputs, expireAt });
return { ...data, entityId };
};

View File

@@ -427,7 +427,7 @@ export const DynamicSecretTotpSchema = z.discriminatedUnion("configType", [
]);
export const DynamicSecretGcpIamSchema = z.object({
serviceAccountEmail: z.string().email().trim().min(1, "Service account email required")
serviceAccountEmail: z.string().email().trim().min(1, "Service account email required").max(128)
});
export enum DynamicSecretProviders {

View File

@@ -128,7 +128,7 @@ The above configuration allows user creation and granting permissions.
![Provision Lease](/images/platform/dynamic-secrets/provision-lease.png)
<Tip>
Ensure that the TTL for the lease fall within the maximum TTL defined when configuring the dynamic secret in step 4.
Ensure that the TTL for the lease falls within the maximum TTL defined when configuring the dynamic secret in step 4.
</Tip>

View File

@@ -127,15 +127,15 @@ The port that your Elasticsearch instance is running on. _(Example: 9200)_
To do this, simply click on the 'Generate' button which appears when hovering over the dynamic secret item.
Alternatively, you can initiate the creation of a new lease by selecting 'New Lease' from the dynamic secret lease list section.
![Dynamic Secret](/images/platform/dynamic-secrets/dynamic-secret-generate-redis.png)
![Dynamic Secret](/images/platform/dynamic-secrets/dynamic-secret-lease-empty-redis.png)
![Dynamic Secret](/images/platform/dynamic-secrets/dynamic-secret-generate.png)
![Dynamic Secret](/images/platform/dynamic-secrets/dynamic-secret-lease-empty.png)
When generating these secrets, it's important to specify a Time-to-Live (TTL) duration. This will dictate how long the credentials are valid for.
![Provision Lease](/images/platform/dynamic-secrets/provision-lease.png)
<Tip>
Ensure that the TTL for the lease fall within the maximum TTL defined when configuring the dynamic secret.
Ensure that the TTL for the lease falls within the maximum TTL defined when configuring the dynamic secret.
</Tip>

View File

@@ -457,7 +457,7 @@ When generating these secrets, it's important to specify a Time-to-Live (TTL) du
![Provision Lease](/images/platform/dynamic-secrets/provision-lease.png)
<Tip>
Ensure that the TTL for the lease fall within the maximum TTL defined when
Ensure that the TTL for the lease falls within the maximum TTL defined when
configuring the dynamic secret.
</Tip>

View File

@@ -119,7 +119,7 @@ Create a user with the required permission in your SQL instance. This user will
![Provision Lease](/images/platform/dynamic-secrets/provision-lease.png)
<Tip>
Ensure that the TTL for the lease fall within the maximum TTL defined when configuring the dynamic secret.
Ensure that the TTL for the lease falls within the maximum TTL defined when configuring the dynamic secret.
</Tip>

View File

@@ -109,15 +109,15 @@ The port that the RabbitMQ management plugin is listening on. This is `15672` by
To do this, simply click on the 'Generate' button which appears when hovering over the dynamic secret item.
Alternatively, you can initiate the creation of a new lease by selecting 'New Lease' from the dynamic secret lease list section.
![Dynamic Secret](/images/platform/dynamic-secrets/dynamic-secret-generate-redis.png)
![Dynamic Secret](/images/platform/dynamic-secrets/dynamic-secret-lease-empty-redis.png)
![Dynamic Secret](/images/platform/dynamic-secrets/dynamic-secret-generate.png)
![Dynamic Secret](/images/platform/dynamic-secrets/dynamic-secret-lease-empty.png)
When generating these secrets, it's important to specify a Time-to-Live (TTL) duration. This will dictate how long the credentials are valid for.
![Provision Lease](/images/platform/dynamic-secrets/provision-lease.png)
<Tip>
Ensure that the TTL for the lease fall within the maximum TTL defined when configuring the dynamic secret.
Ensure that the TTL for the lease falls within the maximum TTL defined when configuring the dynamic secret.
</Tip>

View File

@@ -112,7 +112,7 @@ Due to SAP ASE limitations, the attached SQL statements are not executed as a tr
![Provision Lease](/images/platform/dynamic-secrets/provision-lease.png)
<Tip>
Ensure that the TTL for the lease fall within the maximum TTL defined when configuring the dynamic secret in step 4.
Ensure that the TTL for the lease falls within the maximum TTL defined when configuring the dynamic secret in step 4.
</Tip>

View File

@@ -119,7 +119,7 @@ The Infisical SAP HANA dynamic secret allows you to generate SAP HANA database c
![Provision Lease](/images/platform/dynamic-secrets/provision-lease.png)
<Tip>
Ensure that the TTL for the lease fall within the maximum TTL defined when configuring the dynamic secret in step 4.
Ensure that the TTL for the lease falls within the maximum TTL defined when configuring the dynamic secret in step 4.
</Tip>

View File

@@ -127,7 +127,7 @@ Infisical's Snowflake dynamic secrets allow you to generate Snowflake user crede
![Provision Lease](/images/platform/dynamic-secrets/provision-lease.png)
<Tip>
Ensure that the TTL for the lease fall within the maximum TTL defined when configuring the dynamic secret in
Ensure that the TTL for the lease falls within the maximum TTL defined when configuring the dynamic secret in
step 4.
</Tip>

View File

@@ -34,7 +34,8 @@ export enum DynamicSecretProviders {
Totp = "totp",
SapAse = "sap-ase",
Kubernetes = "kubernetes",
Vertica = "vertica"
Vertica = "vertica",
GcpIam = "gcp-iam"
}
export enum KubernetesDynamicSecretCredentialType {
@@ -326,6 +327,12 @@ export type TDynamicSecretProvider =
creationStatement: string;
revocationStatement: string;
};
}
| {
type: DynamicSecretProviders.GcpIam;
inputs: {
serviceAccountEmail: string;
};
};
export type TCreateDynamicSecretDTO = {

View File

@@ -27,8 +27,8 @@ import {
} from "@app/hooks/api/auth/queries";
import { MfaMethod } from "@app/hooks/api/auth/types";
import { fetchOrganizations } from "@app/hooks/api/organization/queries";
import { ProjectType } from "@app/hooks/api/workspace/types";
import { isLoggedIn } from "@app/hooks/api/reactQuery";
import { ProjectType } from "@app/hooks/api/workspace/types";
// eslint-disable-next-line new-cap
const client = new jsrp.client();