Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

fix UI review

Thiago Araujo da Silva261f3f39931e
diff --git a/docs/documentation/platform/pki/applications/alerting/webhook-alerts.mdx b/docs/documentation/platform/pki/applications/alerting/webhook-alerts.mdx
index d62018fc26..26393fe055 100644
--- a/docs/documentation/platform/pki/applications/alerting/webhook-alerts.mdx
+++ b/docs/documentation/platform/pki/applications/alerting/webhook-alerts.mdx
@@ -16,13 +16,13 @@ A webhook channel on a certificate [alert](/documentation/platform/pki/applicati
Select **Add Channel** > **Webhook** and enter the **URL** of your endpoint. The URL must use HTTPS.
</Step>
<Step>
- If your endpoint requires authentication, under **Authentication**, select **Bearer token**, **Basic auth**, or **API key**, and enter the [credentials](#authentication) it expects.
+ If your endpoint requires authentication, under **Authentication**, select **Bearer Token**, **Basic Auth**, or **API Key**, and enter the [credentials](#authentication) it expects.
</Step>
<Step>
- Optionally, select **Add signing secret** and enter a secret, so your endpoint can [verify the signature](#verify-the-signature) of each request.
+ Optionally, select **Add Signing Secret** and enter a secret, so your endpoint can [verify the signature](#verify-the-signature) of each request.
</Step>
<Step>
- Optionally, select **Add header** to send [custom headers](#custom-headers) with each request.
+ Optionally, select **Add Header** to send [custom headers](#custom-headers) with each request.
</Step>
<Step>
Optionally, select **Send test** to send a test notification to the channel.
@@ -38,17 +38,17 @@ A channel can have one authentication method, which Infisical sends as a header
| Type | What you enter | Header that Infisical sends |
|------|----------------|-----------------------------|
-| **Bearer token** | A token | `Authorization: Bearer <token>` |
-| **Basic auth** | A username and a password | `Authorization: Basic <base64 of username:password>` |
-| **API key** | A header name, such as `X-API-Key`, and the key | `<header name>: <key>` |
+| **Bearer Token** | A token | `Authorization: Bearer <token>` |
+| **Basic Auth** | A username and a password | `Authorization: Basic <base64 of username:password>` |
+| **API Key** | A header name, such as `X-API-Key`, and the key | `<header name>: <key>` |
-For an `Authorization` scheme other than `Bearer`, such as `GenieKey <key>`, select **API key**, enter `Authorization` as the header name, and enter the full value, including the scheme.
+For an `Authorization` scheme other than `Bearer`, such as `GenieKey <key>`, select **API Key**, enter `Authorization` as the header name, and enter the full value, including the scheme.
Infisical doesn't show saved credentials again. When you edit the channel, leave a field blank to keep its saved value. If you change the URL, enter the credentials again, because Infisical only sends them to the URL they were saved with.
## Custom headers
-Infisical sends custom headers with each request, such as an `x-env` header your endpoint uses to route alerts:
+Infisical sends custom headers with each request, such as an `X-Env` header your endpoint uses to route alerts:
- Anyone who can view the alert can see header values, so put credentials, including any `Authorization` header, in [authentication](#authentication)
- A channel can have up to 20 custom headers, and header names, values, and authentication credentials can total up to 4,096 characters
diff --git a/frontend/src/hooks/api/alerts/types.ts b/frontend/src/hooks/api/alerts/types.ts
index 0a446a4ca6..3749872ee7 100644
--- a/frontend/src/hooks/api/alerts/types.ts
+++ b/frontend/src/hooks/api/alerts/types.ts
@@ -39,18 +39,18 @@ export const WEBHOOK_AUTH_FIELDS: Record<
}
> = {
[WebhookAuthType.Bearer]: {
- label: "Bearer token",
+ label: "Bearer Token",
description: "Sends the token as Authorization: Bearer <token>.",
secret: { field: "authCredentials", label: "Token", hasSaved: "hasAuthCredentials" }
},
[WebhookAuthType.Basic]: {
- label: "Basic auth",
+ label: "Basic Auth",
description: "Sends the username and password as Authorization: Basic <credentials>.",
name: { field: "basicUsername", label: "Username", placeholder: "Username" },
secret: { field: "basicPassword", label: "Password", hasSaved: "hasBasicPassword" }
},
[WebhookAuthType.Header]: {
- label: "API key",
+ label: "API Key",
description: "Sends the key in the header you name, such as X-API-Key.",
name: { field: "authHeaderName", label: "Header name", placeholder: "X-API-Key" },
secret: { field: "authHeaderValue", label: "API key", hasSaved: "hasAuthHeaderValue" }
diff --git a/frontend/src/views/Alerts/ChannelSecretInput.tsx b/frontend/src/views/Alerts/ChannelSecretInput.tsx
index 87b14a8acd..22cc7546a0 100644
--- a/frontend/src/views/Alerts/ChannelSecretInput.tsx
+++ b/frontend/src/views/Alerts/ChannelSecretInput.tsx
@@ -10,7 +10,6 @@ type Props = {
id: string;
placeholder?: string;
isError?: boolean;
- isWarning?: boolean;
registration: UseFormRegisterReturn;
ariaLabel?: string;
};
@@ -19,14 +18,13 @@ export const ChannelSecretInput = ({
id,
placeholder,
isError,
- isWarning,
registration,
ariaLabel
}: Props) => {
const [isRevealed, setIsRevealed] = useState(false);
return (
- <InputGroup className={isWarning ? "border-warning/60" : undefined}>
+ <InputGroup>
<InputGroupInput
{...registration}
id={id}
diff --git a/frontend/src/views/Alerts/WebhookAuthenticationField.tsx b/frontend/src/views/Alerts/WebhookAuthenticationField.tsx
index d7a941f557..462dc062f7 100644
--- a/frontend/src/views/Alerts/WebhookAuthenticationField.tsx
+++ b/frontend/src/views/Alerts/WebhookAuthenticationField.tsx
@@ -23,7 +23,8 @@ import { ChannelSecretInput, KEEP_PLACEHOLDER } from "./ChannelSecretInput";
const NO_AUTH = "none";
-const REENTER_PLACEHOLDER = "Re-enter for new URL";
+const REENTER_DESCRIPTION =
+ "The URL changed, so enter the credentials again. Saved credentials are only sent to the URL they were saved with.";
type Props = {
index: number;
@@ -69,9 +70,8 @@ export const WebhookAuthenticationField = ({ index }: Props) => {
const { description, name, secret } = WEBHOOK_AUTH_FIELDS[type];
const hasSavedSecret = Boolean(channel?.id && channel[secret.hasSaved]);
const needsReentry = hasSavedSecret && isUrlChanged;
- let secretPlaceholder = secret.label;
- if (hasSavedSecret)
- secretPlaceholder = needsReentry ? REENTER_PLACEHOLDER : KEEP_PLACEHOLDER;
+ const secretPlaceholder =
+ hasSavedSecret && !needsReentry ? KEEP_PLACEHOLDER : secret.label;
return (
<TabsContent key={type} value={type} className="@container mt-0 flex flex-col gap-2">
@@ -97,13 +97,14 @@ export const WebhookAuthenticationField = ({ index }: Props) => {
ariaLabel={secret.label}
placeholder={secretPlaceholder}
isError={Boolean(channelErrors?.[secret.field])}
- isWarning={needsReentry && !channel[secret.field]}
registration={register(`channels.${index}.${secret.field}`)}
/>
<FieldError errors={[channelErrors?.[secret.field]]} />
</Field>
</div>
- <FieldDescription>{description}</FieldDescription>
+ <FieldDescription>
+ {needsReentry && !channel[secret.field] ? REENTER_DESCRIPTION : description}
+ </FieldDescription>
</TabsContent>
);
})}
diff --git a/frontend/src/views/Alerts/WebhookHeadersField.tsx b/frontend/src/views/Alerts/WebhookHeadersField.tsx
index 3594615d6d..7075c3a2c2 100644
--- a/frontend/src/views/Alerts/WebhookHeadersField.tsx
+++ b/frontend/src/views/Alerts/WebhookHeadersField.tsx
@@ -37,7 +37,7 @@ export const WebhookHeadersField = ({ index }: Props) => {
<Field className="w-2/5">
<Input
aria-label="Header name"
- placeholder="x-env"
+ placeholder="X-Env"
isError={Boolean(headerErrors?.[i]?.key)}
{...register(`channels.${index}.headers.${i}.key`)}
/>
@@ -46,7 +46,7 @@ export const WebhookHeadersField = ({ index }: Props) => {
<Field className="min-w-0 flex-1">
<Input
aria-label="Header value"
- placeholder="production"
+ placeholder="Production"
isError={Boolean(headerErrors?.[i]?.value)}
{...register(`channels.${index}.headers.${i}.value`)}
/>
@@ -65,7 +65,7 @@ export const WebhookHeadersField = ({ index }: Props) => {
onClick={() => append({ key: "", value: "" })}
>
<PlusIcon className="size-3.5" />
- Add header
+ Add Header
</Button>
</div>
</FieldContent>
diff --git a/frontend/src/views/Alerts/WebhookSigningSecretField.tsx b/frontend/src/views/Alerts/WebhookSigningSecretField.tsx
index 10c8e62976..22bde0b98b 100644
--- a/frontend/src/views/Alerts/WebhookSigningSecretField.tsx
+++ b/frontend/src/views/Alerts/WebhookSigningSecretField.tsx
@@ -71,7 +71,7 @@ export const WebhookSigningSecretField = ({ index }: Props) => {
onClick={() => setEnabled(true)}
>
<PlusIcon className="size-3.5" />
- Add signing secret
+ Add Signing Secret
</Button>
)}
</FieldContent>