diff --git a/docs/getting-started/introduction.mdx b/docs/getting-started/introduction.mdx index d70d12e1b..db69899bc 100644 --- a/docs/getting-started/introduction.mdx +++ b/docs/getting-started/introduction.mdx @@ -1,6 +1,5 @@ --- title: "Introduction" -description: "What is Infisical?" --- Infisical is an [open-source](https://opensource.com/resources/what-open-source), [end-to-end encrypted](https://en.wikipedia.org/wiki/End-to-end_encryption) secret management platform that enables teams to easily manage and sync their environment variables. @@ -9,12 +8,12 @@ Start syncing environment variables with [Infisical Cloud](https://app.infisical - Tour Infisical in a few minutes. + Tour Infisical in a few minutes Install the CLI to inject secrets into apps and infra. diff --git a/docs/getting-started/quickstart.mdx b/docs/getting-started/quickstart.mdx index dba032e6e..bcc364262 100644 --- a/docs/getting-started/quickstart.mdx +++ b/docs/getting-started/quickstart.mdx @@ -1,5 +1,5 @@ --- -title: "Quickstart" +title: "Quickstarts" description: "Start managing developer secrets and configs with Infisical in minutes." --- diff --git a/docs/getting-started/quickstarts/cli.mdx b/docs/getting-started/quickstarts/cli.mdx new file mode 100644 index 000000000..ed5404851 --- /dev/null +++ b/docs/getting-started/quickstarts/cli.mdx @@ -0,0 +1,118 @@ +--- +title: "CLI" +--- + +The CLI is commonly used in local development instead of `.env` files to inject secrets from the Infisical platform into any framework including [Next.js](/integrations/frameworks/nextjs), [Express](/integrations/frameworks/express), [Flask](/integrations/frameworks/flask), [Ruby on Rails](/integrations/frameworks/rails), [Laravel](/integrations/frameworks/laravel) and [more](/integrations/overview) as environment variables. + +Prerequisites: + +- Have a project with secrets ready in [Infisical Cloud](https://app.infisical.com) + +## Installation + +Follow the instructions for your operating system to install the Infisical CLI. + + + + Use [brew](https://brew.sh/) package manager + + ```console + $ brew install infisical/get-cli/infisical + ``` + + + Use [Scoop](https://scoop.sh/) package manager + + ```console + $ scoop bucket add org https://github.com/Infisical/scoop-infisical.git + ``` + + ```console + $ scoop install infisical + ``` + + + Install prerequisite + ```console + $ apk add --no-cache bash sudo + ``` + + Add Infisical repository + ```console + $ curl -1sLf \ + 'https://dl.cloudsmith.io/public/infisical/infisical-cli/setup.alpine.sh' \ + | bash + ``` + + Then install CLI + ```console + $ apk update && sudo apk add infisical + ``` + + + + Add Infisical repository + ```console + $ curl -1sLf \ + 'https://dl.cloudsmith.io/public/infisical/infisical-cli/setup.rpm.sh' \ + | sudo -E bash + ``` + + Then install CLI + ```console + $ sudo yum install infisical + ``` + + + + Add Infisical repository + + ```console + $ curl -1sLf \ + 'https://dl.cloudsmith.io/public/infisical/infisical-cli/setup.deb.sh' \ + | sudo -E bash + ``` + + Then install CLI + ```console + $ sudo apt-get update && sudo apt-get install -y infisical + ``` + + + + Use the `yay` package manager to install from the [Arch User Repository](https://aur.archlinux.org/packages/infisical-bin) + + ```console + $ yay -S infisical-bin + ``` + + + + +## Login + +Authenticate the CLI with the Infisical platform using your email and password. + +```console +$ infisical login +``` + +## Initialization + +Navigate to the root of your project directory and run the `init` command. This step connects your local project to the project on the Infisical platform and creates a `infisical.json` file containing a reference to that latter project. + +```console +$ infisical init +``` + +## Start your app with environment variables injected + +```console +$ infisical run -- [your application start command] +``` + +Your app should now be running with the secrets from Infisical injected as environment variables. + +Resources: + +- [List of confirmed frameworks](/integrations/overview) \ No newline at end of file diff --git a/docs/getting-started/quickstarts/docker.mdx b/docs/getting-started/quickstarts/docker.mdx new file mode 100644 index 000000000..5f144292a --- /dev/null +++ b/docs/getting-started/quickstarts/docker.mdx @@ -0,0 +1,4 @@ +--- +title: "Docker" +description: "Inject secrets into your Docker containers" +--- diff --git a/docs/getting-started/quickstarts/k8s.mdx b/docs/getting-started/quickstarts/k8s.mdx new file mode 100644 index 000000000..70c04b838 --- /dev/null +++ b/docs/getting-started/quickstarts/k8s.mdx @@ -0,0 +1,4 @@ +--- +title: "Kubernetes" +description: "Fetch and save secrets as native Kubernetes secrets" +--- diff --git a/docs/getting-started/quickstarts/overview.mdx b/docs/getting-started/quickstarts/overview.mdx new file mode 100644 index 000000000..14bab522a --- /dev/null +++ b/docs/getting-started/quickstarts/overview.mdx @@ -0,0 +1,41 @@ +--- +title: "Overview" +--- + +### Learn about Infisical + + + Store secrets like API keys, database credentials, environment variables with Infisical + + +### Integrate with Infisical + + + + Fetch secrets for any programming language on demand + + + Inject secrets into any application process/environment + + + Inject secrets into Docker containers + + + Fetch and save secrets as native Kubernetes secrets + + \ No newline at end of file diff --git a/docs/getting-started/quickstarts/platform.mdx b/docs/getting-started/quickstarts/platform.mdx new file mode 100644 index 000000000..0bf2aedfe --- /dev/null +++ b/docs/getting-started/quickstarts/platform.mdx @@ -0,0 +1,61 @@ +--- +title: "Platform" +--- + +Infisical is an [open-source](https://opensource.com/resources/what-open-source), [end-to-end encrypted](https://en.wikipedia.org/wiki/End-to-end_encryption) secret management platform that enables teams to easily store, manage, and sync secrets like API keys, database credentials, and environment variables across their apps and infrastructure. + +This quickstart provides an overview of the core and useful functionalities offered by the platform. + +## Usage + +Infisical can be used on [Infisical Cloud](https://app.infisical.com/login) (our hosted/managed solution) or [self-hosted on your own infrastructure](/self-hosting/overview). + +Inside Infisical, you'll find that every secret belongs to a project that in turn belongs to an organization. + +## Projects + +Project houses secrets for applications. + +### Secrets Overview + +The secrets overview provides a bird's-eye view of all the secrets in a project and is particularly useful for identifying missing secrets across environments. + +![dashboard secrets overview](../../images/dashboard-secrets-overview.png) + +### Secrets Dashboard + +The secrets dashboard lets you manage secrets for a specific environment in a project. +Here, developers can [override secrets](/getting-started/dashboard/project#personal-overrides), [version secrets](/getting-started/dashboard/secret-versioning), [rollback projects to any point in time](/getting-started/dashboard/pit-recovery), and much more. + +![dashboard](../../images/dashboard.png) + +### Integrations + +The integrations page provides native integrations to sync secrets from a project environment to a [host of ever-expanding integrations](/integrations/overview). + + + Depending on your infrastructure setup and compliance requirements, you may or may not prefer to use these native integrations since they break end-to-end encryption (E2EE). + + You will learn about various ways to integrate with Infisical and maintain E2EE in subsequent quickstart sections. + + +![integrations](../../images/integrations.png) + +### Access Control + +The members page lets you add/remove members for a project and provision them access to environments (access levels include `No Access`, `Read Only`, and `Read and Write`). + +![project members](../../images/project-members.png) + +## Organizations + +Organizations house projects and members. + +### Organization Settings + +At the organization-level, you can add/remove members and manage their access to projects. + +![organization name modal open](../../images/dashboard-name-modal-organization.png) +![organization name modal open](../../images/organization.png) + +That's it for the platform quickstart! — We encourage you to continue exploring the documentation to gain a deeper understanding of the extensive features and functionalities that Infisical has to offer. \ No newline at end of file diff --git a/docs/getting-started/quickstarts/sdks.mdx b/docs/getting-started/quickstarts/sdks.mdx new file mode 100644 index 000000000..6da93d581 --- /dev/null +++ b/docs/getting-started/quickstarts/sdks.mdx @@ -0,0 +1,143 @@ +--- +title: "SDKs" +--- + +From local development to production, Infisical's language-specific SDKs provide the easiest way for your app to fetch back secrets on demand. + +Prerequisites: + +- Have a project with secrets ready in [Infisical Cloud](https://app.infisical.com) +- Create an [Infisical Token](/getting-started/dashboard/token) scoped to an environment in your project. + + + + + + ## Installation + + Run `npm` to add [infisical-node](https://github.com/Infisical/infisical-node) to your project. + + ```console + $ npm install infisical-node --save + ``` + + ## Configuration + + Import the SDK and create a client instance with your [Infisical Token](/getting-started/dashboard/token). + + + + ```js + import InfisicalClient from "infisical-node"; + + const client = new InfisicalClient({ + token: "your_infisical_token" + }); + ``` + + + + ```js + const InfisicalClient = require("infisical-node"); + + const client = new InfisicalClient({ + token: "your_infisical_token" + }); + ```` + + + ## Get a Secret + + ```js + const secret = await client.getSecret("API_KEY"); + const value = secret.secretValue; // get its value + ``` + + ## Basic Usage + + ```js + import express from "express"; + import InfisicalClient from "infisical-node"; + const app = express(); + const PORT = 3000; + + const client = new InfisicalClient({ + token: "YOUR_INFISICAL_TOKEN" + }); + + app.get("/", async (req, res) => { + // access value + const name = await client.getSecret("NAME"); + res.send(`Hello! My name is: ${name.secretValue}`); + }); + + app.listen(PORT, async () => { + console.log(`App listening on port ${port}`); + }); + ``` + + This example demonstrates how to use the Infisical Node SDK with an Express application. The application retrieves a secret named "NAME" and responds to requests with a greeting that includes the secret value. + + For a comprehensive overview, refer to the complete [documentation for the Node SDK](/sdks/languages/node). + + + + ## Installation + + Run `pip` to add [infisical-python](https://github.com/Astropilot/infisical-python) to your project + + ```console + $ pip install infisical + ``` + + Note: You need Python 3.7+. + + ## Configuration + + Import the SDK and create a client instance with your [Infisical Token](/getting-started/dashboard/token). + + ```py + from infisical import InfisicalClient + + client = InfisicalClient(token="your_infisical_token") + ``` + + ## Get a Secret + + ```py + secret = client.get_secret("API_KEY") + value = secret.secret_value # get its value + ``` + + ## Basic Usage + + ```py + from flask import Flask + from infisical import InfisicalClient + + app = Flask(__name__) + + client = InfisicalClient(token="your_infisical_token") + + @app.route("/") + def hello_world(): + # access value + name = client.get_secret("NAME") + return f"Hello! My name is: {name.secret_value}" + ``` + + This example demonstrates how to use the Infisical Python SDK with a Flask application. The application retrieves a secret named "NAME" and responds to requests with a greeting that includes the secret value. + + For a comprehensive overview, please refer to the complete [documentation for the Python SDK](/sdks/languages/python). + + + We're currently working on SDKs for other languages. Follow the GitHub issue for your needed language below: + - [Java](https://github.com/Infisical/infisical/issues/434) + - [Ruby](https://github.com/Infisical/infisical/issues/435) + - [Go](https://github.com/Infisical/infisical/issues/436) + - [Rust](https://github.com/Infisical/infisical/issues/437) + - [PHP](https://github.com/Infisical/infisical/issues/531) + + Missing a language? Throw in a [request](https://github.com/Infisical/infisical/issues). + + \ No newline at end of file diff --git a/docs/images/dashboard-secrets-overview.png b/docs/images/dashboard-secrets-overview.png new file mode 100644 index 000000000..68b31de72 Binary files /dev/null and b/docs/images/dashboard-secrets-overview.png differ diff --git a/docs/images/project-members.png b/docs/images/project-members.png new file mode 100644 index 000000000..87b2a7ee4 Binary files /dev/null and b/docs/images/project-members.png differ diff --git a/docs/mint.json b/docs/mint.json index 606c4dc76..5aa1304d2 100644 --- a/docs/mint.json +++ b/docs/mint.json @@ -80,7 +80,17 @@ "group": "Overview", "pages": [ "getting-started/introduction", - "getting-started/quickstart", + { + "group": "Quickstarts", + "pages": [ + "getting-started/quickstarts/overview", + "getting-started/quickstarts/platform", + "getting-started/quickstarts/sdks", + "getting-started/quickstarts/cli", + "getting-started/quickstarts/docker", + "getting-started/quickstarts/k8s" + ] + }, "getting-started/features" ] }, @@ -199,7 +209,8 @@ "sdks/languages/java", "sdks/languages/ruby", "sdks/languages/go", - "sdks/languages/rust" + "sdks/languages/rust", + "sdks/languages/php" ] }, { diff --git a/docs/sdks/languages/node.mdx b/docs/sdks/languages/node.mdx index 7f0176f91..055d5eddd 100644 --- a/docs/sdks/languages/node.mdx +++ b/docs/sdks/languages/node.mdx @@ -24,12 +24,11 @@ app.get("/", async (req, res) => { }); app.listen(PORT, async () => { - // initialize client - console.log(`App listening on port ${port}`); + console.log(`App listening on port ${PORT}`); }); ``` -This example demonstrates how to use the Infisical SDK with an Express application. The application retrieves a secret named "NAME" and responds to requests with a greeting that includes the secret value. +This example demonstrates how to use the Infisical Node SDK with an Express application. The application retrieves a secret named "NAME" and responds to requests with a greeting that includes the secret value. We do not recommend hardcoding your [Infisical @@ -47,7 +46,7 @@ $ npm install infisical-node --save ## Configuration -Import the SDK and create a client instance with your Infisical token. +Import the SDK and create a client instance with your [Infisical Token](/getting-started/dashboard/token). @@ -57,8 +56,6 @@ Import the SDK and create a client instance with your Infisical token. const client = new InfisicalClient({ token: "your_infisical_token" }); - - // your app logic ``` @@ -69,8 +66,6 @@ Import the SDK and create a client instance with your Infisical token. const client = new InfisicalClient({ token: "your_infisical_token" }); - - // your app logic ```` diff --git a/docs/sdks/languages/php.mdx b/docs/sdks/languages/php.mdx new file mode 100644 index 000000000..996b95c74 --- /dev/null +++ b/docs/sdks/languages/php.mdx @@ -0,0 +1,8 @@ +--- +title: "PHP" +icon: "php" +--- + +Coming soon. + +Follow this GitHub [issue](https://github.com/Infisical/infisical/issues/531) to stay updated. \ No newline at end of file diff --git a/docs/sdks/languages/python.mdx b/docs/sdks/languages/python.mdx index 27ba41271..d573109bc 100644 --- a/docs/sdks/languages/python.mdx +++ b/docs/sdks/languages/python.mdx @@ -42,7 +42,7 @@ Note: You need Python 3.7+. ## Configuration -Import the SDK and create a client instance with your Infisical token. +Import the SDK and create a client instance with your [Infisical Token](/getting-started/dashboard/token). ```py from infisical import InfisicalClient diff --git a/docs/sdks/overview.mdx b/docs/sdks/overview.mdx index e1d85dae2..7a6512356 100644 --- a/docs/sdks/overview.mdx +++ b/docs/sdks/overview.mdx @@ -13,3 +13,4 @@ We currently have the [Node SDK](/sdks/languages/node) and [Python SDK](/sdks/la - [Ruby](/sdks/languages/ruby) - [Go](/sdks/languages/go) - [Rust](/sdks/languages/rust) +- [PHP](/sdks/languages/php)