Fix merge conflicts

This commit is contained in:
Tuan Dang
2023-01-30 19:48:12 +07:00
167 changed files with 5540 additions and 1256 deletions

View File

@@ -1,5 +1,6 @@
---
title: "Commands"
description: "Infisical CLI command overview"
---
## Commands

View File

@@ -1,5 +1,6 @@
---
title: "infisical export"
description: "Export Infisical secrets from CLI into different file formats"
---
```bash

View File

@@ -1,5 +1,6 @@
---
title: "infisical init"
description: "Switch between Infisical projects within CLI"
---
```bash

View File

@@ -1,5 +1,6 @@
---
title: "infisical login"
description: "Login into Infisical from the CLI"
---
```bash

View File

@@ -1,5 +1,6 @@
---
title: "infisical run"
description: "The command that injects your secrets into local environment"
---
<Tabs>

View File

@@ -1,5 +1,6 @@
---
title: "infisical secrets"
description: "Perform CRUD operations with Infisical secrets"
---
```

View File

@@ -1,5 +1,6 @@
---
title: "infisical vault"
description: "Change the vault type in Infisical"
---
<Tabs>

View File

@@ -1,5 +1,6 @@
---
title: "FAQ"
description: "Frequently Asked Questions about Infisical"
---
Frequently asked questions about the CLI can be found on this page.

View File

@@ -1,5 +1,6 @@
---
title: 'Install'
description: "Infisical's CLI is one of the best way to manage environments and secrets. Install it here"
---
Prerequisite: Set up an account with [Infisical Cloud](https://app.infisical.com) or via a [self-hosted installation](/self-hosting/overview).

View File

@@ -1,5 +1,6 @@
---
title: "Infisical Token"
description: "How to use Infical service token within the CLI."
---
Prerequisite: [Infisical Token and How to Generate One](../../getting-started/dashboard/token).

View File

@@ -1,5 +1,6 @@
---
title: "Usage"
description: "How to manage you secrets with Infisical's CLI?"
---
Prerequisite: [Install the CLI](/cli/overview)

View File

@@ -1,6 +1,6 @@
---
title: "Code of Conduct"
description: ""
description: "What you should know before contributing to Infisical?"
---
## Our Pledge

View File

@@ -1,13 +1,12 @@
---
title: 'Developing'
title: 'Local development'
description: 'This guide will help you set up and run Infisical in development mode.'
---
## Clone the repo
```bash
# change location to the path you want Infisical to be installed
cd ~
# navigate location to the path you want Infisical to be installed
# clone the repo and cd to Infisical dir
git clone https://github.com/Infisical/infisical
@@ -16,57 +15,71 @@ cd infisical
## Set up environment variables
Start by creating a .env file at the root of the Infisical directory. It's best to start with the provided [`.env.example`](https://github.com/Infisical/infisical/blob/main/.env.example) template containing the necessary envars to fill out your .env file — you only have to modify the SMTP parameters.
Start by creating a .env file at the root of the Infisical directory then copy the contents of the file below into the .env file.
<Accordion title=".env file content">
```env
# Keys
# Required key for platform encryption/decryption ops
ENCRYPTION_KEY=6c1fe4e407b8911c104518103505b218
# JWT
# Required secrets to sign JWT tokens
JWT_SIGNUP_SECRET=3679e04ca949f914c03332aaaeba805a
JWT_REFRESH_SECRET=5f2f3c8f0159068dc2bbb3a652a716ff
JWT_AUTH_SECRET=4be6ba5602e0fa0ac6ac05c3cd4d247f
JWT_SERVICE_SECRET=f32f716d70a42c5703f4656015e76200
# MongoDB
# Backend will connect to the MongoDB instance at connection string MONGO_URL which can either be a ref
# to the MongoDB container instance or Mongo Cloud
# Required
MONGO_URL=mongodb://root:example@mongo:27017/?authSource=admin
# Optional credentials for MongoDB container instance and Mongo-Express
MONGO_USERNAME=root
MONGO_PASSWORD=example
# Website URL
# Required
SITE_URL=http://localhost:8080
# Mail/SMTP
SMTP_HOST='smtp-server'
SMTP_PORT='1025'
SMTP_NAME='local'
SMTP_USERNAME='team@infisical.com'
SMTP_PASSWORD=
```
</Accordion>
<Warning>
The pre-populated environment variable values in the `.env.example` file are meant to be used in development only.
You'll want to fill in your own values in production, especially concerning encryption keys, secrets, and SMTP parameters.
The pre-populated environment variable values above are meant to be used in development only. They should never be used in production.
</Warning>
Refer to the [environment variable list](https://infisical.com/docs/self-hosting/configuration/envars) for guidance on each envar.
View all available [environment variables](https://infisical.com/docs/self-hosting/configuration/envars) and guidance for each.
### Helpful tips for developing with Infisical:
## Starting Infisical for development
<Tip>
Use the `ENCRYPTION_KEY`, JWT-secret envars, `MONGO_URL`, `MONGO_USERNAME`, `MONGO_PASSWORD` provided in the `.env.example` file.
We use use Docker to easily spin up all required services to have Infisical up and running for development. If you are unfamiliar with Docker, don't worry, all you have to do is install [Docker](https://docs.docker.com/get-docker/) for your
machine and run the commands below to start up the development server.
If setting your own values:
- `ENCRYPTION_KEY` should be a [32-byte random hex](https://www.browserling.com/tools/random-hex)
- `MONGO_URL` should take the form: `mongodb://[MONGO_USERNAME]:[MONGO_PASSWORD]@mongo:27017/?authSource=admin`.
</Tip>
<Tip>
Bring and configure your own SMTP server by following our [email configuration guide](https://infisical.com/docs/self-hosting/configuration/email) (we recommend using either SendGrid or Mailgun).
Alternatively, you can use the provided development (Mailhog) SMTP server to send and browse emails sent by the backend on http://localhost:8025; to use this option, set the following `SMTP_HOST`, `SMTP_PORT`, `SMTP_FROM_NAME`, `SMTP_USERNAME`, `SMTP_PASSWORD` below.
</Tip>
```
SMTP_HOST=smtp-server
SMTP_PORT=1025
SMTP_FROM_ADDRESS=team@infisical.com
SMTP_FROM_NAME=Infisical
SMTP_USERNAME=team@infisical.com
SMTP_PASSWORD=
```
<Warning>
If using Mailhog, make sure to leave the `SMTP_PASSWORD` blank so the backend can connect to MailHog.
</Warning>
## Docker for development
#### Start local server
```bash
# build and start the services
docker-compose -f docker-compose.dev.yml up --build --force-recreate
```
#### Access local server
Then browse http://localhost:8080
Once all the services have spun up, browse to http://localhost:8080. To sign in, you may use the default credentials listed below.
Email: `test@localhost.local`
Password: `testInfisical1`
#### Shutdown local server
```bash
# To stop environment use Control+C (on Mac) CTRL+C (on Win) or
docker-compose -f docker-compose.dev.yml down
# start services
docker-compose -f docker-compose.dev.yml up
```

View File

@@ -1,5 +1,6 @@
---
title: "Activity Logs"
description: "See which events are triggered within your Infisical project."
---
Activity logs record all actions going through Infisical including who performed which CRUD operations on environment variables and from what IP address. They help answer questions like:

View File

@@ -1,5 +1,6 @@
---
title: "Sign up"
description: "How to create an account in Infisical?"
---
## Self-hosted

View File

@@ -1,10 +1,11 @@
---
title: "Integrations"
description: "How to sync your secrets among various 3rd-party services with Infisical."
---
Integrations allow environment variables to be synced across your entire infrastructure from local development to CI/CD and production.
We're still early with integrations, but expect more soon.
We're still relatively early with integrations. 6+ integrations are already avaiable but expect more coming very soon.
<Card title="View integrations" icon="link" href="/integrations/overview">
View all available integrations and their guides

View File

@@ -1,5 +1,6 @@
---
title: "Organization"
description: "How Infisical structures its organizations."
---
An organization houses projects and members.

View File

@@ -1,5 +1,6 @@
---
title: "Point-in-Time Recovery"
description: "How to rollback secrets and configs to any commit with Infisical."
---
Point-in-time recovery allows environment variables to be rolled back to any point in time. It's powered by snapshots that get captured after mutations to environment variables.

View File

@@ -1,5 +1,6 @@
---
title: "Project"
description: "How Infisical organizes secrets into projects."
---
A project houses environment variables for an application.

View File

@@ -1,5 +1,6 @@
---
title: "Secret Versioning"
description: "Version secrets and configurations with Infisical"
---
Secret versioning records changes made to every secret.

View File

@@ -1,5 +1,6 @@
---
title: "Infisical Token"
description: "Use Infisical service token as one of the authentication methods."
---
An Infisical Token is needed to authenticate the CLI when there isn't an easy way to input your login credentials.

View File

@@ -1,5 +1,6 @@
---
title: "Features"
description: "A list of features that Infisical has to offer."
---
This is a non-exhaustive list of features that Infisical offers:
@@ -30,9 +31,9 @@ We're building the future of secret management, one that's comprehensive and acc
| More hosting options | Ongoing |
| 1-Click Deploys | Ongoing |
| Account recovery: Backup key | Ongoing |
| Access logs | Ongoing |
| Account recovery: Member-assisted | Coming soon |
| Slack & MS teams integrations | Coming soon |
| Access logs | Coming soon |
| Version control for secrets | Coming soon |
| 2FA | Coming soon |
| Restricted IPs | Coming soon |

View File

@@ -1,5 +1,6 @@
---
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 manager that enables teams to easily manage and sync their environment variables.
@@ -35,3 +36,8 @@ Start syncing environment variables with [Infisical Cloud](https://app.infisical
Explore integrations for Docker, AWS, Heroku, etc.
</Card>
</CardGroup>
<Card title="Set up a 1x1 with an Infisical Engineer" iconType="duotone" color="#ca8b04" href="https://calendly.com/maidull/30min">
Our team is happy to help you get started with Infisical. If you have any questions or want to learn how you can leverage Infisical within your infrastructure, **[set up a 1-on-1 with an Infisical engineer](https://cal.com/maidul/15min)**.
</Card>

View File

@@ -1,5 +1,6 @@
---
title: "Quickstart"
description: "Start managing your developer secrets and configs with Infisical in 10 minutes."
---
This example demonstrates how to store and inject environment variables from [Infisical Cloud](https://app.infisical.com) into your application.

View File

@@ -1,5 +1,6 @@
---
title: "GitHub Actions"
description: "How to automatically sync secrets from Infisical into your GitHub Actions."
---
<Warning>

View File

@@ -1,5 +1,6 @@
---
title: "Fly.io"
description: "How to automatically sync secrets from Infisical into your Fly.io project."
---
Prerequisites:

View File

@@ -1,5 +1,6 @@
---
title: "Heroku"
description: "How to automatically sync secrets from Infisical into your Heroku project."
---
Prerequisites:

View File

@@ -1,5 +1,6 @@
---
title: "Netlify"
description: "How to automatically sync secrets from Infisical into your Netlify project."
---
<Warning>

View File

@@ -1,5 +1,6 @@
---
title: "Render"
description: "How to automatically sync secrets from Infisical into your Render project."
---
Prerequisites:

View File

@@ -1,5 +1,6 @@
---
title: "Vercel"
description: "How to automatically sync secrets from Infisical into your Vercel project."
---
Prerequisites:

View File

@@ -1,5 +1,6 @@
---
title: "Django"
description: "How to use Infisical to inject environment variables and secrets into a Django app."
---
Prerequisites:

View File

@@ -1,5 +1,6 @@
---
title: ".NET"
description: "How to use Infisical to inject environment variables and secrets into a .NET app."
---
Prerequisites:

View File

@@ -1,5 +1,6 @@
---
title: "Express, Fastify, Koa"
description: "How to use Infisical to inject environment variables and secrets into an Express app."
---
Prerequisites:

View File

@@ -1,5 +1,6 @@
---
title: "Fiber"
description: "How to use Infisical to inject environment variables and secrets into a Fiber app."
---
Prerequisites:

View File

@@ -1,5 +1,6 @@
---
title: "Flask"
description: "How to use Infisical to inject environment variables and secrets into a Flask app."
---
Prerequisites:

View File

@@ -1,5 +1,6 @@
---
title: "Gatsby"
description: "How to use Infisical to inject environment variables and secrets into a Gatsby app."
---
Prerequisites:

View File

@@ -1,5 +1,6 @@
---
title: "Laravel"
description: "How to use Infisical to inject environment variables and secrets into a Laravel app."
---
Prerequisites:

View File

@@ -1,5 +1,6 @@
---
title: "NestJS"
description: "How to use Infisical to inject environment variables and secrets into a NestJS app."
---
Prerequisites:

View File

@@ -1,5 +1,6 @@
---
title: "Next.js"
description: "How to use Infisical to inject environment variables and secrets into a Next.js app."
---
Prerequisites:

View File

@@ -1,5 +1,6 @@
---
title: "Nuxt"
description: "How to use Infisical to inject environment variables and secrets into a Nuxt app."
---
Prerequisites:

View File

@@ -1,5 +1,6 @@
---
title: "Ruby on Rails"
description: "How to use Infisical to inject environment variables and secrets into a Ruby on Rails app."
---
Prerequisites:

View File

@@ -1,5 +1,6 @@
---
title: "React"
description: "How to use Infisical to inject environment variables and secrets into a React app."
---
Prerequisites:

View File

@@ -1,5 +1,6 @@
---
title: "Remix"
description: "How to use Infisical to inject environment variables and secrets into a Remix app."
---
Prerequisites:

View File

@@ -1,5 +1,6 @@
---
title: "Vite"
description: "How to use Infisical to inject environment variables and secrets into a Vite app."
---
Prerequisites:

View File

@@ -1,5 +1,6 @@
---
title: "Vue"
description: "How to use Infisical to inject environment variables and secrets into a Vue.js app."
---
Prerequisites:

View File

@@ -1,5 +1,6 @@
---
title: "Overview"
description: "How to use Infisical to inject secrets and configs into various 3-rd party services and frameworks."
---
Integrations allow environment variables to be synced from Infisical into your local development workflow, CI/CD pipelines, and production infrastructure.

View File

@@ -1,5 +1,6 @@
---
title: "Docker Compose"
description: "How to use Infisical to inject environment variables into container defined in your Docker Compose file."
---
The Docker Compose integration enables you to inject environment variables from Infisical into the containers defined in your compose file.

View File

@@ -1,5 +1,6 @@
---
title: "Docker"
description: "How to use Infisical to inject environment variables into a Docker container."
---
Infisical can be used in a Dockerfile to inject environment variables into a Docker container.
@@ -31,25 +32,22 @@ Infisical can be used in a Dockerfile to inject environment variables into a Doc
</Tab>
</Tabs>
## Modify the start command in your Dockerfile
## Modify your Dockerfile start command
```dockerfile
CMD ["infisical", "--env=[env]", "projectId=[projectId]", "run", "---", "[your application start command]"]
To make your Docker container consume Infisical secrets, you can start your application with Infisical.
This will automatically pull the necessary secrets and make them available to your application as if they were natively exposed within the container.
# example
CMD ["infisical", "--env=prod", "projectId=62faf98ae0b05e83239b5da41", "run", "---", "npm run start"]
```
```dockerfile
CMD ["infisical", "run", "---", "[your application start command]"]
Required options:
# example with single single command
CMD ["infisical", "run", "---", "npm run start"]
| Option | Description | Default value |
| ------------- | ----------------------------------------------------------------------------------------------------------- | ------------- |
| `--env` | Used to set the environment that secrets are pulled from. Accepted values: `dev`, `staging`, `test`, `prod` | `dev` |
| `--projectId` | Used to link a local project to the platform | `None` |
# example with multiple commands
CMD ["infisical", "run", "--command", "npm run start && ..."]
```
## Generate an Infisical Token
[Generate an Infisical Token](../../getting-started/dashboard/token) and keep it handy.
View more options for the `run` command [here](../../cli/commands/run)
## Feed Docker your Infisical Token
@@ -58,3 +56,8 @@ The CLI looks out for an environment variable called `INFISICAL_TOKEN`. If the t
```bash
docker run --env INFISICAL_TOKEN=[token]...
```
## Generate an Infisical Token
[Generate an Infisical Token](../../getting-started/dashboard/token) and keep it handy.

View File

@@ -1,5 +1,6 @@
---
title: 'Kubernetes'
description: "This page explains how to use Infisical to inject secrets into Kubernetes clusters."
---
The Infisical Secrets Operator is a custom Kubernetes controller that helps keep secrets in a cluster up to date by synchronizing them.

View File

@@ -1,5 +1,6 @@
---
title: "Data Model"
description: "Infisical's current Data Structure."
---
Infisical stores a range of data namely user, secrets, keys, organization, project, and membership data.

View File

@@ -1,5 +1,6 @@
---
title: "Mechanics"
description: "Quick explanation of how Infisical works."
---
## Signup

View File

@@ -1,12 +1,13 @@
---
title: "Overview"
description: "Infisical's security statement."
---
## Summary
Infisical uses end-to-end encryption (E2EE) whenever possible to securely store and share secrets. It uses secure remote password (SRP) to handle authentication and public-key cryptography for secret sharing and syncing; secrets are symmetrically encrypted at rest by keys decryptable only by members of the project.
Infisical uses AES256-GCM for symmetric encryption and x2519-xsalsa20-poly1305 for asymmetric encryption operations mentioned in this brief; key generation and asymmetric algorithms are implemented with the [TweetNaCl.js](https://tweetnacl.js.org/#/) library which has been well-audited and recommended for use by cybersecurity firm Cure53. Lastly, the secure remote password (SRP) implementation uses [jsrp](https://github.com/alax/jsrp) package for user authentication. As part of our commitment to user privacy and security, we aim to conduct formal security and compliance audits in the following year.
Infisical uses AES256-GCM for symmetric encryption and x25519-xsalsa20-poly1305 for asymmetric encryption operations mentioned in this brief; key generation and asymmetric algorithms are implemented with the [TweetNaCl.js](https://tweetnacl.js.org/#/) library which has been well-audited and recommended for use by cybersecurity firm Cure53. Lastly, the secure remote password (SRP) implementation uses [jsrp](https://github.com/alax/jsrp) package for user authentication. As part of our commitment to user privacy and security, we aim to conduct formal security and compliance audits in the following year.
## Scope

View File

@@ -1,6 +1,6 @@
---
title: "Email"
description: ""
description: "How to configure your email when self-hosting Infisical."
---
Infisical requires you to configure your own SMTP server for certain functionality like:

View File

@@ -1,6 +1,6 @@
---
title: "Environment Variables"
description: ""
description: "How to configure your environment variables when self-hosting Infisical."
---
Configuring Infisical requires setting some environment variables. There is a file called [`.env.example`](https://github.com/Infisical/infisical/blob/main/.env.example) at the root directory of our main repo that you can use to create a `.env` file before you start the server.

View File

@@ -1,6 +1,6 @@
---
title: "Kubernetes"
description: "Deploy with Kubernetes"
description: "How to deploy Infisical with Kubernetes"
---
<Info>
@@ -23,35 +23,66 @@ If you're less technical and looking for a hands-free experience with minimal ov
Before you can deploy the Helm chart, you must fill out the required environment variables. To do so, please copy the below file to a `.yaml` file.
Refer to the available [environment variables](../../self-hosting/configuration/envars) to learn more
<Accordion title="vaules.yaml">
<Accordion title="values.yaml">
```yaml
#####
# INFISICAL K8 DEFAULT VALUES FIL
# INFISICAL K8 DEFAULT VALUES FILE
# PLEASE REPLACE VALUES/EDIT AS REQUIRED
#####
frontend:
replicaCount: 1
image:
repository:
pullPolicy: IfNotPresent
tag: "latest"
# kubeSecretRef: some-kube-secret-name
nameOverride: ""
frontend:
name: frontend
podAnnotations: {}
deploymentAnnotations: {}
replicaCount: 2
image:
repository: infisical/frontend
pullPolicy: Always
tag: "latest" # It it highly recommended to select a specific tag for prod deployment so it is easy to rollback: https://hub.docker.com/r/infisical/frontend/tags
# kubeSecretRef: some-kube-secret-name
service:
# type of the frontend service
type: ClusterIP
# define the nodePort if service type is NodePort
# nodePort:
annotations: {}
backend:
replicaCount: 1
name: backend
podAnnotations: {}
deploymentAnnotations: {}
replicaCount: 2
image:
repository:
pullPolicy: IfNotPresent
tag: "latest"
repository: infisical/backend
pullPolicy: Always
tag: "latest" # It it highly recommended to select a specific tag for prod deployment so it is easy to rollback: https://hub.docker.com/r/infisical/backend/tags
# kubeSecretRef: some-kube-secret-name
service:
annotations: {}
mongodb:
name: mongodb
podAnnotations: {}
image:
repository: mongo
pullPolicy: IfNotPresent
tag: "latest"
service:
annotations: {}
# By default the backend will be connected to a Mongo instance in the cluster.
# However, it is recommended to add a managed document DB connection string because the DB instance in the cluster does not have persistence yet ( data will be deleted on next deploy).
# Learn about connection string type here https://www.mongodb.com/docs/manual/reference/connection-string/
mongodbConnection: {}
# externalMongoDBConnectionString: <>
ingress:
enabled: true
annotations:
kubernetes.io/ingress.class: "nginx"
hostName: example.com
hostName: example.com # replace with your domain
frontend:
path: /
pathType: Prefix
@@ -60,6 +91,7 @@ ingress:
pathType: Prefix
tls: []
## Complete Ingress example
# ingress:
# enabled: true
@@ -93,15 +125,13 @@ backendEnvironmentVariables:
# Mail/SMTP
# Required to send emails
SMTP_HOST: MUST_REPLACE
SMTP_HOST: MUST_REPLACE
SMTP_NAME: MUST_REPLACE
SMTP_USERNAME: MUST_REPLACE
SMTP_PASSWORD: MUST_REPLACE
# Recommended to replace with Mongo Cloud URI as the DB instance in the cluster does not have persistence yet
MONGO_URL: mongodb://root:root@mongodb-service:27017/
frontendEnvironmentVariables: {}
```
</Accordion>

View File

@@ -1,6 +1,6 @@
---
title: "Linux VM"
description: "Deploy with Docker-Compose"
description: "How to deploy Infisical with Docker-Compose"
---
<Info>

View File

@@ -1,5 +1,6 @@
---
title: "Overview"
description: "Infisical is an open-source end-to-end encrypted secrets manager that developers can set up within 15 minutes."
---
<Info>

View File

@@ -2317,6 +2317,9 @@ components:
Project:
type: object
properties:
_id:
type: string
example: ''
name:
type: string
example: My Project