Add service account support for organization endpoints and update docs images
@@ -1,25 +1,51 @@
|
||||
---
|
||||
title: "Authentication"
|
||||
description: "How to authenticate with the Infisical Public API"
|
||||
---
|
||||
|
||||
To authenticate requests with Infisical, you can either use an API Key or [Infisical Token](../../../getting-started/dashboard/token); certain endpoints will accept either one or both.
|
||||
- API Key: This general-purpose authentication token provides user access to most endpoints in this reference.
|
||||
- [Infisical Token](../../../getting-started/dashboard/token): This authentication token (also referred to as the service token) is scoped to a specific project and environment and used for CRUD secret operations.
|
||||
## Essentials
|
||||
|
||||
The Public API accepts multiple modes of authentication being via API Key, Service Account credentials, or [Infisical Token](../../../getting-started/dashboard/token).
|
||||
|
||||
- API Key: Provides full access to all endpoints representing the user.
|
||||
- [Service Account](): Provides scoped access to an organization and select projects representing a machine such as a VM or application client.
|
||||
- [Infisical Token](../../../getting-started/dashboard/token): Provides short-lived, scoped CRUD access to the secrets of a specific project and environment.
|
||||
|
||||
<AccordionGroup>
|
||||
<Accordion title="API Key">
|
||||
The API key mode uses an API key to authenticate with the API.
|
||||
|
||||
To authenticate requests with Infisical using the API Key, you must include an API key in the `X-API-KEY` header of HTTP requests made to the platform.
|
||||
|
||||
You can obtain an API key in User Settings > API Keys
|
||||
|
||||

|
||||

|
||||
</Accordion>
|
||||
<Accordion title="Service Account">
|
||||
The Service Account mode uses an Access Key to authenticate with the API and a Public Key and Private Key to perform any cryptographic operations.
|
||||
|
||||
To authenticate requests with Infisical using the Access Key, you must include it in the `Authorization` header of HTTP requests made to the platform with the value `Bearer <access_key>`.
|
||||
|
||||
You can create a Service Account in Organization Settings > Service Accounts
|
||||
|
||||
</Accordion>
|
||||
<Accordion title="Infisical Token">
|
||||
To authenticate requests with Infisical using the Infisical Token, you must include your Infisical Token in the `Authorization` header of HTTP requests made to the platform with the value `Bearer st.<rest_of_your_infisical_token>`.
|
||||
|
||||
The Infisical Token mode uses an Infisical Token to authenticate with the API.
|
||||
|
||||
To authenticate requests with Infisical using the Infisical Token, you must include your Infisical Token in the `Authorization` header of HTTP requests made to the platform with the value `Bearer <infisical_token>`.
|
||||
|
||||
You can obtain an Infisical Token in Project Settings > Service Tokens.
|
||||
|
||||

