mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-04 22:26:15 +00:00
requested changes
This commit is contained in:
@@ -307,8 +307,7 @@ export const registerIdentityKubernetesRouter = async (server: FastifyZodProvide
|
|||||||
if (
|
if (
|
||||||
data.tokenReviewMode &&
|
data.tokenReviewMode &&
|
||||||
data.tokenReviewMode === IdentityKubernetesAuthTokenReviewMode.Gateway &&
|
data.tokenReviewMode === IdentityKubernetesAuthTokenReviewMode.Gateway &&
|
||||||
!data.gatewayId &&
|
!data.gatewayId
|
||||||
data.tokenReviewMode !== undefined
|
|
||||||
) {
|
) {
|
||||||
ctx.addIssue({
|
ctx.addIssue({
|
||||||
path: ["gatewayId"],
|
path: ["gatewayId"],
|
||||||
@@ -316,7 +315,7 @@ export const registerIdentityKubernetesRouter = async (server: FastifyZodProvide
|
|||||||
message: "When token review mode is set to Gateway, a gateway must be selected"
|
message: "When token review mode is set to Gateway, a gateway must be selected"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (data.accessTokenMaxTTL && data.accessTokenTTL ? data.accessTokenTTL <= data.accessTokenMaxTTL : true) {
|
if (data.accessTokenMaxTTL && data.accessTokenTTL ? data.accessTokenTTL > data.accessTokenMaxTTL : false) {
|
||||||
ctx.addIssue({
|
ctx.addIssue({
|
||||||
path: ["accessTokenTTL"],
|
path: ["accessTokenTTL"],
|
||||||
code: z.ZodIssueCode.custom,
|
code: z.ZodIssueCode.custom,
|
||||||
|
|||||||
@@ -249,7 +249,11 @@ export const identityKubernetesAuthServiceFactory = ({
|
|||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
if (err instanceof AxiosError) {
|
if (err instanceof AxiosError) {
|
||||||
if (err.response) {
|
if (err.response) {
|
||||||
const { message } = err?.response?.data as unknown as { message?: string };
|
let { message } = err?.response?.data as unknown as { message?: string };
|
||||||
|
|
||||||
|
if (!message && typeof err.response.data === "string") {
|
||||||
|
message = err.response.data;
|
||||||
|
}
|
||||||
|
|
||||||
if (message) {
|
if (message) {
|
||||||
throw new UnauthorizedError({
|
throw new UnauthorizedError({
|
||||||
|
|||||||
@@ -299,7 +299,7 @@ func GetCmdFlagOrEnv(cmd *cobra.Command, flag string, envNames []string) (string
|
|||||||
}
|
}
|
||||||
if value == "" {
|
if value == "" {
|
||||||
for _, env := range envNames {
|
for _, env := range envNames {
|
||||||
value = os.Getenv(env)
|
value = strings.TrimSpace(os.Getenv(env))
|
||||||
if value != "" {
|
if value != "" {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|||||||
-1
@@ -322,7 +322,6 @@ export const IdentityKubernetesAuthForm = ({
|
|||||||
isDisabled={!isAllowed}
|
isDisabled={!isAllowed}
|
||||||
value={value as string}
|
value={value as string}
|
||||||
onValueChange={(v) => {
|
onValueChange={(v) => {
|
||||||
console.log("v", v);
|
|
||||||
if (v !== "") {
|
if (v !== "") {
|
||||||
onChange(v);
|
onChange(v);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user