Continue modifying docs

This commit is contained in:
Tuan Dang
2022-11-19 10:24:39 -05:00
parent 0f6756f2f1
commit 96cbdfdaca
43 changed files with 344 additions and 101 deletions

View File

@@ -0,0 +1,31 @@
---
title: "Infisical CLI"
description: "Learn about each supported command and its flags"
---
## Background
Infisical ships with multiple commands to assist with ongoing project needs; we list these commands and give context for them below.
<Card title="Install the CLI" icon="lightbulb" href="/installCLI">
If you haven't already, install the Infisical CLI
</Card>
Note on arguments:
- [environment]: the intended environment for the given command being one of dev, staging, or prod.
- [projectId]: the project identifier found on the dashboard.
## Commands
- `login` used to set the logged in user. Your credentials are saved securely in your system key ring. Note: only one user can be logged in at a time. To change the logged in user, run the command again and overwrite the previous login.
- `init` used to link your infisical.com project to your local project. Run this command ideally at the root of your local project. You will have to run this command for each new project you create locally.
- `run` used to inject your secrets as environment variables into your application process. Example `infisical run --stage=prod -- npm run start`
- `---projectId` flag is used to link your local project to a Infisical.com project. Use this option only when you are injecting via Infisical Token instead of your login.
- `---stage` flag is used to set the environment from which your secrets are pulled from. By default, secrets from your project are pulled from the `dev`. To change to for example prod, add `--stage=prod`
### Global flags
These are flags you can add to any command
- `--domain` you may change this if you are self hosting Infisical. By default, the CLI points to Infisical.com backend. To point to your own backend, make sure to set this flag for each command you run. Example `infisical login --domain=https://mybackend.com`
- `--debug` use this flag when you want to see more logs related to the error you are receiving. By default debug logs are hidden. Example `infisical run --debug <your command>`

View File

@@ -0,0 +1,68 @@
---
title: "Infisical Token"
description: "Learn to authenticate via the CLI without in manually"
---
## Background
To authenticate the Infisical CLI in environments other than your local desktop environment, you will have to utilize the Infisical Token.
The Infisical Token is a quick and easy way to authenticate the CLI without having to type in your email and password. This is especially needed
in production environments where you cannot type in your login details.
With the Infisical Token, you can allow read only access to a particular environment (dev, prod, etc.) for a given project for a set amount of time. Once the token expires, any CLI application
that relies on it for authentication will be denied access to retrieve the related secrets.
## Generate a Infisical Token
To get started, navigate to your dashboard and select the project for which you would like to generate a Infisical Token for.
Then head over to project settings and you should see a similar page like below.
![title](./images/project_settings_page.png)
To add a new Infisical Token, press the `add new token` button. This will bring up a page like below.
![title](./images/add_new_token.png)
Enter a name to help you identify the token then choose the environment from which you would like the CLI to retrieve the secrets from. Lastly, choose a duration
for the token.
<Info>
Once the token is expired, the CLI using it will no longer be able to make requests with it.
</Info>
## Use Infisical token with CLI
Once you have generated a token, it is easy to tell the Infisical CLI to use it.
### Feeding the token to the CLI
The CLI looks out for an environment variable called `INFISICAL_TOKEN`. Setting this environment variable depends on where you run the CLI.
For example, if you are running the CLI in a Docker container, you may set the environment variable via the docker run command like so.
Docker run example:
```
docker run --env INFISICAL_TOKEN=<the token you generated>...
```
<Warning>
In the event your token is exposed, visit the project settings page again and deactivate the token to expire it immediately.
</Warning>
### Prepare `infisical run` command
Once you have exposed the `INFISICAL_TOKEN` environment variable to the environment the CLI is running in you can prepare the run command.
To have the CLI authenticate via the Infisical Token, you must provide values for flags `--stage` and `--projectId`
Example:
```
infisical run --stage=prod --projectId=<the project id for the token you generated>
```
<Info>
Notice that we do not need to run any other command such as `infisical init` or `infisical login` when we use the Infisical Token.
</Info>
To learn more about the commands and it's flags [visit](/CLI)
### Support
Lastly, if you have any questions or inquiries, shoot an email over to [support@infisical.com](mailto:support@infisical.com) so we can assist you. Alternatively, feel free to post your question or DM us on Slack here; we'd be happy to connect with you.

View File

