LDAP Authentication addon permits users to have the same credentials as in LDAP, so effectively centralizing authentication

let any correctly authenticated LDAP user to use OpenNebula

1,prerequistries

Addon requires the 'net/ldap' ruby library provided by the 'net-ldap' gem

Addon will not install any Ldap server or configure it in any way. It will not create, delete or modify any entry in the Ldap server it connects to. The only requirement is the ability to connect to an already running Ldap server and being able to perform a successful ldapbind operation and have a user able to perform searches of users, therefore no special attributes or values are required in the LDIF entry of the user authenticating.

2,Considerations & Limitations

Transport Layer Security(TLS) as on so做ssl for apache httpd https

LDAP auth driver has a bug that does not let it connect to TLS LDAP instances

3,configuration

Configuration file for auth module is located at /etc/one/auth/ldap_auth.conf. This is the default configuration

:user_field Field in ldap that holds the user name

To enable ldap authentication the described parameters should be configured. OpenNebula must be also configured to enable external authentication. Uncomment these lines in /etc/one/oned.conf and add ldap and default (more on this later) as an enabled authentication method.

AUTH_MAD = [
executable = "one_auth_mad",
authn = "ssh,x509,ldap,server_cipher,server_x509"
]

To be able to use this driver for users that are still not in the user database you must set it to the default driver. To do this go to the auth drivers directory and copy the directory ldap to default. In system-wide installations you can do this using this command:

$ cp -R /var/lib/one/remotes/auth/ldap /var/lib/one/remotes/auth/default

User Management

Using LDAP authentication module the administrator doesn't need to create users with oneuser command as this will be automatically done. The user should add its credentials to $ONE_AUTH file (usually $HOME/.one/one_auth) in this fashion:

<user_dn>:ldap_password

where

  • <user_dn> the DN of the user in the LDAP service
  • ldap_password is the password of the user in the LDAP service

DN's With Special Characters

When the user dn or password contains blank spaces the LDAP driver will escape them so they can be used to create OpenNebula users. Therefore, users needs to set up their $ONE_AUTH file accordingly.

Users can easily create escaped $ONE_AUTH tokens with the command oneuser encode <user> [<password>], as an example:

$ oneuser encode 'cn=First Name,dc=institution,dc=country' 'pass word'
cn=First%20Name,dc=institution,dc=country:pass%20word

The output of this command should be put in the $ONE_AUTH file.

Active Directory

LDAP Auth drivers are able to connect to Active Directory. You will need:

  • Active Directory server with support for simple user/password authentication.
  • User with read permissions in the Active Directory user's tree.

You will need to change the following values in the configuration file (/etc/one/auth/ldap_auth.conf):

  • :user: the Active Directory user with read permissions in the user's tree plus the domain. For example for user Administrator at domain win.opennebula.org you specify it as Administrator@win.opennebula.org
  • :password: password of this user
  • :host: hostname or IP of the Domain Controller
  • :base: base DN to search for users. You need to decompose the full domain name and use each part as DN component. Example, for win.opennebula.org you will get te base DN: DN=win,DN=opennebula,DN=org
  • :user_field: set it to sAMAccountName

:group parameter is still not supported for Active Directory, leave it commented.

Enabling LDAP auth in Sunstone

Update the /etc/one/sunstone-server.conf :auth parameter to use the opennebula:

    :auth: opennebula

Using this method the credentials provided in the login screen will be sent to the OpenNebula core and the authentication will be delegated to the OpenNebula auth system, using the specified driver for that user. Therefore any OpenNebula auth driver can be used through this method to authenticate the user (i.e: LDAP).

To automatically encode credentials as explained in DN's with special characters section also add this parameter to sunstone configuration:

    :encode_user_password: true

