ldap

LDAP入门与OpenLDAP使用配置

試著忘記壹切 提交于 2019-12-19 05:50:11
LDAP入门与OpenLDAP使用配置 1、LDAP简介 LDAP(轻量级目录访问协议,Lightweight Directory Access Protocol)是实现提供被称为目录服务的信息服务。目录服务是一种特殊的数据库系统,专门针对读取,浏览和搜索操作进行了特定的优化。目录一般包含描述性的,基于属性的信息并支持精细复杂的过滤能力。目录一般不支持通用数据库针对大量更新操作需要的复杂事务管理或回卷策略。目录服务的 更新一般都非常简单。这种目录可以存储包括个人信息、web链结、jpeg图像等各种信息。为了访问存储在目录中的信息,需要使用运行在TCP/IP之上的访问协议——LDAP。 LDAP目录中的信息按照树型结构组织,具体信息存储在条目(entry)数据结构中。条目相当于关系数据库中表的记录;条目是具有区别名DN(Distinguished Name)的属性(Attribute)集合,DN是用来引用条目的。属性由类型(Type)和一个或多个值(Values)组成,类型规定了属性允许存放的值的约束条件,同时也规定了该类型数据进行比较时的规则。LDAP使用语法(Syntax)这一概念表示属性的取值约束和比较规则,常用的语法是字符型。 LDAP中条目的组织一般按照地理位置和组织关系进行组织,非常的直观。LDAP把数据存放在文件中,为提高效率可以使用基于索引的文件数据库

How to use Spring Ldap Authentication

梦想与她 提交于 2019-12-19 03:39:14
问题 In my current project, I have to implement LDAP authentication. I am using JSF 2.2, primefaces and Spring 4.0 and spring-ldap-core 1.3.2 and spring-security-ldap-3.2.0. Below are the work till now I have done to achieve: Spring-Ldap.xml <bean id="contextSource" class="org.springframework.ldap.core.support.LdapContextSource"> <property name="url" value="ldap://mumcXXXXXXX" /> <property name="base" value="dc=ad,dc=XXX,dc=com"/> <property name="userDn" value="XXXX@ad.XXX.com" /> <property name=

Does the LDAP protocol limit the length of a DN

二次信任 提交于 2019-12-19 03:15:52
问题 Does the LDAP protocol specify a maximum length that a DN can take? I've looked through http://tools.ietf.org/html/rfc4514 but I can't find any restrictions that it imposes. 回答1: No, it doesn't seem to be specified explicitly anywhere - and the Active Directory implementation also doesn't impose a max length on the DN syntax (2.5.5.1). Marc 回答2: Most implementations of LDAP DN's usually hit 256 characters, which I think comes from X.500 still. After all X.500 defines the DAP, and LDAP is the

Apache, SSL Client certificate, LDAP authorizations

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-18 18:20:22
问题 High there, I posted this question on serverfault.com, but I had no answer, so I'm trying here... Is it possible to mix mod_ssl and mod_auth_ldap so that the authentication is done with the client certificate and authorizations with mod_auth_ldap (Require ldap-group)? If so, can you give me some pointer? Thanks in advance 回答1: OK, for those interested, apache requires the presence of an AuthType directive and the validation of the username by some module. So I have written a very short module

LDAP validation fails when “User must change password on next log on”. Any solution?

六月ゝ 毕业季﹏ 提交于 2019-12-18 17:24:57
问题 I'm having trouble with a user validation when the "User must change password on next log on" is set. Here's how I validate the user: Boolean ValidateUser(String userName, String password) { try { var userOk = new DirectoryEntry("LDAP://<my LDAP server>", userName, password, AuthenticationTypes.Secure | AuthenticationTypes.ServerBind); return true; } catch (COMException ex) { if (ex.ErrorCode == -2147023570) // 0x8007052E -- Wrong user or password return false; else throw; } } When the "must

LDAP validation fails when “User must change password on next log on”. Any solution?

牧云@^-^@ 提交于 2019-12-18 17:24:27
问题 I'm having trouble with a user validation when the "User must change password on next log on" is set. Here's how I validate the user: Boolean ValidateUser(String userName, String password) { try { var userOk = new DirectoryEntry("LDAP://<my LDAP server>", userName, password, AuthenticationTypes.Secure | AuthenticationTypes.ServerBind); return true; } catch (COMException ex) { if (ex.ErrorCode == -2147023570) // 0x8007052E -- Wrong user or password return false; else throw; } } When the "must

Gitlab加入LDAP认证

两盒软妹~` 提交于 2019-12-18 17:11:06
如果企业大大小小系统较多,每个系统都给用户单独配置一账户。这样各个系统的账户信息都要单独记忆,比较繁琐,而且账户信息易忘。所以加入集成 LDAP 统一认证,域控管理。这里对Gitlab应用系统结合LDAP认证,前提是企业内部已搭建好AD域服务。 Gitlab配置LDAP Gitlab已安装好,安装的CE版本。Gitlab配置LDAP服务要在配置文件中修改,无法像Jenkins加入LDAP那样安装一LDAP插件,然后配置LDAP信息即可。Gitlab中需在默认的配置文件/etc/gitlab/gitlab.rb中修改LDAP配置项。默认LDAP服务是关闭的,配置项 gitlab_rails['ldap_enabled'] = false。现开启LDAP服务并配置,修改以下配置项: gitlab_rails['ldap_enabled'] = true ###! **remember to close this block with 'EOS' below** gitlab_rails['ldap_servers'] = YAML.load <<-'EOS' main: # 'main' is the GitLab 'provider ID' of this LDAP server label: 'LDAP' host: '10.10.10.60' port: 389 uid:

Gitlab加入LDAP认证

六眼飞鱼酱① 提交于 2019-12-18 17:10:59
如果企业大大小小系统较多,每个系统都给用户单独配置一账户。这样各个系统的账户信息都要单独记忆,比较繁琐,而且账户信息易忘。所以加入集成 LDAP 统一认证,域控管理。这里对Gitlab应用系统结合LDAP认证,前提是企业内部已搭建好AD域服务。 Gitlab配置LDAP Gitlab已安装好,安装的CE版本。Gitlab配置LDAP服务要在配置文件中修改,无法像Jenkins加入LDAP那样安装一LDAP插件,然后配置LDAP信息即可。Gitlab中需在默认的配置文件/etc/gitlab/gitlab.rb中修改LDAP配置项。默认LDAP服务是关闭的,配置项 gitlab_rails['ldap_enabled'] = false。现开启LDAP服务并配置,修改以下配置项: gitlab_rails['ldap_enabled'] = true ###! **remember to close this block with 'EOS' below** gitlab_rails['ldap_servers'] = YAML.load <<-'EOS' main: # 'main' is the GitLab 'provider ID' of this LDAP server label: 'LDAP' host: '10.10.10.60' port: 389 uid:

Spring-boot LDAP customize UserDetails

允我心安 提交于 2019-12-18 17:10:12
问题 I'm using LDAP authentication in spring-boot application (configuration based on annotations). I would like to customize UserDetails object. Default UserDetails implementation is LdapUserDetailsImpl . I would like to extend this class and add some extra iterfaces and bind into spring-security. My config class: @Configuration protected static class AuthenticationConfiguration extends GlobalAuthenticationConfigurerAdapter { @Autowired private UserService userService; @Autowired private

PHP ldap_add function to escape ldap special characters in DN syntax

自作多情 提交于 2019-12-18 12:29:09
问题 I'm trying to add some users to my Ldap DB but I get some errors (invalid dn syntax) when I use some special characters like ",.". I need a function that escape all characters. I try preg_quote but I get some errors in some cases. Thanks in advance Code: $user = 'Test , Name S.L'; if(!(ldap_add($ds, "cn=" . $user . ",".LDAP_DN_BASE, $info))) { include 'error_new_account.php'; } 回答1: EDIT Jan 2013: added support for escaping leading/trailing spaces in DN strings, per RFC 4514. Thanks to