Move MI from refresh token to client id / client secrets approach

This commit is contained in:
Tuan Dang
2023-12-04 16:13:00 +07:00
parent 6557d7668e
commit 69dae1f0b2
25 changed files with 1307 additions and 543 deletions
@@ -32,7 +32,7 @@ export const MembersPage = withProjectPermission(
<Tab value={TabSections.Member}>People</Tab>
<Tab value={TabSections.MachineIdentities}>
<div className="flex items-center">
<p>Machine Identities</p>
<p>App Clients</p>
<div className="ml-2 rounded-md text-yellow text-sm inline-block bg-yellow/20 px-1.5 pb-[0.03rem] pt-[0.04rem] opacity-80 hover:opacity-100 cursor-default">
Beta
</div>
@@ -120,7 +120,7 @@ export const AddMachineIdentityModal = ({
reset();
}}
>
<ModalContent title="Add Machine Identity to Project">
<ModalContent title="Add App Client to Project">
{filteredMachineMembershipOrgs.length ? (
<form onSubmit={handleSubmit(onFormSubmit)}>
<Controller
@@ -129,7 +129,7 @@ export const AddMachineIdentityModal = ({
defaultValue={filteredMachineMembershipOrgs?.[0]?._id}
render={({ field: { onChange, ...field }, fieldState: { error } }) => (
<FormControl
label="Machine Identity"
label="App Client"
errorText={error?.message}
isError={Boolean(error)}
>
@@ -62,7 +62,7 @@ export const MachineIdentitySection = withProjectPermission(
<div className="mb-6 rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">
<div className="flex justify-between mb-8">
<p className="text-xl font-semibold text-mineshaft-100">
Machine Identities (MIs)
App Clients
</p>
<ProjectPermissionCan
I={ProjectPermissionActions.Create}
@@ -76,7 +76,7 @@ export const MachineIdentitySection = withProjectPermission(
onClick={() => handlePopUpOpen("machineIdentity")}
isDisabled={!isAllowed}
>
Add MI
Add client
</Button>
)}
</ProjectPermissionCan>
@@ -188,7 +188,7 @@ export const MachineIdentityTable = ({
{!isLoading && data && data?.length === 0 && (
<Tr>
<Td colSpan={7}>
<EmptyState title="No MIs have been added to this project" icon={faServer} />
<EmptyState title="No app clients have been added to this project" icon={faServer} />
</Td>
</Tr>
)}