|
||||
</Accordion>
|
||||
</AccordionGroup>
|
||||
</AccordionGroup>
|
||||
|
||||
## Use Cases
|
||||
|
||||
Depending on your use case, it may make sense to use one or another authentication mode:
|
||||
|
||||
- API Key (not recommended): Use if you need full access to the Public API without needing to access any secrets endpoints (because API keys can't encrypt/decrypt secrets).
|
||||
- Service Account (recommeded): Use if you need access to multiple projects and environments in an organization; service accounts can generate short-lived access tokens, making them useful for some complex setups.
|
||||
- Service Token (recommeded): Use if you need short-lived, scoped CRUD access to the secrets of a specific project and environment.
|
||||
@@ -2,11 +2,17 @@
|
||||
title: "Introduction"
|
||||
---
|
||||
|
||||
Infisical's REST API provides users an alternative way to programmatically access and manage
|
||||
Infisical's Public (REST) API provides users an alternative way to programmatically access and manage
|
||||
secrets via HTTPS requests. This can be useful for automating tasks, such as
|
||||
rotating credentials, or for integrating secret management into a larger system.
|
||||
|
||||
With the REST API, users can create, read, update, and delete secrets, as well as manage access control, query audit logs, and more.
|
||||
With the Public API, users can create, read, update, and delete secrets, as well as manage access control, query audit logs, and more.
|
||||
|
||||
<Warning>
|
||||
We highly recommend using one of the available SDKs when working with the Infisical API.
|
||||
|
||||
If you decide to make your own requests using the API reference instead, be prepared for a steeper learning curve and more manual work.
|
||||
</Warning>
|
||||
|
||||
## Concepts
|
||||
|
||||
|
||||
@@ -24,6 +24,14 @@ To add a member to your organization, scroll down to the "Organization Members"
|
||||
projects by default.
|
||||
</Note>
|
||||
|
||||
## Service Accounts
|
||||
|
||||
Service accounts represent machine identities such as VMs or application clients that can authenticate with Infisical. They can be provisioned read/write permissions for project(s) and environment(s).
|
||||
|
||||
To add a service account to your organization, scroll down to the "Service Accounts" section and create a service account. Afterwards, you can press on the edit button beside the service account to provision it permissions.
|
||||
|
||||

|
||||
|
||||
## Incident contacts
|
||||
|
||||
Incident contacts of an organization are alerted if anything abnormal is detected within the operations of an organization.
|
||||
|
||||
@@ -25,16 +25,16 @@ In most cases, environment variables belong to specific environments: developmen
|
||||
|
||||

|
||||
|
||||
### Personal/Shared scoping
|
||||
### Personal overrides
|
||||
|
||||
Every environment variable is classified as either personal or shared.
|
||||
Every environment variable value can be overriden with a custom value.
|
||||
|
||||
- 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.
|
||||
- An overriden value can only be read and accesssed by the user that overrode the original shared value.
|
||||
- A (default) shared value can be read and accesssed by other users in a project.
|
||||
|
||||
You can toggle the classification of an environment variable by pressing on its settings:
|
||||
You can turn overrides on/off by toggling the override/branch icon:
|
||||
|
||||

|
||||

|
||||
|
||||
### Search
|
||||
|
||||
@@ -42,12 +42,6 @@ You can search for any environment variable by its key.
|
||||
|
||||

|
||||
|
||||
### Sort
|
||||
|
||||
You can sort environment variables alphabetically by their keys.
|
||||
|
||||

|
||||
|
||||
### Hide/Un-hide
|
||||
|
||||
You can hide or un-hide the values of your environment variables. By default, the values are hidden for your privacy.
|
||||
|
||||
@@ -9,7 +9,7 @@ These examples demonstrate how to store and fetch environment variables from [In
|
||||
|
||||
1. Login or create an account at `app.infisical.com`.
|
||||
2. Create a new project.
|
||||
3. Populate your environment variables as in the image below.
|
||||
3. Keep the default environment variables or populate them as in the image below.
|
||||
|
||||

|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 285 KiB After Width: | Height: | Size: 744 KiB |
|
Before Width: | Height: | Size: 271 KiB After Width: | Height: | Size: 717 KiB |
|
Before Width: | Height: | Size: 244 KiB After Width: | Height: | Size: 622 KiB |
|
Before Width: | Height: | Size: 249 KiB After Width: | Height: | Size: 636 KiB |
BIN
docs/images/organization-service-accounts.png
Normal file
|
After Width: | Height: | Size: 663 KiB |
|
Before Width: | Height: | Size: 275 KiB After Width: | Height: | Size: 727 KiB |
|
Before Width: | Height: | Size: 271 KiB After Width: | Height: | Size: 669 KiB |
|
Before Width: | Height: | Size: 269 KiB After Width: | Height: | Size: 680 KiB |
|
Before Width: | Height: | Size: 364 KiB After Width: | Height: | Size: 1024 KiB |
|
Before Width: | Height: | Size: 249 KiB After Width: | Height: | Size: 668 KiB |
|
Before Width: | Height: | Size: 206 KiB After Width: | Height: | Size: 225 KiB |
BIN
docs/images/project-envar-override.png
Normal file
|
After Width: | Height: | Size: 686 KiB |
|
Before Width: | Height: | Size: 262 KiB |
|
Before Width: | Height: | Size: 249 KiB After Width: | Height: | Size: 668 KiB |
|
Before Width: | Height: | Size: 249 KiB After Width: | Height: | Size: 668 KiB |
|
Before Width: | Height: | Size: 243 KiB After Width: | Height: | Size: 718 KiB |
|
Before Width: | Height: | Size: 249 KiB After Width: | Height: | Size: 668 KiB |
|
Before Width: | Height: | Size: 249 KiB |
|
Before Width: | Height: | Size: 337 KiB After Width: | Height: | Size: 1.0 MiB |