From 24d2eea930648182527e9516fad2e21e0136e29d Mon Sep 17 00:00:00 2001 From: Vladyslav Matsiiako Date: Sat, 23 Dec 2023 16:06:00 -0800 Subject: [PATCH 1/3] ui and docs improvements --- docs/changelog/overview.mdx | 1 + docs/documentation/getting-started/sdks.mdx | 5 +- docs/documentation/guides/nextjs-vercel.mdx | 2 +- docs/documentation/guides/node.mdx | 6 +- docs/documentation/guides/python.mdx | 6 +- .../platform/identities/overview.mdx | 4 +- .../platform/secret-reference.mdx | 4 +- docs/internals/components.mdx | 2 +- frontend/src/layouts/AppLayout/AppLayout.tsx | 12 +-- .../src/pages/org/[id]/overview/index.tsx | 79 ++++++++++--------- .../IdentitySection/IdentitySection.tsx | 14 +++- .../OrgMembersSection/OrgMembersSection.tsx | 4 +- .../IdentitySection/IdentityModal.tsx | 4 +- .../IdentitySection/IdentitySection.tsx | 14 +++- .../MemberListTab/MemberListTab.tsx | 4 +- .../SecretApprovalPage/SecretApprovalPage.tsx | 18 ++++- .../FolderListView/FolderListView.tsx | 6 +- .../SecretOverviewPage/SecretOverviewPage.tsx | 35 +++++--- .../SecretRotationPage/SecretRotationPage.tsx | 36 +++++++-- 19 files changed, 165 insertions(+), 91 deletions(-) diff --git a/docs/changelog/overview.mdx b/docs/changelog/overview.mdx index 93b6219e3..14aa5379e 100644 --- a/docs/changelog/overview.mdx +++ b/docs/changelog/overview.mdx @@ -7,6 +7,7 @@ The changelog below reflects new product developments and updates on a monthly b ## December 2023 - Added ability to [manage folders via CLI](https://infisical.com/docs/cli/commands/secrets). +- Created new cross-language SDKs for [Python](https://infisical.com/docs/sdks/languages/python), [Node](https://infisical.com/docs/sdks/languages/node), and [Java](https://infisical.com/docs/sdks/languages/java). ## November 2023 diff --git a/docs/documentation/getting-started/sdks.mdx b/docs/documentation/getting-started/sdks.mdx index a406c3ae6..f773e79ea 100644 --- a/docs/documentation/getting-started/sdks.mdx +++ b/docs/documentation/getting-started/sdks.mdx @@ -13,7 +13,8 @@ Prerequisites: Follow the instructions for your language use the SDK for it: -- [Node SDK](https://github.com/Infisical/infisical-node) -- [Python SDK](https://github.com/Infisical/infisical-python) +- [Node SDK](https://infisical.com/docs/sdks/languages/node) +- [Python SDK](https://infisical.com/docs/sdks/languages/python) +- [Java SDK](https://infisical.com/docs/sdks/languages/java) Missing a language? [Throw in a request](https://github.com/Infisical/infisical/issues). \ No newline at end of file diff --git a/docs/documentation/guides/nextjs-vercel.mdx b/docs/documentation/guides/nextjs-vercel.mdx index 52f5b1e8e..8ecd4f927 100644 --- a/docs/documentation/guides/nextjs-vercel.mdx +++ b/docs/documentation/guides/nextjs-vercel.mdx @@ -241,7 +241,7 @@ At this stage, you know how to use the Infisical-Vercel integration to sync prod Check out the [security guide](/security/overview). - Yes. You can also use the Infisical [Node SDK](https://github.com/Infisical/infisical-node) to fetch secrets back to your Next.js app + Yes. You can also use the Infisical [Node SDK](https://infisical.com/docs/sdks/languages/node) to fetch secrets back to your Next.js app in both development and production. Depending on how you use it, however, it may require certain pages to be server-side rendered. diff --git a/docs/documentation/guides/node.mdx b/docs/documentation/guides/node.mdx index d182840b4..f935b8b00 100644 --- a/docs/documentation/guides/node.mdx +++ b/docs/documentation/guides/node.mdx @@ -5,7 +5,7 @@ title: "Node" This guide demonstrates how to use Infisical to manage secrets for your Node stack from local development to production. It uses: - Infisical (you can use [Infisical Cloud](https://app.infisical.com) or a [self-hosted instance of Infisical](https://infisical.com/docs/self-hosting/overview)) to store your secrets. -- The [infisical-node](https://github.com/Infisical/infisical-node) client SDK to fetch secrets back to your Node application on demand. +- The [infisical-node](https://infisical.com/docs/sdks/languages/node) client SDK to fetch secrets back to your Node application on demand. ## Project Setup @@ -38,7 +38,7 @@ Initialize a new Node.js project with a default `package.json` file. npm init -y ``` -Install `express` and [infisical-node](https://github.com/Infisical/infisical-node), the client Node SDK for Infisical. +Install `express` and [infisical-node](https://infisical.com/docs/sdks/languages/node), the client Node SDK for Infisical. ```console npm install express infisical-node @@ -118,4 +118,4 @@ At this stage, you know how to fetch secrets from Infisical back to your Node ap See also: -- Explore the [Node SDK](https://github.com/Infisical/infisical-node) +- Explore the [Node SDK](https://infisical.com/docs/sdks/languages/node) diff --git a/docs/documentation/guides/python.mdx b/docs/documentation/guides/python.mdx index 50ee44a86..a3fdeb843 100644 --- a/docs/documentation/guides/python.mdx +++ b/docs/documentation/guides/python.mdx @@ -5,7 +5,7 @@ title: "Python" This guide demonstrates how to use Infisical to manage secrets for your Python stack from local development to production. It uses: - Infisical (you can use [Infisical Cloud](https://app.infisical.com) or a [self-hosted instance of Infisical](https://infisical.com/docs/self-hosting/overview)) to store your secrets. -- The [infisical-python](https://github.com/Infisical/infisical-python) client SDK to fetch secrets back to your Python application on demand. +- The [infisical-python](https://infisical.com/docs/sdks/languages/python) client SDK to fetch secrets back to your Python application on demand. ## Project Setup @@ -38,7 +38,7 @@ python3 -m venv env source env/bin/activate ``` -Install Flask and [infisical-python](https://github.com/Infisical/infisical-python), the client Python SDK for Infisical. +Install Flask and [infisical-python](https://infisical.com/docs/sdks/languages/python), the client Python SDK for Infisical. ```console pip install Flask infisical @@ -114,6 +114,6 @@ At this stage, you know how to fetch secrets from Infisical back to your Python See also: -- Explore the [Python SDK](https://github.com/Infisical/infisical-python) +- Explore the [Python SDK](https://infisical.com/docs/sdks/languages/python) diff --git a/docs/documentation/platform/identities/overview.mdx b/docs/documentation/platform/identities/overview.mdx index 5197fa411..ad0f925d3 100644 --- a/docs/documentation/platform/identities/overview.mdx +++ b/docs/documentation/platform/identities/overview.mdx @@ -4,8 +4,8 @@ description: "Programmatically interact with Infisical" --- - Currently, identities can only be used to make authenticated requests to the Infisical API and do not work with any clients such as [Node SDK](https://github.com/Infisical/infisical-node) - , [Python SDK](https://github.com/Infisical/infisical-python), CLI, K8s operator, Terraform Provider, etc. + Currently, identities can only be used to make authenticated requests to the Infisical API and do not work with any clients such as [Node SDK](https://infisical.com/docs/sdks/languages/node) + , [Python SDK](https://infisical.com/docs/sdks/languages/python), [Java SDK](https://infisical.com/docs/sdks/languages/java), CLI, K8s operator, Terraform Provider, etc. We will be releasing compatibility with it across clients in the coming quarter. diff --git a/docs/documentation/platform/secret-reference.mdx b/docs/documentation/platform/secret-reference.mdx index 940e7b263..329bc4b9f 100644 --- a/docs/documentation/platform/secret-reference.mdx +++ b/docs/documentation/platform/secret-reference.mdx @@ -12,8 +12,8 @@ This means that updating the value of a base secret propagates directly to other Currently, the secret referencing feature is only supported by the [Infisical CLI](/cli/overview) and [native integrations](/integrations/overview). - We intend to add support for it to the [Node SDK](https://github.com/Infisical/infisical-node) - and [Python SDK](https://github.com/Infisical/infisical-python) this quarter. + We intend to add support for it to the [Node SDK](https://infisical.com/docs/sdks/languages/node), + [Python SDK](https://infisical.com/docs/sdks/languages/python), and [Java SDK](https://infisical.com/docs/sdks/languages/java) this quarter. ![secret referencing](../../images/platform/secret-references-imports/secret-reference.png) diff --git a/docs/internals/components.mdx b/docs/internals/components.mdx index 3ec9adb77..02c6d3692 100644 --- a/docs/internals/components.mdx +++ b/docs/internals/components.mdx @@ -25,6 +25,6 @@ The Web UI is the browser-based portal that connects to the Infisical API. Clients are any application or infrastructure that connecting to the Infisical API using one of the below methods: - Public API: Making API requests directly to the Infisical API. -- Client SDK: A platform-specific library with method abstractions for working with secrets. Currently, there are two official SDKs: [Node SDK](https://github.com/Infisical/infisical-node) and [Python SDK](https://github.com/Infisical/infisical-python). +- Client SDK: A platform-specific library with method abstractions for working with secrets. Currently, there are three official SDKs: [Node SDK](https://infisical.com/docs/sdks/languages/node), [Python SDK](https://infisical.com/docs/sdks/languages/python), and [Java SDK](https://infisical.com/docs/sdks/languages/java). - CLI: A terminal-based interface for interacting with the Infisical API. - Kubernetes Operator: This operator retrieves secrets from Infisical and securely store \ No newline at end of file diff --git a/frontend/src/layouts/AppLayout/AppLayout.tsx b/frontend/src/layouts/AppLayout/AppLayout.tsx index 41c2a1f17..1e4745608 100644 --- a/frontend/src/layouts/AppLayout/AppLayout.tsx +++ b/frontend/src/layouts/AppLayout/AppLayout.tsx @@ -716,6 +716,12 @@ export const AppLayout = ({ children }: LayoutProps) => { ))} + {infisicalPlatformVersion && ( +
+ + Version: {infisicalPlatformVersion} +
+ )} {subscription && @@ -745,12 +751,6 @@ export const AppLayout = ({ children }: LayoutProps) => { )} - {infisicalPlatformVersion && ( -
- - Version: {infisicalPlatformVersion} -
- )} diff --git a/frontend/src/pages/org/[id]/overview/index.tsx b/frontend/src/pages/org/[id]/overview/index.tsx index 554e5120e..b29a4717d 100644 --- a/frontend/src/pages/org/[id]/overview/index.tsx +++ b/frontend/src/pages/org/[id]/overview/index.tsx @@ -67,8 +67,16 @@ const features = [ { _id: 0, name: "Kubernetes Operator", + link: "https://infisical.com/docs/documentation/getting-started/kubernetes", description: "Pull secrets into your Kubernetes containers and automatically redeploy upon secret changes." + }, + { + _id: 1, + name: "Infisical Agent", + link: "https://infisical.com/docs/infisical-agent/overview", + description: + "Inject secrets into your apps without modifying any application logic." } ]; @@ -691,11 +699,44 @@ const OrganizationPage = withPermission( )} +
+

