支持两种配置方式:

The ldap realm supports two modes of operation, a user search mode and a mode with specific templates for user DNs.

a、User Search Mode

b、User DN Templates Mode

这里我用的是第二种,因为不需要明文配置LDAP的admin密码。

1、修改ES配置文件,添加LDAP配置

 # vim /etc/elasticsearch/elasticsearch.yml

 xpack:
security:
authc:
realms:
ldap1:
type: ldap
order: 0
url: "ldap://192.168.2.164:389"
user_dn_templates:
- "uid={0},ou=Users,dc=beijing,dc=op"
group_search:
base_dn: "dc=beijing,dc=op"
files:
role_mapping: "/etc/elasticsearch/x-pack/role_mapping.yml"
unmapped_groups_as_roles: false

url 中,ldap协议表示使用普通连接,端口为389。ldaps 表示使用 ssl 安全连接,端口为636.

为了避免单点故障,这里支持负载均衡和故障转移,实现多个LDAP节点高可用。

Load Balancing and Failover

The load_balance.type setting can be used at the realm level to configure how X-Pack security should interact with multiple LDAP servers.

X-Pack security supports both failover and load balancing modes of operation.

配置格式:



2、修改role_mapping文件,给用户指定权限

# vim /etc/elasticsearch/x-pack/role_mapping.yml

superuser:
- "uid=shengyongp,ou=Users,dc=beijing,dc=op"

默认 xpack 每五秒会检查一次 role_mapping 文件的变化,也就是修改用户权限之后不用重载ES。

By default, X-Pack security checks role mapping files for changes every 5 seconds.

其他细节请参考官网文档。

Xpack集成LDAP的更多相关文章

  1. hive、impala集成ldap

    1.概要 1.1 环境信息 hadoop:cdh5.10 os:centos6.7 user:root hive.impala已集成sentry 1.2 访问控制权限 这里通过使用openldap来控 ...

  2. ldap配置系列二:jenkins集成ldap

    ldap配置系列二:jenkins集成ldap jenkins简介 jenkins是一个独立的.开放源码的自动化服务器,它可以用于自动化与构建.测试.交付或部署软件相关的各种任务. jenkins官方 ...

  3. ldap配置系列三:grafana集成ldap

    ldap配置系列三:grafana集成ldap grafana的简介 grafana是一个类似kibana的东西,是对来自各种数据源的数据进行实时展示的平台,拥有这牛逼的外观.给一个官方的demo体验 ...

  4. Mongodb集成LDAP授权

    一.环境简介 Mongodb enterprise v4.0.16 OpenLDAP v2.4.44 二.Mongodb集成LDAP的授权过程 客户端指定某种外部验证方式链接Mongodb: Mong ...

  5. Mantis集成 LDAP 认证

    mantis的用户认证函数Authentication中相关有 $g_login_method MD5 LDAP PLAIN CRYPT CRYPT_FULL_SALT BASIC_AUTH Some ...

  6. Keystone集成LDAP

    转自 http://wsfdl.com/openstack/2016/01/13/Keystone%E9%9B%86%E6%88%90LDAP.html 得益于 Keystone 优良的架构,它允许 ...

  7. CAS与LDAP集成

    参考文献: CAS集成ldap:https://wiki.jasig.org/display/CASUM/LDAP CAS集成restful api:https://wiki.jasig.org/di ...

  8. LDAP落地实战(四):Jenkins集成OpenLDAP认证

    前几篇分文章分别介绍了OpenLDAP的部署管理和维护以及svn.git的接入,今天我们再下一城接入jenkins. 前情提要:LDAP系列文章 LDAP落地实战(一):OpenLDAP部署及管理维护 ...

  9. LDAP落地实战(三):GitLab集成OpenLDAP认证

    上一篇文章介绍了svn集成OpenLDAP认证,版本控制除了svn外,git目前也被越来越多的开发者所喜爱,本文将介绍GitLab如何集成openldap实现账号认证 GitLab集成OpenLDAP ...

随机推荐

  1. 一文拆解Faas的真实案例

    欢迎大家前往腾讯云+社区,获取更多腾讯海量技术实践干货哦~ 本文来自腾讯云技术沙龙,本次沙龙主题为Serverless架构开发与SCF部署实践 刘敏洁:具有多年云计算行业经验,曾任职于华为.UClou ...

  2. [朴孝敏][Sketch]

    歌词来源:http://music.163.com/#/song?id=406907303 作曲 : Ryan S. Jhun/August Rigo/Denzil Remedios [作曲 : Ry ...

  3. 基于spec评论作品

    组名:杨老师粉丝群 组长:乔静玉 组员:吴奕瑶  刘佳瑞  公冶令鑫  杨磊  杨金铭  张宇  卢帝同 一.测试目标:拉格朗日2018——飞词 下面是他们的小游戏在运行时的一些截图画面: 1.开始: ...

  4. 第十次作业psp

    psp 进度条 博文累积折线图 代码累积折线图 psp饼状图

  5. Linux上安装设置mysql 5.7.24

    一,准备 1,先查看Linux是32位还是64位 getconf LONG_BIT 如果返回的是32,那么就是32位 如果返回的是64,那么就是64位 2,如果服务器不能联网,就先去官网下载好压缩包, ...

  6. 20172332 2017-2018-2 《程序设计与数据结构》Java哈夫曼编码实验--哈夫曼树的建立,编码与解码

    20172332 2017-2018-2 <程序设计与数据结构>Java哈夫曼编码实验--哈夫曼树的建立,编码与解码 哈夫曼树 1.路径和路径长度 在一棵树中,从一个结点往下可以达到的孩子 ...

  7. C++自学随笔(2)

    引用 就像人的别名,人不能只有别名,变量也不能只有引用. 指针类型的引用:*&指针引用名 = 指针. 如int a = 10;int *p =&a;int *&q =p1 co ...

  8. 14_Java面向对象_第14天(Eclipse高级、类与接口作为参数返回值)_讲义

    今日内容介绍 1.Eclipse常用快捷键操作 2.Eclipse文档注释导出帮助文档 3.Eclipse项目的jar包导出与使用jar包 4.不同修饰符混合使用细节 5.辨析何时定义变量为成员变量 ...

  9. Android自定义View实现仿QQ实现运动步数效果

    效果图: 1.attrs.xml中 <declare-styleable name="QQStepView"> <attr name="outerCol ...

  10. 配置docker的私有仓库

    1:安装docker-registry包 yum install -y docker-distribution   2:启动docker-distribution,默认监听于TCP/5000端口 sy ...