opennebula extend(expending) auth module ldap的更多相关文章

  1. opennebula auth module ldap

    1,安装net-ldap  addon ruby library for openldap

  2. net-ldap for ruby openNebula ldap

    preface:ldap 主要概念及术语 OpenNebula issues:missing step to use LDAP as default driver cp -r /var/lib/one ...

  3. OpenNebula openldap集成

    Preface: 当前写这篇post的心情可谓是即激动,又操蛋!............................ ruiy还是言归正传,人老了,赖的扯淡了,哥当前一心看向Tech(s),做个顾 ...

  4. LDAP Authentication for openNebula3.2

    LDAP Authentication 3.2 The LDAP Authentication addon permits users to have the same credentials as ...

  5. LDAP落地实战(二):SVN集成OpenLDAP认证

    上一篇文章我们介绍了LDAP的部署以及管理维护,那么如何接入LDAP实现账号统一认证呢?这篇文章将带你完成svn的接入验证 subversion集成OpenLDAP认证 系统环境:debian8.4 ...

  6. Ruby中实现module继承

    module FooModule  def self.included base    base.extend ClassMethods  end module ClassMethods    def ...

  7. javax.security.auth.login.LoginException: Error during resolve 异常

    登陆TIM时本地抛此异常,测试环境正常 需要重启测试环境机器以后,本地才可以登陆成功 求大神帮忙解决: INFO: Client code attempting to load security co ...

  8. Mantis集成 LDAP 认证

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

  9. ruby中的extend 和 include

    include include是把module中定义的instance_method给mixin,然后当做类的实例方法使用(是因为module本身不能使用module的实例方法),给类进行实例化一个对 ...

随机推荐

  1. POJ 1631 Bridging signals & 2533 Longest Ordered Subsequence

    两个都是最长上升子序列,所以就放一起了 1631 因为长度为40000,所以要用O(nlogn)的算法,其实就是另用一个数组c来存储当前最长子序列每一位的最小值,然后二分查找当前值在其中的位置:如果当 ...

  2. 窥探 kernel --- 进程调度的目标,nice值,静态优先级,动态优先级,实时优先级

    http://blog.chinaunix.net/uid-24227137-id-3595610.html 窥探 kernel --- 进程调度的目标,nice值,静态优先级,动态优先级,实时优先级 ...

  3. Redmine backlogs 安装

    之前我们一直用IceScrum的免费版本来运作Scrum项目,用GitLab来做做Issue管理,但是出现了一些问题.GitLab的issue不够好用,不能满足我们的需求,同时issue没有办法放在S ...

  4. 8位(bit)=1字节(Byte)

    8位(bit)=1字节(Byte),1024字节=1KB: 提到了字节,不得不再提到“字”这个计量单位:“字”由若干个字节构成,字的位数叫做字长,字长就是说字所对应的二进制数的长度.不同的机器有不同的 ...

  5. SecureCRT 绝佳配色方案

    终端有一个好的配色,不仅能保护自己的眼睛,也能给人一个好心情,本配色方案适合任意一种SSH客户端软件. 设置背景颜色 Options => Sessions options => Term ...

  6. DoNet开源项目-基于jQuery EasyUI的后台管理系统

    博主在业余时间开发了一个简单的后台管理系统,其中用到了 jQuery EasyUI 框架,上次分享过系统布局,参考文章:jQuery EasyUI 后台管理系统布局分享,目前已完成系统的整体框架的搭建 ...

  7. javascript模式——Mixin

    Mixin是一种扩展收集功能的方式,能提高代码的复用率. 在javascript中,原型可以继承于其它对象的原型,并且可以为任意数量的实例定义属性.可以利用这一点来促进函数的复用. 下面一段代码就是将 ...

  8. SQL Server中调用WebService的实例

    尊重原著作:本文转载自http://www.cnblogs.com/icycore/p/3532197.html 1.Ole Automation Procedures 服务器配置选项 当启用 OLE ...

  9. IIS ,未能加载文件或程序集“System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35”或它的某一个依赖项。系统找不到指定的文件。

    1.解决办法:安装MSChart.exe程序 图表控件,下载附件,以管理员身份运行安装.

  10. 解决ul显示不在div中的问题

    css样式 #banner { padding: 0px; } #banner ul { list-style: none; margin: 0px; padding: 0px; text-align ...