Explore Infisical

+
+ {features.map((feature) => ( +
+
{feature.name}
+
+ {feature.description} +
+
+
+ Setup time: 20 min +
+ + Learn more{" "} + + +
+
+ ))} +
+
{!( new Date().getTime() - new Date(user?.createdAt).getTime() < 30 * 24 * 60 * 60 * 1000 ) && ( -
+

Onboarding Guide

)} -
-

Explore More

-
- {features.map((feature) => ( -
-
{feature.name}
-
- {feature.description} -
-
-
- Setup time: 20 min -
- - Learn more{" "} - - -
-
- ))} -
-
{ diff --git a/frontend/src/views/Org/MembersPage/components/OrgIdentityTab/components/IdentitySection/IdentitySection.tsx b/frontend/src/views/Org/MembersPage/components/OrgIdentityTab/components/IdentitySection/IdentitySection.tsx index c9809500c..7b8c55bf3 100644 --- a/frontend/src/views/Org/MembersPage/components/OrgIdentityTab/components/IdentitySection/IdentitySection.tsx +++ b/frontend/src/views/Org/MembersPage/components/OrgIdentityTab/components/IdentitySection/IdentitySection.tsx @@ -1,4 +1,5 @@ -import { faPlus } from "@fortawesome/free-solid-svg-icons"; +import Link from "next/link"; +import { faArrowUpRightFromSquare, faPlus } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { useNotificationContext } from "@app/components/context/Notifications/NotificationProvider"; @@ -65,17 +66,24 @@ export const IdentitySection = withPermission( return (
-
+

Identities

+
+ + + Documentation + + +
{(isAllowed) => ( +
)} diff --git a/frontend/src/views/Project/MembersPage/components/IdentityTab/components/IdentitySection/IdentitySection.tsx b/frontend/src/views/Project/MembersPage/components/IdentityTab/components/IdentitySection/IdentitySection.tsx index 6212d371a..3381560ff 100644 --- a/frontend/src/views/Project/MembersPage/components/IdentityTab/components/IdentitySection/IdentitySection.tsx +++ b/frontend/src/views/Project/MembersPage/components/IdentityTab/components/IdentitySection/IdentitySection.tsx @@ -1,4 +1,5 @@ -import { faPlus } from "@fortawesome/free-solid-svg-icons"; +import Link from "next/link"; +import { faArrowUpRightFromSquare, faPlus } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { useNotificationContext } from "@app/components/context/Notifications/NotificationProvider"; @@ -61,17 +62,24 @@ export const IdentitySection = withProjectPermission( return (
-
+

Identities

+
+ + + Documentation + + +
{(isAllowed) => (