Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvements: Revise Admin Console Docs and Server Admin Badge #2599

Merged
merged 2 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion backend/src/server/routes/v1/admin-router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ export const registerAdminRouter = async (server: FastifyZodProvider) => {
firstName: true,
lastName: true,
email: true,
id: true
id: true,
superAdmin: true
}).array()
})
}
Expand Down
3 changes: 2 additions & 1 deletion backend/src/server/routes/v1/organization-router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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() }))
})
)
Expand Down
11 changes: 7 additions & 4 deletions backend/src/services/org/org-dal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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" });
}
Expand Down
23 changes: 11 additions & 12 deletions docs/documentation/platform/admin-panel/org-admin-console.mdx
Original file line number Diff line number Diff line change
@@ -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.
10 changes: 5 additions & 5 deletions docs/documentation/platform/admin-panel/overview.mdx
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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>
67 changes: 33 additions & 34 deletions docs/documentation/platform/admin-panel/server-admin.mdx
Original file line number Diff line number Diff line change
@@ -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:
### Allow User Signups

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 Tab

## Authentication Section
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>

## User Management Section
</Note>

![User Management](/images/platform/admin-panels/admin-panel-users.png)
## User Management Tab

The User Management section lists all users who have signed up for your instance. You can search for users using the search bar.
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.

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.
![User Management](/images/platform/admin-panels/admin-panel-users.png)

<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>
2 changes: 1 addition & 1 deletion docs/documentation/platform/ldap/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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>
2 changes: 1 addition & 1 deletion docs/documentation/platform/sso/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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 modified docs/images/platform/admin-panels/access-org-admin-console.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/platform/admin-panels/access-server-admin-panel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@
]
},
{
"group": "Admin Panel",
"group": "Admin Consoles",
"pages": [
"documentation/platform/admin-panel/overview",
"documentation/platform/admin-panel/server-admin",
Expand Down
1 change: 1 addition & 0 deletions frontend/src/hooks/api/users/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export type OrgUser = {
lastName: string;
id: string;
publicKey: string;
superAdmin: boolean;
};
inviteEmail: string;
organization: string;
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/layouts/AdminLayout/AdminLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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>
)}
Expand Down
5 changes: 3 additions & 2 deletions frontend/src/layouts/AppLayout/AppLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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>
)}
Expand Down Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/admin/DashboardPage/DashboardPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
12 changes: 10 additions & 2 deletions frontend/src/views/admin/DashboardPage/UserPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";

import { createNotification } from "@app/components/notifications";
import {
Badge,
Button,
DeleteActionModal,
EmptyState,
Expand Down Expand Up @@ -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 && (
Expand Down
Loading