Atlas 2.1.0 实践(4)—— 权限控制

简介: 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.principal=<principal>/<fqdn>@EXAMPLE.COM
atlas.authentication.method.kerberos.keytab = /<key tab filepath>.keytab
atlas.authentication.method.kerberos.name.rules = RULE:[2:$1@$0](atlas@EXAMPLE.COM)s/.*/atlas/
atlas.authentication.method.kerberos.token.validity = 3600 [ in Seconds (optional)]


3、LDAP


启动ldap

atlas.authentication.method.ldap=true
atlas.authentication.method.ldap.type=ldap|ad

对于LDAP或AD,需要在Atlas应用程序属性中设置以下配置。

atlas.authentication.method.ldap.ad.domain= example.com
atlas.authentication.method.ldap.ad.url=ldap://<AD server ip>:389
atlas.authentication.method.ldap.ad.base.dn=DC=example,DC=com
atlas.authentication.method.ldap.ad.bind.dn=CN=Administrator,CN=Users,DC=example,DC=com
atlas.authentication.method.ldap.ad.bind.password=<password>
atlas.authentication.method.ldap.ad.referral=ignore
atlas.authentication.method.ldap.ad.user.searchfilter=(sAMAccountName={0})
atlas.authentication.method.ldap.ad.default.role=ROLE_USER

LDAP

atlas.authentication.method.ldap.url=ldap://<Ldap server ip>:389
atlas.authentication.method.ldap.userDNpattern=uid={0},ou=users,dc=example,dc=com
atlas.authentication.method.ldap.groupSearchBase=dc=example,dc=com
atlas.authentication.method.ldap.groupSearchFilter=(member=cn={0},ou=users,dc=example,dc=com
atlas.authentication.method.ldap.groupRoleAttribute=cn
atlas.authentication.method.ldap.base.dn=dc=example,dc=com
atlas.authentication.method.ldap.bind.dn=cn=Manager,dc=example,dc=com
atlas.authentication.method.ldap.bind.password=<password>
atlas.authentication.method.ldap.referral=ignore
atlas.authentication.method.ldap.user.searchfilter=(uid={0})
atlas.authentication.method.ldap.default.role=ROLE_USER


4、Keycloak


开启keycloak

atlas.authentication.method.keycloak=true
atlas.authentication.method.keycloak.file=/opt/atlas/conf/keycloak.json
atlas.authentication.method.keycloak.ugi-groups=false

keycloak.json文件配置如下

{
  "realm": "auth",
  "auth-server-url": "http://keycloak-server/auth",
  "ssl-required": "external",
  "resource": "atlas",
  "public-client": true,
  "confidential-port": 0,
  "principal-attribute": "preferred_username",
  "autodetect-bearer-only": true
}


5、PAM


开启PAM

atlas.authentication.method.pam=true
atlas.authentication.method.pam.service=login
相关文章
|
2月前
|
SQL 分布式计算 关系型数据库
阿里云E-MapReduce Trino专属集群外连引擎及权限控制踩坑实践
本文以云厂商售后技术支持的角度,从客户的需求出发,对于阿里云EMR-Trino集群的选型,外连多引擎的场景、Ldap以及Kerberos鉴权等问题进行了简要的实践和记录,模拟客户已有的业务场景,满足客户需求的同时对过程中的问题点进行解决、记录和分析,包括但不限于Mysql、ODPS、Hive connector的配置,Hive、Delta及Hudi等不同表格式读取的兼容,aws s3、阿里云 oss协议访问异常的解决等。
|
运维 atlas Android开发
atlas 项目介绍 | 学习笔记
简介:快速学习 atlas 项目介绍
607 0
atlas 项目介绍 | 学习笔记
|
3天前
|
存储 开发框架 .NET
程序与技术分享:ABP之多租户
程序与技术分享:ABP之多租户
|
2月前
|
人工智能 NoSQL atlas
官宣!MongoDB Atlas再添新功能!进一步简化构建现代应用程序
利用数据简化高响应性应用程序的构建过程
3134 0
|
7月前
|
存储 人工智能 NoSQL
MongoDB推出高级数据管理功能,实现随处可运行应用程序
借助MongoDB Atlas for the Edge,企业不仅可以安全地存储数据,还可以跨越不同数据源和目的地实时同步数据,从而提供具有高可用性、高弹性和高可靠性的应用程序
|
8月前
|
数据库
易搭工作流引擎用是什么开源 还是阿里自研产品,零代码平台场景页面映射数据库表是动态创建,采用什么框架处理,怎么让系统产生高并发能力。易搭权限有没有了解,求解。
易搭工作流引擎用是什么开源 还是阿里自研产品,零代码平台场景页面映射数据库表是动态创建,采用什么框架处理,怎么让系统产生高并发能力。易搭权限有没有了解,求解。
|
12月前
|
存储 人工智能 NoSQL
MongoDB推出五项MongoDB Atlas新功能,帮助企业使用单一开发者数据平台构建新应用程序类别
Beamable、Pureinsights、Anywhere Real Estate及Hootsuite等客户和合作伙伴,正使用MongoDB Atlas新功能构建下一代应用程序
MongoDB推出五项MongoDB Atlas新功能,帮助企业使用单一开发者数据平台构建新应用程序类别
|
SQL 存储 消息中间件
基于 EventBridge 构建数据库应用集成
本文重点介绍 EventBridge 的新特性:数据库 Sink 事件目标。
228 0
基于 EventBridge  构建数据库应用集成
|
存储 安全 NoSQL
云MongoDB网络安全策略和权限管理体系
阿里云MongoDB在市场上实际使用时,如何保障数据库安全性?又是如何防止数据库受到攻击?本文将带领你了解云数据库MongoDB云环境的网络安全策略和MongoDB自身的权限管理体系。
2925 0
|
XML JSON 安全
开源认证和访问控制的利器keycloak使用简介
开源认证和访问控制的利器keycloak使用简介
开源认证和访问控制的利器keycloak使用简介