fix(v1): callout syntax and broken anchor links
parent
09d1414e22
commit
d3f60a7d7d
|
|
@ -8,6 +8,7 @@ menu:
|
||||||
weight: 5
|
weight: 5
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
||||||
Flux is an alternative to [InfluxQL](/enterprise_influxdb/v1/query_language/) and other SQL-like query languages for querying and analyzing data.
|
Flux is an alternative to [InfluxQL](/enterprise_influxdb/v1/query_language/) and other SQL-like query languages for querying and analyzing data.
|
||||||
Flux uses functional language patterns making it incredibly powerful, flexible, and able to overcome many of the limitations of InfluxQL.
|
Flux uses functional language patterns making it incredibly powerful, flexible, and able to overcome many of the limitations of InfluxQL.
|
||||||
This article outlines many of the tasks possible with Flux but not InfluxQL and provides information about Flux and InfluxQL parity.
|
This article outlines many of the tasks possible with Flux but not InfluxQL and provides information about Flux and InfluxQL parity.
|
||||||
|
|
@ -278,13 +279,11 @@ from(bucket: "geo/autogen")
|
||||||
|
|
||||||
|
|
||||||
## InfluxQL and Flux parity
|
## InfluxQL and Flux parity
|
||||||
Flux is working towards complete parity with InfluxQL and new functions are being added to that end.
|
|
||||||
The table below shows InfluxQL statements, clauses, and functions along with their equivalent Flux functions.
|
The table below shows InfluxQL statements, clauses, and functions along with their equivalent Flux functions.
|
||||||
|
|
||||||
_For a complete list of Flux functions, [view all Flux functions](/flux/v0/stdlib/all-functions)._
|
_For a complete list of Flux functions, [view all Flux functions](/flux/v0/stdlib/all-functions)._
|
||||||
|
|
||||||
### InfluxQL and Flux parity
|
|
||||||
|
|
||||||
| InfluxQL | Flux Functions |
|
| InfluxQL | Flux Functions |
|
||||||
| :------------------------------------------------------------------------------------------------------------------------------------------ | :----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| :------------------------------------------------------------------------------------------------------------------------------------------ | :----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| [SELECT](/enterprise_influxdb/v1/query_language/explore-data/#the-basic-select-statement) | [filter()](/flux/v0/stdlib/universe/filter/) |
|
| [SELECT](/enterprise_influxdb/v1/query_language/explore-data/#the-basic-select-statement) | [filter()](/flux/v0/stdlib/universe/filter/) |
|
||||||
|
|
|
||||||
|
|
@ -15,40 +15,37 @@ alt_links:
|
||||||
This document covers setting up and managing authentication and authorization in InfluxDB.
|
This document covers setting up and managing authentication and authorization in InfluxDB.
|
||||||
|
|
||||||
- [Authentication](#authentication)
|
- [Authentication](#authentication)
|
||||||
- [Set up Authentication](#set-up-authentication")
|
- [Set up Authentication](#set-up-authentication)
|
||||||
- [Authenticate Requests](#authenticate-requests)
|
- [Authenticate Requests](#authenticate-requests)
|
||||||
- [Authorization](#authorization)
|
- [Authorization](#authorization)
|
||||||
- [User Types and Privileges](#user-types-and-privileges)
|
- [User Types and Privileges](#user-types-and-privileges)
|
||||||
- [User Management Commands](#user-management-commands)
|
- [User Management Commands](#user-management-commands)
|
||||||
- [HTTP Errors](#authentication-and-authorization-http-errors)
|
- [HTTP Errors](#authentication-and-authorization-http-errors)
|
||||||
|
|
||||||
{{% note %}}
|
> [!Note]
|
||||||
Authentication and authorization should not be relied upon to prevent access and protect data from malicious actors.
|
> Authentication and authorization should not be relied upon to prevent access and protect data from malicious actors.
|
||||||
If additional security or compliance features are desired, InfluxDB should be run behind a third-party service. If InfluxDB is
|
> If additional security or compliance features are desired, InfluxDB should be run behind a third-party service. If InfluxDB is
|
||||||
being deployed on a publicly accessible endpoint, we strongly recommend authentication be enabled. Otherwise the data will be
|
> being deployed on a publicly accessible endpoint, we strongly recommend authentication be enabled. Otherwise the data will be
|
||||||
publicly available to any unauthenticated user.
|
> publicly available to any unauthenticated user.
|
||||||
{{% /note %}}
|
|
||||||
|
|
||||||
## Authentication
|
## Authentication
|
||||||
|
|
||||||
The InfluxDB API and the [command line interface](/influxdb/v1/tools/shell/) (CLI), which connects to the database using the API, include simple, built-in authentication based on user credentials.
|
The InfluxDB API and the [command line interface](/influxdb/v1/tools/shell/) (CLI), which connects to the database using the API, include simple, built-in authentication based on user credentials.
|
||||||
When you enable authentication, InfluxDB only executes HTTP requests that are sent with valid credentials.
|
When you enable authentication, InfluxDB only executes HTTP requests that are sent with valid credentials.
|
||||||
|
|
||||||
{{% note %}}
|
> [!Note]
|
||||||
Authentication only occurs at the HTTP request scope.
|
> Authentication only occurs at the HTTP request scope.
|
||||||
Plugins do not currently have the ability to authenticate requests and service
|
> Plugins do not currently have the ability to authenticate requests and service
|
||||||
endpoints (for example, Graphite, collectd, etc.) are not authenticated.
|
> endpoints (for example, Graphite, collectd, etc.) are not authenticated.
|
||||||
{{% /note %}}
|
|
||||||
|
|
||||||
### Set up authentication
|
### Set up authentication
|
||||||
|
|
||||||
1. **Create at least one [admin user](#admin-users)**.
|
1. **Create at least one [admin user](#admin-users)**.
|
||||||
See the [authorization section](#authorization) for how to create an admin user.
|
See the [authorization section](#authorization) for how to create an admin user.
|
||||||
|
|
||||||
{{% note %}}
|
> [!Note]
|
||||||
If you enable authentication and have no users, InfluxDB will **not** enforce authentication
|
> If you enable authentication and have no users, InfluxDB will **not** enforce authentication
|
||||||
and will only accept the [query](#user-management-commands) that creates a new admin user.
|
> and will only accept the [query](#user-management-commands) that creates a new admin user.
|
||||||
{{% /note %}}
|
|
||||||
|
|
||||||
InfluxDB will enforce authentication once there is an admin user.
|
InfluxDB will enforce authentication once there is an admin user.
|
||||||
|
|
||||||
|
|
@ -70,10 +67,9 @@ and will only accept the [query](#user-management-commands) that creates a new a
|
||||||
https-certificate = "/etc/ssl/influxdb.pem"
|
https-certificate = "/etc/ssl/influxdb.pem"
|
||||||
```
|
```
|
||||||
|
|
||||||
{{% note %}}
|
> [!Note]
|
||||||
If `pprof-enabled` is set to `true`, set `pprof-auth-enabled` and `ping-auth-enabled`
|
> If `pprof-enabled` is set to `true`, set `pprof-auth-enabled` and `ping-auth-enabled`
|
||||||
to `true` to require authentication on profiling and ping endpoints.
|
> to `true` to require authentication on profiling and ping endpoints.
|
||||||
{{% /note %}}
|
|
||||||
|
|
||||||
3. **Restart InfluxDB**.
|
3. **Restart InfluxDB**.
|
||||||
Once restarted, InfluxDB checks user credentials on every request and only
|
Once restarted, InfluxDB checks user credentials on every request and only
|
||||||
|
|
@ -210,10 +206,8 @@ Use the ``Bearer`` authorization scheme:
|
||||||
```
|
```
|
||||||
Authorization: Bearer <myToken>
|
Authorization: Bearer <myToken>
|
||||||
```
|
```
|
||||||
{{% note %}}
|
> [!Note]
|
||||||
Only unexpired tokens will successfully authenticate.
|
> Only unexpired tokens will successfully authenticate. Be sure your token has not expired.
|
||||||
Be sure your token has not expired.
|
|
||||||
{{% /note %}}
|
|
||||||
|
|
||||||
###### Example query request with JWT authentication
|
###### Example query request with JWT authentication
|
||||||
```bash
|
```bash
|
||||||
|
|
@ -312,21 +306,20 @@ CREATE USER admin WITH PASSWORD '<password>' WITH ALL PRIVILEGES
|
||||||
CREATE USER <username> WITH PASSWORD '<password>' WITH ALL PRIVILEGES
|
CREATE USER <username> WITH PASSWORD '<password>' WITH ALL PRIVILEGES
|
||||||
```
|
```
|
||||||
|
|
||||||
{{% note %}}
|
> [!Note]
|
||||||
Repeating the exact `CREATE USER` statement is idempotent.
|
> Repeating the exact `CREATE USER` statement is idempotent.
|
||||||
If any values change the database will return a duplicate user error.
|
> If any values change the database will return a duplicate user error.
|
||||||
|
>
|
||||||
```sql
|
> ```sql
|
||||||
> CREATE USER todd WITH PASSWORD '123456' WITH ALL PRIVILEGES
|
> > CREATE USER todd WITH PASSWORD '123456' WITH ALL PRIVILEGES
|
||||||
> CREATE USER todd WITH PASSWORD '123456' WITH ALL PRIVILEGES
|
> > CREATE USER todd WITH PASSWORD '123456' WITH ALL PRIVILEGES
|
||||||
> CREATE USER todd WITH PASSWORD '123' WITH ALL PRIVILEGES
|
> > CREATE USER todd WITH PASSWORD '123' WITH ALL PRIVILEGES
|
||||||
ERR: user already exists
|
> ERR: user already exists
|
||||||
> CREATE USER todd WITH PASSWORD '123456'
|
> > CREATE USER todd WITH PASSWORD '123456'
|
||||||
ERR: user already exists
|
> ERR: user already exists
|
||||||
> CREATE USER todd WITH PASSWORD '123456' WITH ALL PRIVILEGES
|
> > CREATE USER todd WITH PASSWORD '123456' WITH ALL PRIVILEGES
|
||||||
>
|
> >
|
||||||
```
|
> ```
|
||||||
{{% /note %}}
|
|
||||||
|
|
||||||
##### `GRANT` administrative privileges to an existing user
|
##### `GRANT` administrative privileges to an existing user
|
||||||
```sql
|
```sql
|
||||||
|
|
@ -370,28 +363,27 @@ CREATE USER <username> WITH PASSWORD '<password>'
|
||||||
>
|
>
|
||||||
```
|
```
|
||||||
|
|
||||||
{{% note %}}
|
> [!Important]
|
||||||
##### Important notes about providing user credentials
|
> ##### Important notes about providing user credentials
|
||||||
- The user value must be wrapped in double quotes if it starts with a digit, is an InfluxQL keyword, contains a hyphen and or includes any special characters, for example: `!@#$%^&*()-`
|
> - The user value must be wrapped in double quotes if it starts with a digit, is an InfluxQL keyword, contains a hyphen and or includes any special characters, for example: `!@#$%^&*()-`
|
||||||
- The password [string](/influxdb/v1/query_language/spec/#strings) must be wrapped in single quotes.
|
> - The password [string](/influxdb/v1/query_language/spec/#strings) must be wrapped in single quotes.
|
||||||
Do not include the single quotes when authenticating requests.
|
> Do not include the single quotes when authenticating requests.
|
||||||
We recommend avoiding the single quote (`'`) and backslash (`\`) characters in passwords.
|
> We recommend avoiding the single quote (`'`) and backslash (`\`) characters in passwords.
|
||||||
For passwords that include these characters, escape the special character with a backslash (e.g. (`\'`) when creating the password and when submitting authentication requests.
|
> For passwords that include these characters, escape the special character with a backslash (for example, (`\'`) when creating the password and when submitting authentication requests.
|
||||||
- Repeating the exact `CREATE USER` statement is idempotent. If any values change the database will return a duplicate user error. See GitHub Issue [#6890](https://github.com/influxdata/influxdb/pull/6890) for details.
|
> - Repeating the exact `CREATE USER` statement is idempotent. If any values change the database will return a duplicate user error. See GitHub Issue [#6890](https://github.com/influxdata/influxdb/pull/6890) for details.
|
||||||
|
>
|
||||||
###### CLI example
|
> ###### CLI example
|
||||||
```sql
|
> ```sql
|
||||||
> CREATE USER "todd" WITH PASSWORD '123456'
|
> > CREATE USER "todd" WITH PASSWORD '123456'
|
||||||
> CREATE USER "todd" WITH PASSWORD '123456'
|
> > CREATE USER "todd" WITH PASSWORD '123456'
|
||||||
> CREATE USER "todd" WITH PASSWORD '123'
|
> > CREATE USER "todd" WITH PASSWORD '123'
|
||||||
ERR: user already exists
|
> ERR: user already exists
|
||||||
> CREATE USER "todd" WITH PASSWORD '123456'
|
> > CREATE USER "todd" WITH PASSWORD '123456'
|
||||||
> CREATE USER "todd" WITH PASSWORD '123456' WITH ALL PRIVILEGES
|
> > CREATE USER "todd" WITH PASSWORD '123456' WITH ALL PRIVILEGES
|
||||||
ERR: user already exists
|
> ERR: user already exists
|
||||||
> CREATE USER "todd" WITH PASSWORD '123456'
|
> > CREATE USER "todd" WITH PASSWORD '123456'
|
||||||
>
|
> >
|
||||||
```
|
> ```
|
||||||
{{% /note %}}
|
|
||||||
|
|
||||||
|
|
||||||
##### `GRANT` `READ`, `WRITE` or `ALL` database privileges to an existing user
|
##### `GRANT` `READ`, `WRITE` or `ALL` database privileges to an existing user
|
||||||
|
|
@ -472,13 +464,12 @@ CLI example:
|
||||||
>
|
>
|
||||||
```
|
```
|
||||||
|
|
||||||
{{% note %}}
|
> [!Note]
|
||||||
**Note:** The password [string](/influxdb/v1/query_language/spec/#strings) must be wrapped in single quotes.
|
> The password [string](/influxdb/v1/query_language/spec/#strings) must be wrapped in single quotes.
|
||||||
Do not include the single quotes when authenticating requests.
|
> Do not include the single quotes when authenticating requests.
|
||||||
|
>
|
||||||
We recommend avoiding the single quote (`'`) and backslash (`\`) characters in passwords
|
> We recommend avoiding the single quote (`'`) and backslash (`\`) characters in passwords
|
||||||
For passwords that include these characters, escape the special character with a backslash (e.g. (`\'`) when creating the password and when submitting authentication requests.
|
> For passwords that include these characters, escape the special character with a backslash (for example, (`\'`) when creating the password and when submitting authentication requests.
|
||||||
{{% /note %}}
|
|
||||||
|
|
||||||
##### `DROP` a user
|
##### `DROP` a user
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ Depending on the volume of data to be protected and your application requirement
|
||||||
>
|
>
|
||||||
> Use the `backup` and `restore` utilities in
|
> Use the `backup` and `restore` utilities in
|
||||||
> [InfluxDB Enterprise](/enterprise_influxdb/v1/administration/backup-and-restore/) and
|
> [InfluxDB Enterprise](/enterprise_influxdb/v1/administration/backup-and-restore/) and
|
||||||
> [InfluxDB OSS (version 1.5 and later)](#backup-and-restore-utilities/) to:
|
> [InfluxDB OSS (version 1.5 and later)](#backup-and-restore-utilities) to:
|
||||||
>
|
>
|
||||||
> - Restore InfluxDB Enterprise backup files to InfluxDB OSS instances.
|
> - Restore InfluxDB Enterprise backup files to InfluxDB OSS instances.
|
||||||
> - Back up InfluxDB OSS data that can be restored in InfluxDB Enterprise clusters.
|
> - Back up InfluxDB OSS data that can be restored in InfluxDB Enterprise clusters.
|
||||||
|
|
@ -398,9 +398,9 @@ Requirements and commands necessary to restore a backup depend on the
|
||||||
- [Restore all databases](#restore-all-databases)
|
- [Restore all databases](#restore-all-databases)
|
||||||
- [Restore all data to a remote InfluxDB instance](#restore-all-data-to-a-remote-influxdb-instance)
|
- [Restore all data to a remote InfluxDB instance](#restore-all-data-to-a-remote-influxdb-instance)
|
||||||
- [Restore a specific database](#restore-a-specific-database)
|
- [Restore a specific database](#restore-a-specific-database)
|
||||||
- [Restore data from a database that already exists](#restore-data-from-a-database-that-already-exists)
|
- [Restore data to a database that already exists](#restore-data-to-a-database-that-already-exists)
|
||||||
- [Restore a specific retention policy](#restore-a-specific-retention-policy)
|
- [Restore a specific retention policy](#restore-a-specific-retention-policy)
|
||||||
- [Restore data from a retention policy that already exists](#restore-data-from-a-retention-policy-that-already-exists)
|
- [Restore data to a retention policy that already exists](#restore-data-to-a-retention-policy-that-already-exists)
|
||||||
- [Restore a specific shard](#restore-a-specific-shard)
|
- [Restore a specific shard](#restore-a-specific-shard)
|
||||||
|
|
||||||
#### Restore all databases
|
#### Restore all databases
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@ file or in an environment variable, InfluxDB uses its internal default configura
|
||||||
> If an environment variable has already been set, the equivalent configuration
|
> If an environment variable has already been set, the equivalent configuration
|
||||||
> setting in the configuration file is ignored.
|
> setting in the configuration file is ignored.
|
||||||
|
|
||||||
### InfluxDB environment variables (`INFLUXDB_*`)
|
### InfluxDB environment variables (`INFLUXDB_*`) {#influxdb-environment-variables-influxdb}
|
||||||
|
|
||||||
The InfluxDB environment variables are documented below with the corresponding
|
The InfluxDB environment variables are documented below with the corresponding
|
||||||
configuration file settings. All of the InfluxDB-specific environment variables
|
configuration file settings. All of the InfluxDB-specific environment variables
|
||||||
|
|
@ -899,8 +899,8 @@ permissions to access the following endpoints:
|
||||||
- `/debug/vars`
|
- `/debug/vars`
|
||||||
|
|
||||||
This setting has no effect if either
|
This setting has no effect if either
|
||||||
[`auth-enabled`](#auth-enabled-false) or
|
[`auth-enabled`](#auth-enabled) or
|
||||||
[`pprof-enabled`](#pprof-enabled-true) are set to `false`.
|
[`pprof-enabled`](#pprof-enabled) are set to `false`.
|
||||||
|
|
||||||
**Default**: `false`
|
**Default**: `false`
|
||||||
**Environment variable**: `INFLUXDB_HTTP_PPROF_AUTH_ENABLED`
|
**Environment variable**: `INFLUXDB_HTTP_PPROF_AUTH_ENABLED`
|
||||||
|
|
@ -915,9 +915,8 @@ Useful for debugging startup performance issues.
|
||||||
|
|
||||||
#### ping-auth-enabled
|
#### ping-auth-enabled
|
||||||
|
|
||||||
Enables authentication on the `/ping`, `/metrics`, and deprecated `/status`
|
Enables authentication on the `/ping`, `/metrics`, and deprecated `/status` endpoints.
|
||||||
endpoints. This setting has no effect if
|
This setting has no effect if [`auth-enabled`](#auth-enabled) is set to `false`.
|
||||||
[`auth-enabled`](#auth-enabled-false) is set to `false`.
|
|
||||||
|
|
||||||
**Default**: `false`
|
**Default**: `false`
|
||||||
**Environment variable**: `INFLUXDB_HTTP_PING_AUTH_ENABLED`
|
**Environment variable**: `INFLUXDB_HTTP_PING_AUTH_ENABLED`
|
||||||
|
|
@ -925,7 +924,7 @@ endpoints. This setting has no effect if
|
||||||
#### prom-read-auth-enabled
|
#### prom-read-auth-enabled
|
||||||
|
|
||||||
Enables authentication on the Prometheus remote read API. This setting has no
|
Enables authentication on the Prometheus remote read API. This setting has no
|
||||||
effect if [`auth-enabled`](#auth-enabled-false) is set to `false`.
|
effect if [`auth-enabled`](#auth-enabled) is set to `false`.
|
||||||
|
|
||||||
**Default**: `false`
|
**Default**: `false`
|
||||||
**Environment variable**: `INFLUXDB_HTTP_PROM_READ_AUTH_ENABLED`
|
**Environment variable**: `INFLUXDB_HTTP_PROM_READ_AUTH_ENABLED`
|
||||||
|
|
|
||||||
|
|
@ -53,12 +53,12 @@ Run the `buildtsi` command using the user account that you are going to run the
|
||||||
|
|
||||||
Switch index types at any time by doing one of the following:
|
Switch index types at any time by doing one of the following:
|
||||||
|
|
||||||
- To switch from to `inmem` to `tsi1`, complete steps 3 and 4 above in [Upgrade to InfluxDB 1.11.x](#upgrade-to-influxdb-1-8-x).
|
- To switch from to `inmem` to `tsi1`, complete steps 3 and 4 above in [Upgrade to InfluxDB 1.11.x](#upgrade-to-influxdb-111x).
|
||||||
- To switch from to `tsi1` to `inmem`, change `tsi1` to `inmem` by completing steps 3a-3c and 4 above in [Upgrade to InfluxDB 1.11.x](#upgrade-to-influxdb-1-8-x).
|
- To switch from to `tsi1` to `inmem`, change `tsi1` to `inmem` by completing steps 3a-3c and 4 above in [Upgrade to InfluxDB 1.11.x](#upgrade-to-influxdb-111x).
|
||||||
|
|
||||||
## Downgrade InfluxDB
|
## Downgrade InfluxDB
|
||||||
|
|
||||||
To downgrade to an earlier version, complete the procedures above in [Upgrade to InfluxDB 1.11.x](#upgrade-to-influxdb-1-8-x), replacing the version numbers with the version that you want to downgrade to.
|
To downgrade to an earlier version, complete the procedures above in [Upgrade to InfluxDB 1.11.x](#upgrade-to-influxdb-111x), replacing the version numbers with the version that you want to downgrade to.
|
||||||
After downloading the release, migrating your configuration settings, and enabling TSI or TSM, make sure to [rebuild your index](/influxdb/v1/administration/rebuild-tsi-index/).
|
After downloading the release, migrating your configuration settings, and enabling TSI or TSM, make sure to [rebuild your index](/influxdb/v1/administration/rebuild-tsi-index/).
|
||||||
|
|
||||||
>**Note:** Some versions of InfluxDB may have breaking changes that impact your ability to upgrade and downgrade. For example, you cannot downgrade from InfluxDB 1.3 or later to an earlier version. Please review the applicable version of release notes to check for compatibility issues between releases.
|
>**Note:** Some versions of InfluxDB may have breaking changes that impact your ability to upgrade and downgrade. For example, you cannot downgrade from InfluxDB 1.3 or later to an earlier version. Please review the applicable version of release notes to check for compatibility issues between releases.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue