openldap自定义schema
参考官方文档 13. Schema Specification
http://www.verydemo.com/demo_c161_i74426.html
https://oskb.wordpress.com/2008/08/13/openldap学习笔记转-openldap介绍/
ldapns.schema
attributetype ( 1.3.6.1.4.1.5322.17.2.1 NAME 'authorizedService'
DESC 'IANA GSS-API authorized service name'
EQUALITY caseIgnoreMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{256} )
attributetype ( 1.3.6.1.4.1.5322.17.2.2 NAME 'loginStatus'
DESC 'Currently logged in sessions for a user'
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
ORDERING caseIgnoreOrderingMatch
SYNTAX OMsDirectoryString )
objectclass ( 1.3.6.1.4.1.5322.17.1.1 NAME 'authorizedServiceObject'
DESC 'Auxiliary object class for adding authorizedService attribute'
SUP top
AUXILIARY
MAY authorizedService )
objectclass ( 1.3.6.1.4.1.5322.17.1.2 NAME 'hostObject'
DESC 'Auxiliary object class for adding host attribute'
SUP top
AUXILIARY
MAY host )
objectclass ( 1.3.6.1.4.1.5322.17.1.3 NAME 'loginStatusObject'
DESC 'Auxiliary object class for login status attribute'
SUP top
AUXILIARY
MAY loginStatus )
my.schema
attributetype ( 1.3.6.1.4.1.30000.500.1.1.1 NAME 'active'
DESC 'MANDATORY: Account active stauts 0-disable 1-enable'
EQUALITY integerMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
attributetype ( 1.3.6.1.4.1.30000.500.1.1.2 NAME 'access'
DESC 'MANDATORY: Access Control'
EQUALITY caseExactIA5Match
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
attributetype ( 1.3.6.1.4.1.30000.500.1.1.3 NAME 'gauthcode'
DESC 'MANDATORY: Google authenticator'
EQUALITY caseExactIA5Match
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
objectclass ( 1.3.6.1.4.1.30000.500.1.2.0 NAME 'MyAccount'
SUP top
AUXILIARY
DESC 'MANDATORY: conf user account'
MUST ( active )
MAY ( access $ gauthcode $ sn $ givenName $ displayName $ mobile $ mail $ photo)
)
#1 oid使用1.3.6.1.4.1 - IANA-registered Private Enterprises,从http://www.alvestrand.no/objectid/1.3.6.1.4.1.html查询一个未经占用的。
#2 Commonly Used Syntaxes
boolean: 1.3.6.1.4.1.1466.115.121.1.7
directoryString(utf8): 1.3.6.1.4.1.1466.115.121.1.15
distinguishedName: 1.3.6.1.4.1.1466.115.121.1.15
integer: 1.3.6.1.4.1.1466.115.121.1.27
numericString: 1.3.6.1.4.1.1466.115.121.1.3
OID: 1.3.6.1.4.1.1466.115.121.1.38
octetString: 1.3.6.1.4.1.1466.115.121.1.40
#3 Commonly Used Matching Rules
booleanMatch 布尔比较
caseIgnoreMatch 忽略大小写,忽略空格
caseExactMatch 区分大小写,忽略空格
integerMatch 整型数值比较
numericStringMatch 字符型数值比较
cat > /etc/openldap/schema/my.schema << _EOF_
attributetype ( 1.3.6.1.4.1.30000.500.1.1.1 NAME 'active'
DESC 'MANDATORY: Account active stauts 0-disable 1-enable'
EQUALITY integerMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
SINGLE-VALUE
)
attributetype ( 1.3.6.1.4.1.30000.500.1.1.2 NAME 'access'
DESC 'Access Control: ssh vpn web ...'
EQUALITY caseExactMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
)
attributetype ( 1.3.6.1.4.1.30000.500.1.1.3 NAME 'gauthcode'
DESC 'Google authenticator'
EQUALITY caseExactMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
SINGLE-VALUE
)
objectclass ( 1.3.6.1.4.1.30000.500.1.2.1 NAME 'myAccount'
DESC 'my user account'
SUP top
AUXILIARY
MUST ( active )
MAY ( access $ gauthcode $ sn $ givenName $ displayName $ mobile $ mail $ photo)
)
objectclass ( 1.3.6.1.4.1.30000.500.1.2.2 NAME 'hostObject'
DESC 'adding host attribute'
SUP top
AUXILIARY
MAY host
)
_EOF_
openldap自定义schema的更多相关文章
- spring自定义schema学习
[转载请注明作者和原文链接,欢迎讨论,相互学习.] 一.前言 1. 最近在学习dubbo,里边很多如provider.consumer.registry的配置都是通过spring自定义Schema来实 ...
- Spring中自定义Schema扩展机制
一.前言 Spring 为基于 XML 构建的应用提供了一种扩展机制,用于定义和配置 Bean. 它允许使用者编写自定义的 XML bean 解析器,并将解析器本身以及最终定义的 Bean 集成到 S ...
- spring 自定义schema
扩展schema,定义自己的bean属性..不错! 主要: 1,定义META-INF下.xsd文件,这里是people.xsd;定义spring.handlers;定义spring.schemas 2 ...
- spring 自定义schema 加载异常 White spaces are required between publicId and systemId.
spring 项目启动报错 报错日志如下: Caused by: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreExcepti ...
- 自定义schema 流程
参考 https://www.cnblogs.com/googlemeoften/p/5746684.html
- 基于Spring的可扩展Schema进行开发自定义配置标签支持
一.背景 最近和朋友一起想开发一个类似alibaba dubbo的功能的工具,其中就用到了基于Spring的可扩展Schema进行开发自定义配置标签支持,通过上网查资料自己写了一个demo.今天在这里 ...
- OpenLDAP使用疑惑解答及使用Java完成LDAP身份认证
导读 LDAP(轻量级目录访问协议,Lightweight Directory Access Protocol)是实现提供被称为目录服务的信息服务.目录服务是一种特殊的数据库系统,其专门针对读取,浏览 ...
- linux服务之openldap
http://www.openldap.org/ http://blog.csdn.net/chinalinuxzend/article/details/1870656 OpenLDAP学习笔记 ht ...
- 1.openldap介绍
1.openldap介绍 OpenLDAP是轻型目录访问协议(Lightweight Directory Access Protocol,LDAP)的自由和开源的实现,在其OpenLDAP许可证下发行 ...
随机推荐
- Ubuntu中安装eclipse ,双击eclipse出现invalid configuration location问题
ubuntu invalid configuration location 标签: myeclipse for ubuntu ubuntu myeclipse ubuntu安装myecli ...
- 快速排序C++
/* * quick_sort.cpp * * Created on: 2016-3-21 * Author: Lv_Lang */ //快速排序 #include <iostream> ...
- marquee|各种文字滚动代码(适用公告)
marquee|各种文字滚动代码(适用公告)
- PHP flush sleep 输出缓存控制详解
1 2 3 4 5 6 ob_start,flush,ob_flush for($i=0;$i<</SPAN>10;$i++) { echo $i.''; flush(); slee ...
- 防止apache下面直接输入目录访问文件
有些项目链接会暴露服务器上面的文件地址,如何访问文件被访问呢 方法一: 在项目入口文件下面新加一个.htaccess文件(apache开启重写模式才会加载这个文件,否则这个文件配置不会生效) 文件中加 ...
- WPF的Binding学习笔记(二)
原文: http://www.cnblogs.com/pasoraku/archive/2012/10/25/2738428.htmlWPF的Binding学习笔记(二) 上次学了点点Binding的 ...
- 解决eclipse spring配置报错:cvc-elt.1: Cannot find the declaration of element
解决eclipse spring配置报错:cvc-elt.1: Cannot find the declaration of element 'beans'.Referenced file conta ...
- lucene教程简介
1 lucene简介 1.1 什么是lucene Lucene是一个全文搜索框架,而不是应用产品.因此它并不像www.baidu.com 或者google Desktop那么拿来就能用,它只是 ...
- android 镜像源
Android SDK在线更新镜像服务器 中国科学院开源协会镜像站地址: IPV4/IPV6: mirrors.opencas.cn 端口:80 IPV4/IPV6: mirrors.opencas. ...
- js 获取浏览器可视窗口大小,滚动条高度
// 获取窗口宽度 if (window.innerWidth) winWidth = window.innerWidth; else if ((document.body) && ( ...