@@ -0,0 +1,147 @@
---
title: "Installation"
---
Follow the guide for your OS below to install the CLI.
<Tabs>
<Tab title="MacOS">
Use [brew](https://brew.sh/) package manager
```bash
# install
brew install infisical/get-cli/infisical
# check version
infisical --version
```
To update:
```bash
brew upgrade infisical
```
</Tab>
<Tab title="Windows">
Use [Scoop](https://scoop.sh/) package manager
```bash
# install
scoop bucket add org https://github.com/Infisical/scoop-infisical.git
scoop install infisical
# check version
infisical --version
```
To update:
```bash
scoop update infisical
```
</Tab>
<Tab title="Alpine">
Install prerequisite
```bash
$ sudo apk add --no-cache bash sudo
```
Add Infisical repository
```bash
$ curl -1sLf \
'https://dl.cloudsmith.io/public/infisical/infisical-cli/setup.alpine.sh' \
| sudo -E bash
```
Then install CLI
```bash
$ apk update && apk add infisical
```
</Tab>
<Tab title="RedHat/CentOs/Amazon">
Add Infisical repository
```bash
$ curl -1sLf \
'https://dl.cloudsmith.io/public/infisical/infisical-cli/setup.rpm.sh' \
| sudo -E bash
```
Then install CLI
```bash
$ yum install infisical
```
</Tab>
<Tab title="Debian/Ubuntu">
Add Infisical repository
```bash
$ curl -1sLf \
'https://dl.cloudsmith.io/public/infisical/infisical-cli/setup.deb.sh' \
| sudo -E bash
```
Then install CLI
```
$ apt-get update && apt-get install -y infisical
```
</Tab>
</Tabs>
## Usage
Once you have the CLI installed in your system, follow the guide to login and sync your first project.
#### Login
Login to the CLI by running the following command in your terminal
```
infisical login
```
<Info>
To authenticate without logging in manually, read about [Infisical
Token](/infisicalToken)
</Info>
#### Link secrets to your project After logging in, `CD` into the root of your local
project. Then run the following command in the terminal to link your Infisical project
to your local project.
```
infisical init
```
#### Inject
To inject the secrets from the Infisical project you have selected in step 2 into your application process, run the following command.
```
infisical run -- <your application start command>
```
Example:
```
infisical run -- npm run dev
```
By default, Infisical injects secrets from your development environment. To modify from which environment your secrets are pulled from, use the --stage flag
Example:
```
infisical run --stage=prod -- npm run dev
```
You're now automatically pulling and injecting secrets as environment variables into your application!
### Support
We're constantly improving Infisical, so we'd love to get your feedback and take feature requests.
Lastly, if you have any questions or inquiries, shoot an email over to [support@infisical.com](mailto:support@infisical.com) so we can assist you. Alternatively, feel free to post your question or DM us on Slack here; we'd be happy to connect with you.

View File

@@ -0,0 +1,28 @@
---
title: "New Account"
---
## Self-hosted
If you're using a self-hosted installation, follow the [setup](/self-hosting/overview) then open your website URL `{WEBSITE_URL}/login`.
## Infisical Cloud
**Step 1.** Open [infisical.com](https://infisical.com/) and click on either "Try Infisical for free" or "Start for free" to head to the signup sequence.
![title](../../images/landing-page.png)
**Step 2.** Fill out the signup sequence.
After verifying your email address, you'll be prompted to fill out some required fields to set up your account.
| Field | Description |
| ---------- | --------------------------- |
| Email | Enter a valid email address |
| First name | Your first name |
| Last name | Your last name |
| Password | Password |
Once you've done that, you'll be taken to the dashboard where we've populated some default environment variables for demonstration.
![dashboard](../../images/dashboard.png)

View File

@@ -0,0 +1,33 @@
---
title: "Organization"
---
By default, Infisical creates an organization under your name such as "John's Organization." To make changes and add members to your organization, head to your organization settings.
![organization name selected](../../images/dashboard-name-selected.png)
![organization name modal open](../../images/dashboard-name-modal-organization.png)
![organization page](../../images/organization.png)
Feel free to change the name of your organization.
## Members
Members of an organization can create and add other members to projects within that organization.
To add a member to your organization, scroll down to the "Organization Members" section and invite the member via email. They'll receive an email to confirm their organization invitation. If the member is an existing user on the platform, they will be automatically added to the organization.
![organization members](../../images/organization-members.png)
![organization members add](../../images/organization-members-add.png)
Note that access to projects must be provisioned to new members after they've accepted their invitation, and they will not be added to any projects by default.
## Incident contacts
Incident contacts of an organization are alerted if anything abnormal is detected within the operations of an organization.
To add an incident contact to your organization, scroll down to the "Incident Contacts" section and add their email.
![organization incident contacts](../../images/organization-ic.png)
![organization incident contacts add](../../images/organization-ic-add.png)

View File

@@ -0,0 +1,68 @@
---
title: "Project"
---
A project houses environment variables for an application or service.
## Dashboard
The dashboard page is where you can manage environment variables for a given project.
![project dashboard](../../images/dashboard.png)
### Environment variables
Environment variables can be added or removed from a project. By default, they are pre-populated in your first project for demonstration. For any subsequent project, it can be convenient to import existing environment variables by dragging and dropping a .env file containing them.
Here's what dragging and dropping a .env looks like:
![project drag and drop](../../images/project-drag-drop.png)
### Environments
In most cases, environment variables belong to specific environments: development, staging, testing, and production. You can input environment variables for each environment that your project uses.
![project environment](../../images/project-environment.png)
### Personal/Shared scoping
Every environment variable is classified as either personal or shared.
- A personal environment variable is one created by a user of a project to be available for that user only.
- A shared environment variable is one created by a user of a project to be available for other users of the project.
You can toggle the classification of an environment variable by pressing on its settings:
![project variable toggle](../../images/project-envar-toggle.png)
![project variable toggle open](../../images/project-envar-toggle-open.png)
![project variable toggle moved](../../images/project-envar-toggle-moved.png)
### Search
You can search for any environment variable by its key.
![project search](../../images/project-search.png)
![project search typed](../../images/project-search-typed.png)
### Sort
You can sort environment variables alphabetically by their keys.
![project sort](../../images/project-sort.png)
### Hide/Un-hide
You can hide or un-hide the values of your environment variables. By default, the values are hidden for your privacy.
![project hide](../../images/project-hide.png)
![project unhide](../../images/project-hide.png)
### Download as .env
You can download your environment variables back in a .env file.
![project download](../../images/project-download.png)

View File

@@ -0,0 +1,63 @@
---
title: "Features"
---
This is a non-exhaustive list of features that Infisical offers:
## Web UI
The Web UI is used to manage teams and environment variables.
- Provision access to organizations and projects.
- Add/delete/update, scope, search, sort, hide-unhide environment variables.
- Separate environment variables by environment.
- Import environment variables via drag-and-drop, export them as a .env file.
## CLI
The CLI is used to inject environment variables into applications and infrastructure.
- Inject environment variables.
- Inject environment variables into containers via service tokens for Docker.
## Integrations
We're still early with integrations but you'll be able to sync environment variables across your entire infrastructure from local development to CI/CD and production.
| Integration | Status |
| -------------- | ----------- |
| Docker | Available |
| Docker-Compose | Available |
| Kubernetes | Coming soon |
| Vercel | Coming soon |
| AWS | Coming soon |
| GCP | Coming soon |
| Azure | Coming soon |
| DigitalOcean | Coming soon |
| GitLab | Coming soon |
| CircleCI | Coming soon |
| TravisCI | Coming soon |
| GitHub Actions | Coming soon |
| Jenkins | Coming soon |
Missing an integration? Throw in a request.
## Roadmap
We're building the future of secret management, one that's comprehensive and accessible to all. Some high-level features we have in mind:
| Feature | Status |
| ------------------------------------- | --------------- |
| Integrations | Ongoing |
| More hosting options | Ongoing |
| 1-Click Deploys | Ongoing |
| Slack & MS teams integrations | Not yet started |
| Access logs | Not yet started |
| Version control for secrets | Not yet started |
| 2FA | Not yet started |
| Restricted IPs | Not yet started |
| Read/write access controls | Not yet started |
| Secret rotation | Not yet started |
| Comparing secrets across environments | Not yet started |
Interested in contributing? Check out the guide.

View File

@@ -0,0 +1,24 @@
---
title: "Introduction"
---
Infisical is an [open-source](https://opensource.com/resources/what-open-source), end-to-end encrypted (E2EE) secret manager that enables teams to easily manage and sync their environment variables.
It stops [secret sprawl](https://www.gitguardian.com/glossary/secret-sprawl-definition) by providing a single source-of-truth for environment variables. It offers a dashboard for teams to manage environment variables and a platform-agnostic CLI to inject them into apps and infrastructure.
Some problems we solve:
- Leaking .env files to version control.
- Debugging missing environment variables.
- Sending environment variables over email.
Infisical uses [end-to-end encryption](https://en.wikipedia.org/wiki/End-to-end_encryption) to ensure that only designated team members can read their environment variables; unless intended for specific integrations, environment variables are always encrypted before being sent to the server.
<Card
title="Security Brief"
icon="shield-halved"
iconType="duotone"
href="https://dub.sh/XocpMvT"
>
Learn more about our system + security here.
</Card>