Skip to content

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

update tooltip in JWT and OIDC

adilson5a3e0536e409
diff --git a/docs/documentation/platform/identities/jwt-auth.mdx b/docs/documentation/platform/identities/jwt-auth.mdx
index 942aad58d3..882a704c59 100644
--- a/docs/documentation/platform/identities/jwt-auth.mdx
+++ b/docs/documentation/platform/identities/jwt-auth.mdx
@@ -106,13 +106,13 @@ In the following steps, we explore how to create and use identities to access th
<Info>
The `subject`, `audiences`, and `claims` fields support [glob pattern](https://www.malikbrowne.com/blog/a-beginners-guide-glob-patterns/) matching; however, we highly recommend using hardcoded values whenever possible.
- Note that `*` does not match across `/` boundaries — use `**` to match across path segments.
+ Note that `*` matches any characters **including** `/` and other separators. Use specific patterns to avoid overly broad matching.
| Pattern | Matches | Does not match |
|---------|---------|----------------|
- | `user-*` | `user-admin`, `user-readonly` | `user-team/lead` |
- | `{admin,service}-**` | `admin-api`, `service-db/primary` | `user-api` |
- | `system:serviceaccount:*:my-sa` | `system:serviceaccount:default:my-sa` | `system:serviceaccount:ns/sub:my-sa` |
+ | `user-*` | `user-admin`, `user-readonly`, `user-team/lead` | `admin-api` |
+ | `{admin,service}-*` | `admin-api`, `service-db/primary` | `user-api` |
+ | `system:serviceaccount:default:*` | `system:serviceaccount:default:my-sa`, `system:serviceaccount:default:other-sa` | `system:serviceaccount:kube-system:my-sa` |
</Info>
</Step>
diff --git a/docs/documentation/platform/identities/oidc-auth/github.mdx b/docs/documentation/platform/identities/oidc-auth/github.mdx
index 998c640548..84f1869b18 100644
--- a/docs/documentation/platform/identities/oidc-auth/github.mdx
+++ b/docs/documentation/platform/identities/oidc-auth/github.mdx
@@ -96,13 +96,13 @@ In the following steps, we explore how to create and use identities to access th
<Info>
The `subject`, `audiences`, and `claims` fields support [glob pattern](https://www.malikbrowne.com/blog/a-beginners-guide-glob-patterns/) matching; however, we highly recommend using hardcoded values whenever possible.
- Note that `*` does not match across `:` or `/` boundaries — use `**` when you need to match across separators.
+ Note that `*` matches any characters **including** `:` and `/`. Use specific patterns to avoid overly broad matching.
| Pattern | Matches | Does not match |
|---------|---------|----------------|
- | `repo:my-org/*:ref:refs/heads/main` | `repo:my-org/any-repo:ref:refs/heads/main` | `repo:my-org/repo:ref:refs/heads/dev` |
| `repo:my-org/my-repo:*` | `repo:my-org/my-repo:ref:refs/heads/main`, `repo:my-org/my-repo:environment:prod` | `repo:other-org/my-repo:ref:refs/heads/main` |
| `repo:my-org/{app,api}:*` | `repo:my-org/app:ref:refs/heads/main`, `repo:my-org/api:environment:prod` | `repo:my-org/web:ref:refs/heads/main` |
+ | `repo:my-org/my-repo:ref:refs/heads/*` | `repo:my-org/my-repo:ref:refs/heads/main`, `repo:my-org/my-repo:ref:refs/heads/dev` | `repo:my-org/my-repo:environment:prod` |
</Info>
</Step>
<Step title="Adding an identity to a project">
diff --git a/frontend/src/components/permissions/GlobPermissionInfo.tsx b/frontend/src/components/permissions/GlobPermissionInfo.tsx
index cccd71ae44..683a713338 100644
--- a/frontend/src/components/permissions/GlobPermissionInfo.tsx
+++ b/frontend/src/components/permissions/GlobPermissionInfo.tsx
@@ -24,9 +24,29 @@ export const GlobPatternTooltip = () => (
</li>
</ul>
<p className="text-mineshaft-400">
- path/<code className="text-yellow-500/80">**</code> will match all nested paths.{" "}
- <code className="text-yellow-500/80">**</code> on its own will match everything. Use with
- caution.
+ We highly recommend using hardcoded values whenever possible.
+ </p>
+ </div>
+);
+
+export const BashGlobPatternTooltip = () => (
+ <div className="space-y-1.5 text-left text-xs">
+ <p className="text-sm font-medium text-mineshaft-200">Glob pattern matching:</p>
+ <ul className="list-disc pl-3.5 text-mineshaft-300">
+ <li>
+ <code className="text-yellow-500/80">*</code> matches any characters (including{" "}
+ <code className="text-yellow-500/80">/</code>)
+ <br />
+ <span className="text-mineshaft-400">user/* matches user/admin and user/admin/service</span>
+ </li>
+ <li>
+ <code className="text-yellow-500/80">?</code> matches exactly one character
+ <br />
+ <span className="text-mineshaft-400">admin-? matches admin-1 but not admin-12</span>
+ </li>
+ </ul>
+ <p className="text-mineshaft-400">
+ We highly recommend using hardcoded values whenever possible.
</p>
</div>
);
diff --git a/frontend/src/components/permissions/index.tsx b/frontend/src/components/permissions/index.tsx
index c05f9d866a..7f12045f4e 100644
--- a/frontend/src/components/permissions/index.tsx
+++ b/frontend/src/components/permissions/index.tsx
@@ -1,5 +1,9 @@
export * from "./AccessTree";
-export { GlobPatternTooltip, GlobPermissionInfo } from "./GlobPermissionInfo";
+export {
+ BashGlobPatternTooltip,
+ GlobPatternTooltip,
+ GlobPermissionInfo
+} from "./GlobPermissionInfo";
export { OrgPermissionCan } from "./OrgPermissionCan";
export { PermissionDeniedBanner } from "./PermissionDeniedBanner";
export { ProjectPermissionCan } from "./ProjectPermissionCan";
diff --git a/frontend/src/pages/organization/AccessManagementPage/components/OrgIdentityTab/components/IdentitySection/IdentityJwtAuthForm.tsx b/frontend/src/pages/organization/AccessManagementPage/components/OrgIdentityTab/components/IdentitySection/IdentityJwtAuthForm.tsx
index a796d15bf3..f016931737 100644
--- a/frontend/src/pages/organization/AccessManagementPage/components/OrgIdentityTab/components/IdentitySection/IdentityJwtAuthForm.tsx
+++ b/frontend/src/pages/organization/AccessManagementPage/components/OrgIdentityTab/components/IdentitySection/IdentityJwtAuthForm.tsx
@@ -8,7 +8,7 @@ import { useParams } from "@tanstack/react-router";
import { z } from "zod";
import { createNotification } from "@app/components/notifications";
-import { GlobPatternTooltip } from "@app/components/permissions";
+import { BashGlobPatternTooltip } from "@app/components/permissions";
import {
Button,
FormControl,
@@ -440,7 +440,7 @@ export const IdentityJwtAuthForm = ({
isError={Boolean(error)}
errorText={error?.message}
icon={
- <Tooltip content={<GlobPatternTooltip />}>
+ <Tooltip content={<BashGlobPatternTooltip />}>
<FontAwesomeIcon icon={faQuestionCircle} size="sm" />
</Tooltip>
}
@@ -458,7 +458,7 @@ export const IdentityJwtAuthForm = ({
isError={Boolean(error)}
errorText={error?.message}
icon={
- <Tooltip content={<GlobPatternTooltip />}>
+ <Tooltip content={<BashGlobPatternTooltip />}>
<FontAwesomeIcon icon={faQuestionCircle} size="sm" />
</Tooltip>
}
@@ -479,7 +479,7 @@ export const IdentityJwtAuthForm = ({
label={index === 0 ? "Claims" : undefined}
icon={
index === 0 ? (
- <Tooltip content={<GlobPatternTooltip />}>
+ <Tooltip content={<BashGlobPatternTooltip />}>
<FontAwesomeIcon icon={faQuestionCircle} size="sm" />
</Tooltip>
) : undefined
diff --git a/frontend/src/pages/organization/AccessManagementPage/components/OrgIdentityTab/components/IdentitySection/IdentityOidcAuthForm.tsx b/frontend/src/pages/organization/AccessManagementPage/components/OrgIdentityTab/components/IdentitySection/IdentityOidcAuthForm.tsx
index 8df8228f36..47cf0abde2 100644
--- a/frontend/src/pages/organization/AccessManagementPage/components/OrgIdentityTab/components/IdentitySection/IdentityOidcAuthForm.tsx
+++ b/frontend/src/pages/organization/AccessManagementPage/components/OrgIdentityTab/components/IdentitySection/IdentityOidcAuthForm.tsx
@@ -8,7 +8,7 @@ import { useParams } from "@tanstack/react-router";
import { z } from "zod";
import { createNotification } from "@app/components/notifications";
-import { GlobPatternTooltip } from "@app/components/permissions";
+import { BashGlobPatternTooltip } from "@app/components/permissions";
import {
Button,
FormControl,
@@ -322,7 +322,7 @@ export const IdentityOidcAuthForm = ({
isError={Boolean(error)}
errorText={error?.message}
icon={
- <Tooltip content={<GlobPatternTooltip />}>
+ <Tooltip content={<BashGlobPatternTooltip />}>
<FontAwesomeIcon icon={faQuestionCircle} size="sm" />
</Tooltip>
}
@@ -340,7 +340,7 @@ export const IdentityOidcAuthForm = ({
isError={Boolean(error)}
errorText={error?.message}
icon={
- <Tooltip content={<GlobPatternTooltip />}>
+ <Tooltip content={<BashGlobPatternTooltip />}>
<FontAwesomeIcon icon={faQuestionCircle} size="sm" />
</Tooltip>
}
@@ -361,7 +361,7 @@ export const IdentityOidcAuthForm = ({
label={index === 0 ? "Claims" : undefined}
icon={
index === 0 ? (
- <Tooltip content={<GlobPatternTooltip />}>
+ <Tooltip content={<BashGlobPatternTooltip />}>
<FontAwesomeIcon icon={faQuestionCircle} size="sm" />
</Tooltip>
) : undefined