improvements: revise admin console docs and display server admin badge on users tables

This commit is contained in:
Scott Wilson
2024-10-16 14:19:38 -07:00
parent f95957d534
commit 65e42f980c
17 changed files with 88 additions and 67 deletions

View File

@@ -109,7 +109,8 @@ export const registerAdminRouter = async (server: FastifyZodProvider) => {
firstName: true,
lastName: true,
email: true,
id: true
id: true,
superAdmin: true
}).array()
})
}

View File

@@ -211,7 +211,8 @@ export const registerOrgRouter = async (server: FastifyZodProvider) => {
email: true,
firstName: true,
lastName: true,
id: true
id: true,
superAdmin: true
}).merge(z.object({ publicKey: z.string().nullable() }))
})
)

View File

@@ -106,16 +106,19 @@ export const orgDALFactory = (db: TDbClient) => {
db.ref("firstName").withSchema(TableName.Users),
db.ref("lastName").withSchema(TableName.Users),
db.ref("id").withSchema(TableName.Users).as("userId"),
db.ref("superAdmin").withSchema(TableName.Users),
db.ref("publicKey").withSchema(TableName.UserEncryptionKey)
)
.where({ isGhost: false }) // MAKE SURE USER IS NOT A GHOST USER
.orderBy("firstName")
.orderBy("lastName");
return members.map(({ email, isEmailVerified, username, firstName, lastName, userId, publicKey, ...data }) => ({
...data,
user: { email, isEmailVerified, username, firstName, lastName, id: userId, publicKey }
}));
return members.map(
({ email, isEmailVerified, username, firstName, lastName, userId, publicKey, superAdmin, ...data }) => ({
...data,
user: { email, isEmailVerified, username, firstName, lastName, id: userId, publicKey, superAdmin }
})
);
} catch (error) {
throw new DatabaseError({ error, name: "Find all org members" });
}

View File

@@ -1,32 +1,31 @@
---
title: "Organization Admin Console"
description: "Manage your Infisical organization from our organization admin console."
description: "View and manage resources across your organization"
---
The Organization Admin Console provides a user-friendly interface for Infisical organization admins to manage organization-related configurations.
<Note>
The Organization Admin Console can only be accessed by organization members with admin status.
</Note>
## Accessing the Organization Admin Console
Only organization admins have access to the Organization Admin Console.
On the sidebar, tap on your initials to access the settings dropdown and press the **Organization Admin Console** option.
![Access Organization Admin Panel](/images/platform/admin-panels/access-org-admin-console.png)
![Access Organization Admin Console](/images/platform/admin-panels/access-org-admin-console.png)
1. Click on the profile icon in the left sidebar.
2. From the dropdown menu, select `Organization Admin Console`.
## Projects Tab
## Projects Section
The Projects tab lists all the projects within your organization, including those which you are not a member of. You can easily filter projects by name or slug using the search bar.
![Projects Section](/images/platform/admin-panels/org-admin-console-projects.png)
The Projects Section lists all projects created within your organization, including those you do not have membership in. You can easily search for a project by name using the search bar.
### Accessing a Project in Your Organization
If you want to access a project in which you are not a member but are an organization admin, follow these steps:
You can access a project that you are not a member of by tapping on the options menu of the project row and pressing the **Access** button.
Doing so will grant you admin permissions for the selected project and add you as a member.
![Access project](/images/platform/admin-panels/org-admin-console-access.png)
1. Click on the three-dot icon next to the project you wish to access.
2. Click on the **Access** button.
This will grant you admin permissions for the selected project and generate an audit log of your access, ensuring transparency regarding admin privileges.

View File

@@ -1,17 +1,17 @@
---
description: "Learn about Infisical's Admin Panel."
description: "Learn about Infisical's Admin Consoles"
---
The Infisical Admin Panel allows you to configure and manage various resources within your organization and server.
Infisical offers a server and organization level console for admins to customize their settings and manage various resources across the platform.
<CardGroup cols={2}>
<Card
title="Server Admin Panel"
title="Server Admin Console"
href="./server-admin"
icon="user-tie"
color="#000000"
>
Configure and manage your server settings effectively.
Configure and manage server related features.
</Card>
<Card
@@ -20,6 +20,6 @@ The Infisical Admin Panel allows you to configure and manage various resources w
icon="sitemap"
color="#000000"
>
Manage settings specific to your organization.
View and access resources across your organization.
</Card>
</CardGroup>

View File

