mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-08 09:27:50 +00:00
Log GET secrets v2
This commit is contained in:
@@ -943,6 +943,21 @@ export const getSecrets = async (req: Request, res: Response) => {
|
|||||||
channel,
|
channel,
|
||||||
ipAddress: req.realIP
|
ipAddress: req.realIP
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
await EEAuditLogService.createAuditLog(
|
||||||
|
req.authData,
|
||||||
|
{
|
||||||
|
type: EventType.GET_SECRETS,
|
||||||
|
metadata: {
|
||||||
|
environment,
|
||||||
|
secretPath: secretPath as string,
|
||||||
|
numberOfSecrets: secrets.length
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
workspaceId: new Types.ObjectId(workspaceId as string)
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
const postHogClient = await TelemetryService.getPostHogClient();
|
const postHogClient = await TelemetryService.getPostHogClient();
|
||||||
if (postHogClient) {
|
if (postHogClient) {
|
||||||
|
|||||||
@@ -63,12 +63,12 @@ class EELicenseService {
|
|||||||
environmentsUsed: 0,
|
environmentsUsed: 0,
|
||||||
secretVersioning: true,
|
secretVersioning: true,
|
||||||
pitRecovery: false,
|
pitRecovery: false,
|
||||||
ipAllowlisting: true,
|
ipAllowlisting: false,
|
||||||
rbac: true,
|
rbac: true,
|
||||||
customRateLimits: true,
|
customRateLimits: false,
|
||||||
customAlerts: true,
|
customAlerts: false,
|
||||||
auditLogs: true,
|
auditLogs: false,
|
||||||
auditLogsRetentionDays: 30,
|
auditLogsRetentionDays: 0,
|
||||||
samlSSO: false,
|
samlSSO: false,
|
||||||
status: null,
|
status: null,
|
||||||
trial_end: null,
|
trial_end: null,
|
||||||
|
|||||||
@@ -483,7 +483,7 @@ export const AppLayout = ({ children }: LayoutProps) => {
|
|||||||
</MenuItem>
|
</MenuItem>
|
||||||
</a>
|
</a>
|
||||||
</Link>
|
</Link>
|
||||||
<Link href={`/project/${currentWorkspace?._id}/audit-logs`} passHref>
|
{/* <Link href={`/project/${currentWorkspace?._id}/audit-logs`} passHref>
|
||||||
<a>
|
<a>
|
||||||
<MenuItem
|
<MenuItem
|
||||||
isSelected={
|
isSelected={
|
||||||
@@ -494,7 +494,7 @@ export const AppLayout = ({ children }: LayoutProps) => {
|
|||||||
Audit Logs V2
|
Audit Logs V2
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
</a>
|
</a>
|
||||||
</Link>
|
</Link> */}
|
||||||
<Link href={`/project/${currentWorkspace?._id}/logs`} passHref>
|
<Link href={`/project/${currentWorkspace?._id}/logs`} passHref>
|
||||||
<a>
|
<a>
|
||||||
<MenuItem
|
<MenuItem
|
||||||
|
|||||||
+2
-10
@@ -45,15 +45,6 @@ export const SecretDetailDrawer = ({
|
|||||||
const [canRevealSecOverride, setCanRevealSecOverride] = useToggle();
|
const [canRevealSecOverride, setCanRevealSecOverride] = useToggle();
|
||||||
|
|
||||||
const { register, setValue, control, getValues } = useFormContext<FormData>();
|
const { register, setValue, control, getValues } = useFormContext<FormData>();
|
||||||
|
|
||||||
const secKey = useWatch({
|
|
||||||
control,
|
|
||||||
name: `secrets.${index}.key`,
|
|
||||||
disabled: false,
|
|
||||||
exact: true
|
|
||||||
});
|
|
||||||
|
|
||||||
console.log("secKeyyy", secKey);
|
|
||||||
|
|
||||||
const overrideAction = useWatch({ control, name: `secrets.${index}.overrideAction` });
|
const overrideAction = useWatch({ control, name: `secrets.${index}.overrideAction` });
|
||||||
const isOverridden =
|
const isOverridden =
|
||||||
@@ -102,7 +93,8 @@ export const SecretDetailDrawer = ({
|
|||||||
isDisabled={isReadOnly}
|
isDisabled={isReadOnly}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
const secret = getValues(`secrets.${index}`);
|
const secret = getValues(`secrets.${index}`);
|
||||||
onSecretDelete(index, secret._id, secret.idOverride);
|
|
||||||
|
onSecretDelete(index, secret.key, secret._id, secret.idOverride);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Delete
|
Delete
|
||||||
|
|||||||
Reference in New Issue
Block a user