improvements: address feedback

This commit is contained in:
Scott Wilson
2025-05-20 12:41:37 -07:00
parent 33ce783fda
commit b20e04bdeb
4 changed files with 24 additions and 16 deletions

View File

@@ -46,7 +46,7 @@ description: "Learn how to automatically rotate LDAP passwords."
- **Rotation Method** - The method to use when rotating the target principal's password.
- **Connection Principal** - Infisical will use the LDAP Connection's binding principal to rotate the target principal's password.
- **Target Principal** - Infisical will bind with the target Principal to rotate their own password.
- **DN/UPN** - The Distinguished Name (DN) or User Principal Name (UPN) of the principal whose password you want to rotate.
- **DN/UPN** - The Distinguished Name (DN), or User Principal Name (UPN) if supported, of the principal whose password you want to rotate.
- **Password** - The target principal's password (if **Rotation Method** is set to **Target Principal**).
- **Password Requirements** - The constraints to apply when generating new passwords.

View File

@@ -10,7 +10,7 @@ Infisical supports the use of [Simple Binding](https://ldap.com/the-ldap-bind-op
You will need the following information to establish an LDAP connection:
- **LDAP URL** - The LDAP/LDAPS URL to connect to (e.g., ldap://domain-or-ip:389 or ldaps://domain-or-ip:636)
- **Binding DN/UPN** - The Distinguished Name (DN) or User Principal Name (UPN) of the principal to bind with (e.g., 'CN=John,CN=Users,DC=example,DC=com')
- **Binding DN/UPN** - The Distinguished Name (DN), or User Principal Name (UPN) if supported, of the principal to bind with (e.g., 'CN=John,CN=Users,DC=example,DC=com')
- **Binding Password** - The password to bind with for authentication
- **CA Certificate** - The SSL certificate (PEM format) to use for secure connection when using ldaps:// with a self-signed certificate

View File

@@ -2,7 +2,7 @@ import { Controller, useFormContext } from "react-hook-form";
import { TSecretRotationV2Form } from "@app/components/secret-rotations-v2/forms/schemas";
import { DEFAULT_PASSWORD_REQUIREMENTS } from "@app/components/secret-rotations-v2/forms/schemas/shared";
import { FormControl, Input, SecretInput, Select, SelectItem } from "@app/components/v2";
import { FormControl, Input, Select, SelectItem } from "@app/components/v2";
import { SecretRotation } from "@app/hooks/api/secretRotationsV2";
import { LdapPasswordRotationMethod } from "@app/hooks/api/secretRotationsV2/types/ldap-password-rotation";
@@ -43,7 +43,14 @@ export const LdapPasswordRotationParametersFields = () => {
errorText={error?.message}
isError={Boolean(error?.message)}
label="Rotation Method"
helperText={isUpdate ? "Cannot be updated." : undefined}
helperText={
// eslint-disable-next-line no-nested-ternary
isUpdate
? "Cannot be updated."
: value === LdapPasswordRotationMethod.ConnectionPrincipal
? "The connection principal will rotate the target principal's password"
: "The target principal will rotate their own password"
}
>
<Select
isDisabled={isUpdate}
@@ -108,10 +115,11 @@ export const LdapPasswordRotationParametersFields = () => {
errorText={error?.message}
label="Target Principal's Password"
>
<SecretInput
containerClassName="text-gray-400 group-focus-within:!border-primary-400/50 border border-mineshaft-500 bg-mineshaft-900 px-2.5 py-1.5"
<Input
value={value}
onChange={(e) => onChange(e.target.value)}
onChange={onChange}
type="password"
placeholder="****************"
/>
</FormControl>
)}
@@ -122,7 +130,7 @@ export const LdapPasswordRotationParametersFields = () => {
<div className="w-full border-b border-mineshaft-600">
<span className="text-sm text-mineshaft-300">Password Requirements</span>
</div>
<div className="grid grid-cols-2 gap-x-3 gap-y-1 rounded border border-mineshaft-600 bg-mineshaft-700 px-3 pt-2">
<div className="grid grid-cols-2 gap-x-3 gap-y-1 rounded border border-mineshaft-600 bg-mineshaft-700 px-3 pt-3">
<Controller
control={control}
name="parameters.passwordRequirements.length"
@@ -132,7 +140,7 @@ export const LdapPasswordRotationParametersFields = () => {
label="Password Length"
isError={Boolean(error)}
errorText={error?.message}
helperText="The length of the password to generate"
tooltipText="The length of the password to generate"
>
<Input
type="number"
@@ -154,7 +162,7 @@ export const LdapPasswordRotationParametersFields = () => {
label="Digit Count"
isError={Boolean(error)}
errorText={error?.message}
helperText="Minimum number of digits"
tooltipText="Minimum number of digits"
>
<Input
type="number"
@@ -175,7 +183,7 @@ export const LdapPasswordRotationParametersFields = () => {
label="Lowercase Character Count"
isError={Boolean(error)}
errorText={error?.message}
helperText="Minimum number of lowercase characters"
tooltipText="Minimum number of lowercase characters"
>
<Input
type="number"
@@ -196,7 +204,7 @@ export const LdapPasswordRotationParametersFields = () => {
label="Uppercase Character Count"
isError={Boolean(error)}
errorText={error?.message}
helperText="Minimum number of uppercase characters"
tooltipText="Minimum number of uppercase characters"
>
<Input
type="number"
@@ -217,7 +225,7 @@ export const LdapPasswordRotationParametersFields = () => {
label="Symbol Count"
isError={Boolean(error)}
errorText={error?.message}
helperText="Minimum number of symbols"
tooltipText="Minimum number of symbols"
>
<Input
type="number"
@@ -238,7 +246,7 @@ export const LdapPasswordRotationParametersFields = () => {
label="Allowed Symbols"
isError={Boolean(error)}
errorText={error?.message}
helperText="Symbols to use in generated password"
tooltipText="Symbols to use in generated password"
>
<Input
placeholder="-_.~!*"

View File

@@ -1,10 +1,10 @@
import { useEffect, useState } from "react";
import axios from "axios";
import { createNotification } from "@app/components/notifications";
import { Switch } from "@app/components/v2";
import { useOrganization } from "@app/context";
import { useUpdateOrg } from "@app/hooks/api";
import axios from "axios";
import { createNotification } from "@app/components/notifications";
export const OrgProductSelectSection = () => {
const [toggledProducts, setToggledProducts] = useState<{