mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-20 18:00:54 +00:00
feat(infisical-pg): resolved integration invalid cred error
This commit is contained in:
@@ -5,6 +5,7 @@ import { IntegrationAuthsSchema, SecretApprovalPoliciesSchema } from "@app/db/sc
|
||||
// sometimes the return data must be santizied to avoid leaking important values
|
||||
// always prefer pick over omit in zod
|
||||
export const integrationAuthPubSchema = IntegrationAuthsSchema.pick({
|
||||
id: true,
|
||||
projectId: true,
|
||||
integration: true,
|
||||
teamId: true,
|
||||
|
||||
@@ -291,7 +291,15 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
||||
}),
|
||||
response: {
|
||||
200: z.object({
|
||||
integrations: IntegrationsSchema.array()
|
||||
integrations: IntegrationsSchema.merge(
|
||||
z.object({
|
||||
environment: z.object({
|
||||
id: z.string(),
|
||||
name: z.string(),
|
||||
slug: z.string()
|
||||
})
|
||||
})
|
||||
).array()
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
@@ -251,7 +251,7 @@ export const integrationAuthServiceFactory = ({
|
||||
accessToken = decryptSymmetric128BitHexKeyUTF8({
|
||||
ciphertext: integrationAuth.accessCiphertext,
|
||||
iv: integrationAuth.accessIV,
|
||||
tag: integrationAuth.accessIV,
|
||||
tag: integrationAuth.accessTag,
|
||||
key: botKey
|
||||
});
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import { getConfig } from "@app/lib/config/env";
|
||||
import { request } from "@app/lib/config/request";
|
||||
import { BadRequestError } from "@app/lib/errors";
|
||||
|
||||
import { Integrations,IntegrationUrls } from "./integration-list";
|
||||
import { Integrations, IntegrationUrls } from "./integration-list";
|
||||
|
||||
type ExchangeCodeAzureResponse = {
|
||||
token_type: string;
|
||||
@@ -148,7 +148,6 @@ const exchangeCodeHeroku = async ({ code }: { code: string }) => {
|
||||
})
|
||||
)
|
||||
).data;
|
||||
|
||||
accessExpiresAt.setSeconds(accessExpiresAt.getSeconds() + res.expires_in);
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user