Atlas 2.1.0 實踐(4)—— 許可權控制
阿新 • • 發佈:2021-02-01
Atlas的許可權控制非常的豐富,本文將進行其支援的各種許可權控制的介紹。
在atlas-application.properties配置檔案中,可以設定不同許可權的開關。
```
atlas.authentication.method.kerberos=true|false
atlas.authentication.method.ldap=true|false
atlas.authentication.method.file=true|false
atlas.authentication.method.keycloak=true|false
```
如果設定了多個許可權,就相當於有一個備用方案。比如同時設定了Kerberos 和 ldap 。Kerberos 失效的情況下,就會走ldap的許可權。
# 1、File
檔案控制權限是Atlas最基本的,也是預設的許可權控制方式。
需要指定檔案許可權配置路徑
```
atlas.authentication.method.file=true
atlas.authentication.method.file.filename=sys:atlas.home/conf/users-credentials.properties
```
users-credentials.properties的格式如下:
```
username=group::sha256-password
```
例如
```
admin=ADMIN::e7cf3ef4f17c3999a94f2c6f612e8a888e5b1026878e4e19398b23bd38ec221a
```
*注意*:-密碼使用sha256編碼方法進行編碼,可以使用unix工具生成。
例如
```
echo -n "Password" | sha256sum
e7cf3ef4f17c3999a94f2c6f612e8a888e5b1026878e4e19398b23bd38ec221a -
```
# 2、Kerberos
啟動kerberos
```
atlas.authentication.method.kerberos = true
```
還應設定以下屬性。
```
atlas.authentication.method.kerberos.pr