diff --git a/backend/src/ee/services/license/license-fns.ts b/backend/src/ee/services/license/license-fns.ts index c54daa3a6..0afa7adb1 100644 --- a/backend/src/ee/services/license/license-fns.ts +++ b/backend/src/ee/services/license/license-fns.ts @@ -21,7 +21,7 @@ export const getDefaultOnPremFeatures = (): TFeatureSet => ({ secretVersioning: true, pitRecovery: false, ipAllowlisting: false, - rbac: false, + rbac: true, customRateLimits: false, customAlerts: false, secretAccessInsights: false, 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 9b2f56d15..32ad5b6ad 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 @@ -278,13 +278,7 @@ export const IdentityJwtAuthForm = ({
{ setTabValue( - [ - "accessTokenTrustedIps", - "boundIssuer", - "boundAudiences", - "boundSubject", - "boundClaims" - ].includes(Object.keys(fields)[0]) + ["accessTokenTrustedIps"].includes(Object.keys(fields)[0]) ? IdentityFormTab.Advanced : IdentityFormTab.Configuration ); @@ -365,7 +359,6 @@ export const IdentityJwtAuthForm = ({ /> )} - {selectedConfigurationType === IdentityJwtConfigurationType.STATIC && ( <> {publicKeyFields.map(({ id }, index) => ( @@ -430,50 +423,6 @@ export const IdentityJwtAuthForm = ({ )} - ( - - - - )} - /> - ( - - - - )} - /> - ( - - - - )} - /> - - + ( + + + + )} + /> + ( + + + + )} + /> + ( + + + + )} + /> + + {accessTokenTrustedIpsFields.map(({ id }, index) => (
)} /> + ( + + + + )} + /> + ( + + + + )} + /> - ( - - - - )} - /> - ( - - - - )} - /> { setTabValue( - [ - "accessTokenTrustedIps", - "caCert", - "boundAudiences", - "boundSubject", - "boundClaims" - ].includes(Object.keys(fields)[0]) + ["accessTokenTrustedIps", "caCert", "boundClaims"].includes(Object.keys(fields)[0]) ? IdentityFormTab.Advanced : IdentityFormTab.Configuration ); @@ -277,6 +271,48 @@ export const IdentityOidcAuthForm = ({ )} /> + ( + This field supports glob patterns} + > + + + } + > + + + )} + /> + ( + This field supports glob patterns} + > + + + } + > + + + )} + /> )} /> - ( - This field supports glob patterns} - > - - - } - > - - - )} - /> - ( - This field supports glob patterns} - > - - - } - > - - - )} - /> {boundClaimsFields.map(({ id }, index) => (
data.identity.authMethods.includes(method) ) && ( - + + {(isAllowed) => ( + + )} + )}
) : ( diff --git a/frontend/src/pages/organization/IdentityDetailsByIDPage/components/ViewIdentityAuthModal/IdentityTokenAuthTokensTable.tsx b/frontend/src/pages/organization/IdentityDetailsByIDPage/components/ViewIdentityAuthModal/IdentityTokenAuthTokensTable.tsx index 2e12c6cc1..812ffc3ff 100644 --- a/frontend/src/pages/organization/IdentityDetailsByIDPage/components/ViewIdentityAuthModal/IdentityTokenAuthTokensTable.tsx +++ b/frontend/src/pages/organization/IdentityDetailsByIDPage/components/ViewIdentityAuthModal/IdentityTokenAuthTokensTable.tsx @@ -4,6 +4,7 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { format } from "date-fns"; import { createNotification } from "@app/components/notifications"; +import { OrgPermissionCan } from "@app/components/permissions"; import { Button, DeleteActionModal, @@ -19,6 +20,7 @@ import { Tooltip, Tr } from "@app/components/v2"; +import { OrgPermissionActions, OrgPermissionSubjects } from "@app/context"; import { usePopUp } from "@app/hooks"; import { useRevokeIdentityTokenAuthToken } from "@app/hooks/api"; import { IdentityAccessToken } from "@app/hooks/api/identities/types"; @@ -77,18 +79,23 @@ export const IdentityTokenAuthTokensTable = ({ tokens, identityId }: Props) => {
Access Tokens - + + {(isAllowed) => ( + + )} +
@@ -136,40 +143,56 @@ export const IdentityTokenAuthTokensTable = ({ tokens, identityId }: Props) => { diff --git a/frontend/src/pages/organization/IdentityDetailsByIDPage/components/ViewIdentityAuthModal/IdentityUniversalAuthClientSecretsTable.tsx b/frontend/src/pages/organization/IdentityDetailsByIDPage/components/ViewIdentityAuthModal/IdentityUniversalAuthClientSecretsTable.tsx index 6f0d1aba6..1bf9be534 100644 --- a/frontend/src/pages/organization/IdentityDetailsByIDPage/components/ViewIdentityAuthModal/IdentityUniversalAuthClientSecretsTable.tsx +++ b/frontend/src/pages/organization/IdentityDetailsByIDPage/components/ViewIdentityAuthModal/IdentityUniversalAuthClientSecretsTable.tsx @@ -4,6 +4,7 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { format } from "date-fns"; import { createNotification } from "@app/components/notifications"; +import { OrgPermissionCan } from "@app/components/permissions"; import { Button, DeleteActionModal, @@ -19,6 +20,7 @@ import { Tooltip, Tr } from "@app/components/v2"; +import { OrgPermissionActions, OrgPermissionSubjects } from "@app/context"; import { usePopUp } from "@app/hooks"; import { useRevokeIdentityUniversalAuthClientSecret } from "@app/hooks/api"; import { ClientSecretData } from "@app/hooks/api/identities/types"; @@ -66,18 +68,23 @@ export const IdentityUniversalAuthClientSecretsTable = ({ clientSecrets, identit
Client Secrets - + + {(isAllowed) => ( + + )} +
- - { - handlePopUpOpen("token", { - identityId, - tokenId: id, - name - }); - }} - size="xs" - variant="plain" - ariaLabel="Edit token" - > - - - + + {(isAllowed) => ( + + { + handlePopUpOpen("token", { + identityId, + tokenId: id, + name + }); + }} + size="xs" + variant="plain" + ariaLabel="Edit token" + > + + + + )} + {!isAccessTokenRevoked && ( - - { - handlePopUpOpen("revokeToken", { - identityId, - tokenId: id, - name - }); - }} - size="xs" - colorSchema="danger" - variant="plain" - ariaLabel="Revoke token" - > - - - + + {(isAllowed) => ( + + { + handlePopUpOpen("revokeToken", { + identityId, + tokenId: id, + name + }); + }} + size="xs" + colorSchema="danger" + variant="plain" + ariaLabel="Revoke token" + > + + + + )} + )}
@@ -121,22 +128,30 @@ export const IdentityUniversalAuthClientSecretsTable = ({ clientSecrets, identit {expiresAt ? format(expiresAt, "yyyy-MM-dd") : "-"} ); diff --git a/frontend/src/pages/organization/IdentityDetailsByIDPage/components/ViewIdentityAuthModal/ViewIdentityContentWrapper.tsx b/frontend/src/pages/organization/IdentityDetailsByIDPage/components/ViewIdentityAuthModal/ViewIdentityContentWrapper.tsx index 558155063..03cc51181 100644 --- a/frontend/src/pages/organization/IdentityDetailsByIDPage/components/ViewIdentityAuthModal/ViewIdentityContentWrapper.tsx +++ b/frontend/src/pages/organization/IdentityDetailsByIDPage/components/ViewIdentityAuthModal/ViewIdentityContentWrapper.tsx @@ -2,6 +2,7 @@ import { ReactNode } from "react"; import { faChevronDown, faEdit, faTrash } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import { OrgPermissionCan } from "@app/components/permissions"; import { Button, DropdownMenu, @@ -9,6 +10,7 @@ import { DropdownMenuItem, DropdownMenuTrigger } from "@app/components/v2"; +import { OrgPermissionActions, OrgPermissionSubjects } from "@app/context"; type Props = { children: ReactNode; @@ -34,12 +36,28 @@ export const ViewIdentityContentWrapper = ({ children, onDelete, onEdit }: Props - }> - Edit - - }> - Delete - + + {(isAllowed) => ( + } + > + Edit + + )} + + + {(isAllowed) => ( + } + > + Delete + + )} +
- - { - handlePopUpOpen("revokeClientSecret", { - clientSecretPrefix, - clientSecretId: id - }); - }} - size="xs" - colorSchema="danger" - variant="plain" - ariaLabel="Delete secret" - > - - - + + {(isAllowed) => ( + + { + handlePopUpOpen("revokeClientSecret", { + clientSecretPrefix, + clientSecretId: id + }); + }} + size="xs" + colorSchema="danger" + variant="plain" + ariaLabel="Delete secret" + > + + + + )} +