@@ -1,70 +1,69 @@
---
title: "Server Admin Panel"
description: "Manage your Infisical server from the Server Admin Panel."
title: "Server Admin Console"
description: "Configure and manage server related features"
---
The Server Admin Panel provides a user interface for Infisical server administrators to configure various parameters as needed. This includes configuring rate limits, managing allowed signups, and more.
The Server Admin Console provides **server administrators** with the ability to
customize settings and manage users for their entire Infisical instance.
## Accessing the Server Admin Panel
<Note>
The first user to setup an account on your Infisical instance is designated as the server administrator by default.
</Note>
The first user who created the account in Infisical is designated as the server administrator. You can access the admin panel by navigating as follows:
## Accessing the Server Admin Console
![Access Server Admin Panel](/images/platform/admin-panels/access-server-admin-panel.png)
1. Click on the profile icon in the left sidebar.
2. From the dropdown menu, select `Server Admin Panel`.
On the sidebar, tap on your initials to access the settings dropdown and press the **Server Admin Console** option.
## General Section
![Access Server Admin Console](/images/platform/admin-panels/access-server-admin-panel.png)
## General Tab
Configure general settings for your instance.
![General Settings](/images/platform/admin-panels/admin-panel-general.png)
### Allow User Signups
This setting controls whether users can sign up for your Infisical instance. The options are:
1. **Anyone**: Any user with access to your instance can sign up.
2. **Disabled**: No one will be able to sign up.
User signups are enabled by default, allowing **Anyone** with access to your instance to sign up. This can alternatively be **Disabled** to prevent any users from signing up.
### Restrict Signup Domain
This setting allows only users with specific email domains (such as your organization's domain) to sign up.
Signup can be restricted to users matching one or more email domains, such as your organization's domain, to control who has access to your instance.
### Default Organization
Use this setting if you want all users accessing your Infisical instance to log in through your configured SAML/LDAP provider. This prevents users from manually entering their organization slug during authentication and redirects them to the SAML/LDAP authentication page.
If you're using SAML/LDAP for only one organization on your instance, you can specify a default organization to use at login to skip requiring users to manually enter the organization slug.
### Trust Emails
By default, Infisical does not trust emails logged in via SAML/LDAP/OIDC due to the potential for email spoofing. Users must verify their email addresses before proceeding. You can disable this validation if you are running an Infisical instance within your organization and trust incoming emails from your members.
By default, users signing up through SAML/LDAP/OIDC will still need to verify their email address to prevent email spoofing. This requirement can be skipped by enabling the switch to trust logins through the respective method.
## Authentication Section
## Authentication Tab
From this tab you can configure which login methods are enabled for your instance.
![Authentication Settings](/images/platform/admin-panels/admin-panel-auths.png)
This section allows you to configure various login and signup methods for your instance.
## Rate Limit Section
## Rate Limit Tab
This tab allows you to set various rate limits for your Infisical instance. You do not need to redeploy when making changes to rate limits as these will be propagated automatically.
![Rate Limit Settings](/images/platform/admin-panels/admin-panel-rate-limits.png)
Configure the rate limits for your Infisical instance across various endpoints. You do not need to redeploy when making changes to rate limits; they will be automatically synchronized to all instances.
<Info>
<Note>
Note that rate limit configuration is a paid feature. Please contact sales@infisical.com to purchase a license for its use.
</Info>
</Note>
## User Management Section
## User Management Tab
From this tab you can view all the users who have signed up for your instance. You can search for users using the search bar and remove them from your instance by pressing the **X** button on their respective row.
![User Management](/images/platform/admin-panels/admin-panel-users.png)
The User Management section lists all users who have signed up for your instance. You can search for users using the search bar.
To delete a user from Infisical:
1. Search for the user.
2. Click the cross button next to the user.
3. Confirm the warning popup.
<Info>
Note that user management configuration is a paid feature. Please contact sales@infisical.com to purchase a license for its use.
</Info>
<Note>
Note that rate limit configuration is a paid feature. Please contact sales@infisical.com to purchase a license for its use.
</Note>

View File

@@ -36,7 +36,7 @@ If the documentation for your required identity provider is not shown in the lis
verification step upon their first login.
If you're running a self-hosted instance of Infisical and would like it to trust emails from external identity providers,
you can configure this behavior in the admin panel.
you can configure this behavior in the Server Admin Console.
</Accordion>
</AccordionGroup>

View File

@@ -45,7 +45,7 @@ If your required identity provider is not shown in the list above, please reach
verification step upon their first login.
If you're running a self-hosted instance of Infisical and would like it to trust emails from external identity providers,
you can configure this behavior in the admin panel.
you can configure this behavior in the Server Admin Console.
</Accordion>
</AccordionGroup>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 KiB

After

Width:  |  Height:  |  Size: 852 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 KiB

After

Width:  |  Height:  |  Size: 852 KiB

View File

@@ -188,7 +188,7 @@
]
},
{
"group": "Admin Panel",
"group": "Admin Consoles",
"pages": [
"documentation/platform/admin-panel/overview",
"documentation/platform/admin-panel/server-admin",

View File

@@ -56,6 +56,7 @@ export type OrgUser = {
lastName: string;
id: string;
publicKey: string;
superAdmin: boolean;
};
inviteEmail: string;
organization: string;

View File

@@ -157,7 +157,7 @@ export const AdminLayout = ({ children }: LayoutProps) => {
{user?.superAdmin && (
<Link href="/admin" legacyBehavior>
<DropdownMenuItem className="mt-1 border-t border-mineshaft-600">
Admin Panel
Server Admin Console
</DropdownMenuItem>
</Link>
)}

View File

@@ -487,7 +487,7 @@ export const AppLayout = ({ children }: LayoutProps) => {
{user?.superAdmin && (
<Link href="/admin" legacyBehavior>
<DropdownMenuItem className="mt-1 border-t border-mineshaft-600">
Server Admin Panel
Server Admin Console
</DropdownMenuItem>
</Link>
)}
@@ -749,7 +749,8 @@ export const AppLayout = ({ children }: LayoutProps) => {
</MenuItem>
</a>
</Link>
{(window.location.origin.includes("https://app.infisical.com") || window.location.origin.includes("https://eu.infisical.com") ||
{(window.location.origin.includes("https://app.infisical.com") ||
window.location.origin.includes("https://eu.infisical.com") ||
window.location.origin.includes("https://gamma.infisical.com")) && (
<Link href={`/org/${currentOrg?.id}/billing`} passHref>
<a>

View File

@@ -7,6 +7,7 @@ import { twMerge } from "tailwind-merge";
import { createNotification } from "@app/components/notifications";
import { OrgPermissionCan } from "@app/components/permissions";
import {
Badge,
Button,
DropdownMenu,
DropdownMenuContent,
@@ -188,7 +189,14 @@ export const OrgMembersTable = ({ handlePopUpOpen, setCompleteInviteLinks }: Pro
className="h-10 w-full cursor-pointer transition-colors duration-100 hover:bg-mineshaft-700"
onClick={() => router.push(`/org/${orgId}/memberships/${orgMembershipId}`)}
>
<Td className={isActive ? "" : "text-mineshaft-400"}>{name}</Td>
<Td className={isActive ? "" : "text-mineshaft-400"}>
{name}
{u.superAdmin && (
<Badge variant="primary" className="ml-2">
Server Admin
</Badge>
)}
</Td>
<Td className={isActive ? "" : "text-mineshaft-400"}>{username}</Td>
<Td>
<OrgPermissionCan

View File

@@ -125,7 +125,7 @@ export const AdminDashboardPage = () => {
<div className="container mx-auto max-w-7xl px-4 pb-12 text-white dark:[color-scheme:dark]">
<div className="mx-auto mb-6 w-full max-w-7xl pt-6">
<div className="mb-8 flex flex-col items-start justify-between text-xl">
<h1 className="text-3xl font-semibold">Admin Dashboard</h1>
<h1 className="text-3xl font-semibold">Server Admin Console</h1>
<p className="text-base text-bunker-300">Manage your instance level configurations.</p>
</div>
</div>

View File

@@ -4,6 +4,7 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { createNotification } from "@app/components/notifications";
import {
Badge,
Button,
DeleteActionModal,
EmptyState,
@@ -69,12 +70,19 @@ const UserPanelTable = ({
{isLoading && <TableSkeleton columns={4} innerKey="users" />}
{!isLoading &&
data?.pages?.map((users) =>
users.map(({ username, email, firstName, lastName, id }) => {
users.map(({ username, email, firstName, lastName, id, superAdmin }) => {
const name = firstName || lastName ? `${firstName} ${lastName}` : "-";
return (
<Tr key={`user-${id}`} className="w-full">
<Td className="w-5/12">{name}</Td>
<Td className="w-5/12">
{name}
{superAdmin && (
<Badge variant="primary" className="ml-2">
Server Admin
</Badge>
)}
</Td>
<Td className="w-5/12">{email}</Td>
<Td>
{userId !== id && (