mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 15:27:27 +00:00
fix: get secret by ID using legacy permissions
This commit is contained in:
@@ -368,14 +368,7 @@ export const registerSecretRouter = async (server: FastifyZodProvider) => {
|
|||||||
200: z.object({
|
200: z.object({
|
||||||
secret: secretRawSchema.extend({
|
secret: secretRawSchema.extend({
|
||||||
secretPath: z.string(),
|
secretPath: z.string(),
|
||||||
tags: SecretTagsSchema.pick({
|
tags: SanitizedTagSchema.array().optional(),
|
||||||
id: true,
|
|
||||||
slug: true,
|
|
||||||
color: true
|
|
||||||
})
|
|
||||||
.extend({ name: z.string() })
|
|
||||||
.array()
|
|
||||||
.optional(),
|
|
||||||
secretMetadata: ResourceMetadataSchema.optional()
|
secretMetadata: ResourceMetadataSchema.optional()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1154,11 +1154,17 @@ export const secretV2BridgeServiceFactory = ({
|
|||||||
? secretManagerDecryptor({ cipherTextBlob: secret.encryptedComment }).toString()
|
? secretManagerDecryptor({ cipherTextBlob: secret.encryptedComment }).toString()
|
||||||
: "";
|
: "";
|
||||||
|
|
||||||
return reshapeBridgeSecret(secret.projectId, folderWithPath.environmentSlug, folderWithPath.path, {
|
return reshapeBridgeSecret(
|
||||||
...secret,
|
secret.projectId,
|
||||||
value: secretValue,
|
folderWithPath.environmentSlug,
|
||||||
comment: secretComment
|
folderWithPath.path,
|
||||||
});
|
{
|
||||||
|
...secret,
|
||||||
|
value: secretValue,
|
||||||
|
comment: secretComment
|
||||||
|
},
|
||||||
|
false
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const getSecretByName = async ({
|
const getSecretByName = async ({
|
||||||
|
|||||||
Reference in New Issue
Block a user