参考官方文档 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的更多相关文章

  1. spring自定义schema学习

    [转载请注明作者和原文链接,欢迎讨论,相互学习.] 一.前言 1. 最近在学习dubbo,里边很多如provider.consumer.registry的配置都是通过spring自定义Schema来实 ...

  2. Spring中自定义Schema扩展机制

    一.前言 Spring 为基于 XML 构建的应用提供了一种扩展机制,用于定义和配置 Bean. 它允许使用者编写自定义的 XML bean 解析器,并将解析器本身以及最终定义的 Bean 集成到 S ...

  3. spring 自定义schema

    扩展schema,定义自己的bean属性..不错! 主要: 1,定义META-INF下.xsd文件,这里是people.xsd;定义spring.handlers;定义spring.schemas 2 ...

  4. spring 自定义schema 加载异常 White spaces are required between publicId and systemId.

    spring 项目启动报错 报错日志如下: Caused by: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreExcepti ...

  5. 自定义schema 流程

    参考 https://www.cnblogs.com/googlemeoften/p/5746684.html

  6. 基于Spring的可扩展Schema进行开发自定义配置标签支持

    一.背景 最近和朋友一起想开发一个类似alibaba dubbo的功能的工具,其中就用到了基于Spring的可扩展Schema进行开发自定义配置标签支持,通过上网查资料自己写了一个demo.今天在这里 ...

  7. OpenLDAP使用疑惑解答及使用Java完成LDAP身份认证

    导读 LDAP(轻量级目录访问协议,Lightweight Directory Access Protocol)是实现提供被称为目录服务的信息服务.目录服务是一种特殊的数据库系统,其专门针对读取,浏览 ...

  8. linux服务之openldap

    http://www.openldap.org/ http://blog.csdn.net/chinalinuxzend/article/details/1870656 OpenLDAP学习笔记 ht ...

  9. 1.openldap介绍

    1.openldap介绍 OpenLDAP是轻型目录访问协议(Lightweight Directory Access Protocol,LDAP)的自由和开源的实现,在其OpenLDAP许可证下发行 ...

随机推荐

  1. Jmeter—7 测试中使用到的定时器和逻辑控制器

    1 测试中提交数据有延时1min,所以查询数据是否提交成功要设置定时器. 固定定时器页面:单位是毫秒 [dinghanhua] 2 集合点.Synchronizing Timer 集合点编辑:集合用户 ...

  2. 安装生物信息学软件-bowtie2

    好吧,这是本周(2016.10.21-28)的学习任务之一:安装bowtie2并学习其使用方法&参数设置 所以,啃文档咯,官方文档Version 2.2.9 http://bowtie-bio ...

  3. 无线网络的切换bat

    内网外网都是无线,切换起来麻烦,做了两个个bat(注意,切换网络的时候有延时,就点两次). -------------------下面的是切换到内网-------------------------- ...

  4. git error

    一,今天在上传代码时出错: $ git push -u origin mastererror: The requested URL returned error: 403 Forbidden whil ...

  5. yii使用MongoDB作为数据库服务软件[win7环境下](1)

    1.进入http://php.net,在站内搜索栏搜索mongodb,查看相关的安装步骤信息. 2.找到相应的php.ini配置文件,使用wampserver等服务器软件时,千万不要找错了php.in ...

  6. 非常好的分页组建layPage和 layer层特效

    http://layer.layui.com/ http://sentsin.com/layui/laypage/

  7. main函数的简介

    ////  main函数的简介.h//  IOS笔记////  Created by .//  Copyright © 2015年  All rights reserved.// //#import ...

  8. Quartus 编译错误

    1.Error (10028): Can't resolve multiple constant drivers for net ** 这种错误一般是由于定义的reg寄存器在多个always中进行赋值 ...

  9. 通过反射得到object[]数组的类型并且的到此类型所有的字段及字段的值

    private string T_Account(object[] list) { StringBuilder code = new StringBuilder(); //得到数据类型 Type t ...

  10. Docker之功能汇总

    Docker-给容器做端口映射 基本的命令是 -P(大写) :Docker 会随机映射一个 49000~49900 的端口到内部容器开放的网络端口基本的命令是 -p(小写) :Docker则可以指定要 ...