mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-12 21:29:20 +00:00
Merge branch 'ENG-3506' into ENG-3506-LDAP
This commit is contained in:
@@ -153,8 +153,8 @@ export const useAddIdentityUniversalAuth = () => {
|
||||
accessTokenTrustedIps,
|
||||
lockoutEnabled,
|
||||
lockoutThreshold,
|
||||
lockoutDuration,
|
||||
lockoutCounterReset
|
||||
lockoutDurationSeconds,
|
||||
lockoutCounterResetSeconds
|
||||
}) => {
|
||||
const {
|
||||
data: { identityUniversalAuth }
|
||||
@@ -166,8 +166,8 @@ export const useAddIdentityUniversalAuth = () => {
|
||||
accessTokenTrustedIps,
|
||||
lockoutEnabled,
|
||||
lockoutThreshold,
|
||||
lockoutDuration,
|
||||
lockoutCounterReset
|
||||
lockoutDurationSeconds,
|
||||
lockoutCounterResetSeconds
|
||||
});
|
||||
return identityUniversalAuth;
|
||||
},
|
||||
@@ -196,8 +196,8 @@ export const useUpdateIdentityUniversalAuth = () => {
|
||||
accessTokenPeriod,
|
||||
lockoutEnabled,
|
||||
lockoutThreshold,
|
||||
lockoutDuration,
|
||||
lockoutCounterReset
|
||||
lockoutDurationSeconds,
|
||||
lockoutCounterResetSeconds
|
||||
}) => {
|
||||
const {
|
||||
data: { identityUniversalAuth }
|
||||
@@ -210,8 +210,8 @@ export const useUpdateIdentityUniversalAuth = () => {
|
||||
accessTokenPeriod,
|
||||
lockoutEnabled,
|
||||
lockoutThreshold,
|
||||
lockoutDuration,
|
||||
lockoutCounterReset
|
||||
lockoutDurationSeconds,
|
||||
lockoutCounterResetSeconds
|
||||
});
|
||||
return identityUniversalAuth;
|
||||
},
|
||||
|
||||
@@ -116,8 +116,8 @@ export type IdentityUniversalAuth = {
|
||||
accessTokenPeriod: number;
|
||||
lockoutEnabled: boolean;
|
||||
lockoutThreshold: number;
|
||||
lockoutDuration: number;
|
||||
lockoutCounterReset: number;
|
||||
lockoutDurationSeconds: number;
|
||||
lockoutCounterResetSeconds: number;
|
||||
};
|
||||
|
||||
export type AddIdentityUniversalAuthDTO = {
|
||||
@@ -135,8 +135,8 @@ export type AddIdentityUniversalAuthDTO = {
|
||||
}[];
|
||||
lockoutEnabled: boolean;
|
||||
lockoutThreshold: number;
|
||||
lockoutDuration: number;
|
||||
lockoutCounterReset: number;
|
||||
lockoutDurationSeconds: number;
|
||||
lockoutCounterResetSeconds: number;
|
||||
};
|
||||
|
||||
export type UpdateIdentityUniversalAuthDTO = {
|
||||
@@ -154,8 +154,8 @@ export type UpdateIdentityUniversalAuthDTO = {
|
||||
}[];
|
||||
lockoutEnabled?: boolean;
|
||||
lockoutThreshold?: number;
|
||||
lockoutDuration?: number;
|
||||
lockoutCounterReset?: number;
|
||||
lockoutDurationSeconds?: number;
|
||||
lockoutCounterResetSeconds?: number;
|
||||
};
|
||||
|
||||
export type DeleteIdentityUniversalAuthDTO = {
|
||||
|
||||
+2
-2
@@ -151,8 +151,8 @@ export const IdentityModal = ({ popUp, handlePopUpToggle }: Props) => {
|
||||
accessTokenPeriod: 0,
|
||||
lockoutEnabled: true,
|
||||
lockoutThreshold: 3,
|
||||
lockoutDuration: 300,
|
||||
lockoutCounterReset: 30
|
||||
lockoutDurationSeconds: 300,
|
||||
lockoutCounterResetSeconds: 30
|
||||
});
|
||||
|
||||
handlePopUpToggle("identity", false);
|
||||
|
||||
+11
-8
@@ -158,8 +158,8 @@ export const IdentityUniversalAuthForm = ({
|
||||
|
||||
useEffect(() => {
|
||||
if (data) {
|
||||
const lockoutDurationObj = getObjectFromSeconds(data.lockoutDuration);
|
||||
const lockoutCounterResetObj = getObjectFromSeconds(data.lockoutCounterReset);
|
||||
const lockoutDurationObj = getObjectFromSeconds(data.lockoutDurationSeconds);
|
||||
const lockoutCounterResetObj = getObjectFromSeconds(data.lockoutCounterResetSeconds);
|
||||
|
||||
reset({
|
||||
accessTokenTTL: String(data.accessTokenTTL),
|
||||
@@ -222,8 +222,11 @@ export const IdentityUniversalAuthForm = ({
|
||||
try {
|
||||
if (!identityId) return;
|
||||
|
||||
const lockoutDuration = durationToSeconds(Number(lockoutDurationValue), lockoutDurationUnit);
|
||||
const lockoutCounterReset = durationToSeconds(
|
||||
const lockoutDurationSeconds = durationToSeconds(
|
||||
Number(lockoutDurationValue),
|
||||
lockoutDurationUnit
|
||||
);
|
||||
const lockoutCounterResetSeconds = durationToSeconds(
|
||||
Number(lockoutCounterResetValue),
|
||||
lockoutCounterResetUnit
|
||||
);
|
||||
@@ -241,8 +244,8 @@ export const IdentityUniversalAuthForm = ({
|
||||
accessTokenPeriod: Number(accessTokenPeriod),
|
||||
lockoutEnabled,
|
||||
lockoutThreshold: Number(lockoutThreshold),
|
||||
lockoutDuration,
|
||||
lockoutCounterReset
|
||||
lockoutDurationSeconds,
|
||||
lockoutCounterResetSeconds
|
||||
});
|
||||
} else {
|
||||
// create new universal auth configuration
|
||||
@@ -258,8 +261,8 @@ export const IdentityUniversalAuthForm = ({
|
||||
accessTokenPeriod: Number(accessTokenPeriod),
|
||||
lockoutEnabled,
|
||||
lockoutThreshold: Number(lockoutThreshold),
|
||||
lockoutDuration,
|
||||
lockoutCounterReset
|
||||
lockoutDurationSeconds: Number(lockoutDurationSeconds),
|
||||
lockoutCounterResetSeconds: Number(lockoutCounterResetSeconds)
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
+1
@@ -1,5 +1,6 @@
|
||||
import { faBan, faCheck, faCopy } from "@fortawesome/free-solid-svg-icons";
|
||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||
import ms from "ms";
|
||||
|
||||
import { EmptyState, IconButton, Spinner, Tooltip } from "@app/components/v2";
|
||||
import { useTimedReset } from "@app/hooks";
|
||||
|
||||
Reference in New Issue
Block a user