Skip to content

Commit

Permalink
add to v0.11
Browse files Browse the repository at this point in the history
  • Loading branch information
nicecui committed Jan 7, 2025
1 parent 18f8eb2 commit cd05a9f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ description: 介绍了 GreptimeDB 的静态用户配置,允许通过配置文

# Static User Provider

GreptimeDB 提供了简单的内置身份验证机制,允许用户配置一个固定的帐户以方便使用,或者配置一个帐户文件以支持多个用户帐户。通过传入文件,GreptimeDB 会加载其中的所有用户。
GreptimeDB 提供了简单的内置身份验证机制,允许你配置一个固定的帐户以方便使用,或者配置一个帐户文件以支持多个用户帐户。通过传入文件,GreptimeDB 会加载其中的所有用户。

GreptimeDB使用`=`作为分隔符,读取文件内每行中的用户和密码。例如:
## 单机模式

GreptimeDB使用 `=` 作为分隔符,读取文件内每行中的用户和密码。
例如在文件中添加以下内容:

```
greptime_user=greptime_pwd
Expand All @@ -26,3 +29,9 @@ bob=bbb
:::tip 注意
文件的内容只会在启动时被加载到数据库中,在数据库运行时修改或追加的内容不会生效。
:::

## Kubernetes 集群

你可以在 `values.yaml` 文件中配置鉴权用户。
更多详情,请参考 [Helm Chart 配置](/user-guide/deployments/deploy-on-kubernetes/common-helm-chart-configurations.md#鉴权配置)

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ description: Instructions for setting up static user authentication in GreptimeD

GreptimeDB offers a simple built-in mechanism for authentication, allowing users to configure either a fixed account for convenient usage or an account file for multiple user accounts. By passing in a file, GreptimeDB loads all users listed within it.

GreptimeDB reads the user and password on each line using `=` as a separator, just like a command-line config. For example:
## Standalone Mode

GreptimeDB reads the user and password on each line using `=` as a separator, just like a command-line config.
For example, create a file with the following content:

```
greptime_user=greptime_pwd
Expand All @@ -24,3 +27,9 @@ then start server with `--user-provider` parameter:
Now, user `alice` with password `aaa` and user `bob` with password `bbb` are loaded into GreptimeDB's memory. You can create a connection to GreptimeDB using these user accounts.

Note: The content of the file is loaded into the database while starting up. Modifying or appending the file won't take effect while the database is up and running.

## Kubernetes Cluster

You can configure the authentication users in the `values.yaml` file.
For more details, please refer to the [Helm Chart Configuration](/user-guide/deployments/deploy-on-kubernetes/common-helm-chart-configurations.md#authentication-configuration).

0 comments on commit cd05a9f

Please sign in to comment.