mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 02:51:51 +00:00
Merge remote-tracking branch 'origin/main' into pki-revamp-v3
This commit is contained in:
@@ -129,7 +129,7 @@ export const registerKmipSpecRouter = async (server: FastifyZodProvider) => {
|
||||
id: z.string(),
|
||||
value: z.string(),
|
||||
algorithm: z.string(),
|
||||
kmipMetadata: z.record(z.any()).optional()
|
||||
kmipMetadata: z.record(z.any()).nullish()
|
||||
})
|
||||
}
|
||||
},
|
||||
@@ -435,7 +435,7 @@ export const registerKmipSpecRouter = async (server: FastifyZodProvider) => {
|
||||
key: z.string(),
|
||||
name: z.string(),
|
||||
algorithm: z.nativeEnum(SymmetricKeyAlgorithm),
|
||||
kmipMetadata: z.record(z.any()).optional()
|
||||
kmipMetadata: z.record(z.any()).nullish()
|
||||
}),
|
||||
response: {
|
||||
200: z.object({
|
||||
|
||||
@@ -78,7 +78,7 @@ export type TKmipRegisterDTO = {
|
||||
name: string;
|
||||
key: string;
|
||||
algorithm: SymmetricKeyAlgorithm;
|
||||
kmipMetadata?: Record<string, unknown>;
|
||||
kmipMetadata?: Record<string, unknown> | null;
|
||||
} & KmipOperationBaseDTO;
|
||||
|
||||
export type TSetupOrgKmipDTO = {
|
||||
|
||||
@@ -214,6 +214,20 @@ export const licenseServiceFactory = ({
|
||||
const identityUsed = await licenseDAL.countOrgUsersAndIdentities(orgId);
|
||||
currentPlan.identitiesUsed = identityUsed;
|
||||
|
||||
if (currentPlan.identityLimit && currentPlan.identityLimit !== identityUsed) {
|
||||
try {
|
||||
await licenseServerCloudApi.request.patch(`/api/license-server/v1/customers/${org.customerId}/cloud-plan`, {
|
||||
quantity: membersUsed,
|
||||
quantityIdentities: identityUsed
|
||||
});
|
||||
} catch (error) {
|
||||
logger.error(
|
||||
error,
|
||||
`Update seats used: encountered an error when updating plan for customer [customerId=${org.customerId}]`
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
await keyStore.setItemWithExpiry(
|
||||
FEATURE_CACHE_KEY(org.id),
|
||||
LICENSE_SERVER_CLOUD_PLAN_TTL,
|
||||
|
||||
Reference in New Issue
Block a user