提交 fbe18aab 编写于 作者: M MaxKey

LDAP objectclass

上级 115a0ac6
/*
* Copyright [2021] [MaxKey of copyright http://www.maxkey.top]
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.maxkey.constants.ldap;
import java.io.UnsupportedEncodingException;
/**
* ActiveDirectoryUser objectclass attribute
* top -> person -> organizationalPerson -> user
* @author shimingxy
*
*/
public class ActiveDirectoryUser {
/*
* userAccountControl值得说明
* http://support.microsoft.com/zh-cn/kb/305144
* https://docs.microsoft.com/en-us/troubleshoot/windows-server/identity/useraccountcontrol-manipulate-account-properties
*
* Property flag Value in hexadecimal Value in decimal
* SCRIPT 0x0001 1
* ACCOUNTDISABLE 0x0002 2
* HOMEDIR_REQUIRED 0x0008 8
* LOCKOUT 0x0010 16
* PASSWD_NOTREQD 0x0020 32
* PASSWD_CANT_CHANGE 0x0040 64 You can't assign this permission by directly modifying the UserAccountControl attribute. For information about how to set the permission programmatically, see the Property flag descriptions section.
* ENCRYPTED_TEXT_PWD_ALLOWED 0x0080 128
* TEMP_DUPLICATE_ACCOUNT 0x0100 256
* NORMAL_ACCOUNT 0x0200 512
* INTERDOMAIN_TRUST_ACCOUNT 0x0800 2048
* WORKSTATION_TRUST_ACCOUNT 0x1000 4096
* SERVER_TRUST_ACCOUNT 0x2000 8192
* DONT_EXPIRE_PASSWORD 0x10000 65536
* MNS_LOGON_ACCOUNT 0x20000 131072
* SMARTCARD_REQUIRED 0x40000 262144
* TRUSTED_FOR_DELEGATION 0x80000 524288
* NOT_DELEGATED 0x100000 1048576
* USE_DES_KEY_ONLY 0x200000 2097152
* DONT_REQ_PREAUTH 0x400000 4194304
* PASSWORD_EXPIRED 0x800000 8388608
* TRUSTED_TO_AUTH_FOR_DELEGATION 0x1000000 16777216
* PARTIAL_SECRETS_ACCOUNT 0x04000000 67108864
*
*常规
* 名 First Name givenName
* 姓 Last Name sn
* 英文缩写 Initials initials
* 描述 Description description
* 办公室 Office physicalDeliveryOfficeName
* 电话号码 Telephone Number telephoneNumber
* 电话号码 Telephone: Other otherTelephone
* 电子邮件 E-Mail mail
* 网页 Web Page wwwHomePage
* Web Page: Other url
*
* 家庭电话 Home telephoneNumber
* Home: Other otherTelephone
* 寻呼机 Pager pager
* Pager: Other pagerOther
* 移动电话 Mobile mobile
* Mobile: Other otherMobile
* 传真 Fax facsimileTelephoneNumber
* Fax: Other otherFacsimileTelephoneNumber
* IP电话 IP phone ipPhone
* IP phone: Other otherIpPhone
* 注释 Notes info
*帐号
* 用户登录名 UserLogon Name userPrincipalName
* 用户登录名(以前版本)User logon name (pre-Windows 2000) sAMAccountname
* 登录时间 Logon Hours logonHours
* 登录到 Log On To logonWorkstation
* 用户帐户控制 Account is locked out userAccountControl (启用:512,禁用:514, 密码永不过期:66048)
* Other Account Options userAccountControl
* User must change password at next logon pwdLastSet
* User cannot change password N/A
* 帐户过期 Account Expires accountExpires
*
*地址
* 街道 Street streetAddress
* 邮政信箱 P.O.Box postOfficeBox
* 邮政编码 Zip/Postal Code postalCode
* 市/县 City l
* 省/自治区 State/Province st
* 国家/地区 Country/Region c,co, and countryCode
*
*单位
* 职务 Title title
* 部门 Department department
* 公司 Company company
* 经理 Manager:Name manager
* 直接汇报人 Direct Reports directReports
*
*成员
* 成员组 Member of memberOf
* 主要组 Set Primary Group primaryGroupID
*/
public static final String GIVENNAME = "givenName";
public static final String SN = "sn";
public static final String INITIALS = "initials";
public static final String DESCRIPTION = "description";
public static final String PHYSICALDELIVERYOFFICENAME = "physicalDeliveryOfficeName";
public static final String MAIL = "mail";
public static final String WWWHOMEPAGE = "wwwHomePage";
public static final String TELEPHONENUMBER = "telephoneNumber";
public static final String OTHERTELEPHONE = "otherTelephone";
public static final String PAGER = "pager";
public static final String PAGEROTHER = "pagerOther";
public static final String MOBILE = "mobile";
public static final String OTHERMOBILE = "otherMobile";
public static final String FACSIMILETELEPHONENUMBER = "facsimileTelephoneNumber";
public static final String OTHERFACSIMILETELEPHONENUMBER = "otherFacsimileTelephoneNumber";
public static final String IPPHONE = "ipPhone";
public static final String OTHERIPPHONE = "otherIpPhone";
public static final String INFO = "info";
public static final String USERPRINCIPALNAME = "userPrincipalName";
public static final String SAMACCOUNTNAME = "sAMAccountname";
public static final String LOGONHOURS = "logonHours";
public static final String LOGONWORKSTATION = "logonWorkstation";
public static final String USERACCOUNTCONTROL = "userAccountControl ";
public static final String PWDLASTSET = "pwdLastSet";
public static final String ACCOUNTEXPIRES = "accountExpires";
public static final String STREETADDRESS = "streetAddress";
public static final String POSTOFFICEBOX = "postOfficeBox";
public static final String POSTALCODE = "postalCode";
public static final String L = "l";
public static final String ST = "st";
public static final String C = "c";
public static final String TITLE = "title";
public static final String DEPARTMENT = "department";
public static final String COMPANY = "company";
public static final String MANAGER = "manager";
public static final String DIRECTREPORTS = "directReports";
public static final String MEMBER = "member";
public static final String MEMBEROF = "memberOf";
public static final String PRIMARYGROUPID = "primaryGroupID";
public static final String UNICODEPWD = "unicodePwd";
public static final String DISTINGUISHEDNAME = "distinguishedname";
public static byte[] encodePassword(String password) throws UnsupportedEncodingException {
return ("\"" + password + "\"").getBytes("UTF-16LE");
}
public static class userAccountControl{
public static final int SCRIPT =0x0001 ;// 1
public static final int ACCOUNTDISABLE =0x0002 ;// 2
public static final int HOMEDIR_REQUIRED =0x0008 ;// 8
public static final int LOCKOUT =0x0010 ;// 16
public static final int PASSWD_NOTREQD =0x0020 ;// 32
public static final int PASSWD_CANT_CHANGE =0x0040 ;// 64 You can't assign this permission by directly modifying the UserAccountControl attribute. For information about how to set the permission programmatically, see the Property flag descriptions section.
public static final int ENCRYPTED_TEXT_PWD_ALLOWED =0x0080 ;// 128
public static final int TEMP_DUPLICATE_ACCOUNT =0x0100 ;// 256
public static final int NORMAL_ACCOUNT =0x0200 ;// 512
public static final int INTERDOMAIN_TRUST_ACCOUNT =0x0800 ;// 2048
public static final int WORKSTATION_TRUST_ACCOUNT =0x1000 ;// 4096
public static final int SERVER_TRUST_ACCOUNT =0x2000 ;// 8192
public static final int DONT_EXPIRE_PASSWORD =0x10000 ;// 65536
public static final int MNS_LOGON_ACCOUNT =0x20000 ;// 131072
public static final int SMARTCARD_REQUIRED =0x40000 ;// 262144
public static final int TRUSTED_FOR_DELEGATION =0x80000 ;// 524288
public static final int NOT_DELEGATED =0x100000 ;// 1048576
public static final int USE_DES_KEY_ONLY =0x200000 ;// 2097152
public static final int DONT_REQ_PREAUTH =0x400000 ;// 4194304
public static final int PASSWORD_EXPIRED =0x800000 ;// 8388608
public static final int TRUSTED_TO_AUTH_FOR_DELEGATION =0x1000000 ;// 16777216
public static final int PARTIAL_SECRETS_ACCOUNT =0x04000000 ;// 67108864
}
}
/*
* Copyright [2021] [MaxKey of copyright http://www.maxkey.top]
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.maxkey.constants.ldap;
/**
* GroupOfNames objectclass attribute
* top
* @author shimingxy
*
*/
public class GroupOfNames {
public static final String CN = "cn";
public static final String MEMBER = "member";
public static final String BUSINESSCATEGORY = "businessCategory";
public static final String SEEALSO = "seeAlso";
public static final String OWNER = "owner";
public static final String OU = "ou";
public static final String O = "o";
public static final String DESCRIPTION = "description";
}
/*
* Copyright [2021] [MaxKey of copyright http://www.maxkey.top]
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.maxkey.constants.ldap;
/**
* GroupOfUniqueNames objectclass attribute
* top
* @author shimingxy
*
*/
public class GroupOfUniqueNames {
public static final String CN = "cn";
public static final String UNIQUEMEMBER = "uniqueMember";
public static final String BUSINESSCATEGORY = "businessCategory";
public static final String SEEALSO = "seeAlso";
public static final String OWNER = "owner";
public static final String OU = "ou";
public static final String O = "o";
public static final String DESCRIPTION = "description";
}
/*
* Copyright [2021] [MaxKey of copyright http://www.maxkey.top]
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.maxkey.constants.ldap;
/**
* InetOrgPerson objectclass attribute
* top -> person -> organizationalPerson -> inetOrgPerson
* @author shimingxy
*
*/
public class InetOrgPerson {
//person sup top
/**person sn MUST*/
public static final String SN = "sn";
/**person cn MUST*/
public static final String CN = "cn";
/**person userPassword*/
public static final String USERPASSWORD = "userPassword";
/**person userPassword*/
public static final String TELEPHONENUMBER = "telephoneNumber";
/**person seeAlso*/
public static final String SEEALSO = "seeAlso";
/**person description*/
public static final String DESCRIPTION = "description";
//organizationalPerson sup person
/**organizationalPerson title*/
public static final String TITLE = "title";
/**organizationalPerson x121Address*/
public static final String X121ADDRESS = "x121Address";
/**organizationalPerson registeredAddress*/
public static final String REGISTEREDADDRESS = "registeredAddress";
/**organizationalPerson destinationIndicator*/
public static final String DESTINATIONINDICATOR = "destinationIndicator";
/**organizationalPerson preferredDeliveryMethod*/
public static final String PREFERREDDELIVERYMETHOD = "preferredDeliveryMethod";
/**organizationalPerson telexNumber*/
public static final String TELEXNUMBER = "telexNumber";
/**organizationalPerson teletexTerminalIdentifier*/
public static final String TELETEXTERMINALIDENTIFIER = "teletexTerminalIdentifier";
/**organizationalPerson internationaliSDNNumber*/
public static final String INTERNATIONALISDNNUMBER = "internationaliSDNNumber";
/**organizationalPerson facsimileTelephoneNumber*/
public static final String FACSIMILETELEPHONENUMBER = "facsimileTelephoneNumber";
/**organizationalPerson street*/
public static final String STREET = "street";
/**organizationalPerson postOfficeBox*/
public static final String POSTOFFICEBOX = "postOfficeBox";
/**organizationalPerson postalCode*/
public static final String POSTALCODE = "postalCode";
/**organizationalPerson postalAddress*/
public static final String POSTALADDRESS = "postalAddress";
/**organizationalPerson physicalDeliveryOfficeName*/
public static final String PHYSICALDELIVERYOFFICENAME = "physicalDeliveryOfficeName";
/**organizationalPerson ou*/
public static final String OU = "ou";
/**organizationalPerson st*/
public static final String ST = "st";
/**organizationalPerson l*/
public static final String L = "l";
//inetOrgPerson sup organizationalPerson
/**inetOrgPerson carLicense*/
public static final String CARLICENSE = "carLicense";
/**inetOrgPerson departmentNumber*/
public static final String DEPARTMENTNUMBER = "departmentNumber";
/**inetOrgPerson displayName*/
public static final String DISPLAYNAME = "displayName";
/**inetOrgPerson employeeNumber*/
public static final String EMPLOYEENUMBER = "employeeNumber";
/**inetOrgPerson employeeType*/
public static final String EMPLOYEETYPE = "employeeType";
/**inetOrgPerson jpegPhoto*/
public static final String JPEGPHOTO = "jpegPhoto";
/**inetOrgPerson preferredLanguage*/
public static final String PREFERREDLANGUAGE = "preferredLanguage";
/**inetOrgPerson userSMIMECertificate*/
public static final String USERSMIMECERTIFICATE = "userSMIMECertificate";
/**inetOrgPerson userPKCS12*/
public static final String USERPKCS12 = "userPKCS12";
/**inetOrgPerson audio*/
public static final String AUDIO = "audio";
/**inetOrgPerson businessCategory*/
public static final String BUSINESSCATEGORY = "businessCategory";
/**inetOrgPerson givenName*/
public static final String GIVENNAME = "givenName";
/**inetOrgPerson homePhone*/
public static final String HOMEPHONE = "homePhone";
/**inetOrgPerson homePostalAddress*/
public static final String HOMEPOSTALADDRESS = "homePostalAddress";
/**inetOrgPerson initials*/
public static final String INITIALS = "initials";
/**inetOrgPerson photo*/
public static final String PHOTO = "photo";
/**inetOrgPerson roomNumber*/
public static final String ROOMNUMBER = "roomNumber";
/**inetOrgPerson secretary*/
public static final String SECRETARY = "secretary";
/**inetOrgPerson uid*/
public static final String UID = "uid";
/**inetOrgPerson userCertificate*/
public static final String USERCERTIFICATE = "userCertificate";
/**inetOrgPerson x500uniqueIdentifier*/
public static final String X500UNIQUEIDENTIFIER = "x500uniqueIdentifier";
}
/*
* Copyright [2021] [MaxKey of copyright http://www.maxkey.top]
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.maxkey.constants.ldap;
/**
* Organization objectclass attribute
* top
* @author shimingxy
*
*/
public class Organization {
/**Organization o*/
public static final String O = "o";
/**Organization userPassword*/
public static final String USERPASSWORD = "userPassword";
/**Organization searchGuide*/
public static final String SEARCHGUIDE = "searchGuide";
/**Organization seeAlso*/
public static final String SEEALSO = "seeAlso";
/**Organization description*/
public static final String DESCRIPTION = "description";
/**Organization businessCategory*/
public static final String BUSINESSCATEGORY = "businessCategory";
/**Organization x121Address*/
public static final String X121ADDRESS = "x121Address";
/**Organization registeredAddress*/
public static final String REGISTEREDADDRESS = "registeredAddress";
/**Organization destinationIndicator*/
public static final String DESTINATIONINDICATOR = "destinationIndicator";
/**Organization preferredDeliveryMethod*/
public static final String PREFERREDDELIVERYMETHOD = "preferredDeliveryMethod";
/**Organization telexNumber*/
public static final String TELEXNUMBER = "telexNumber";
/**Organization teletexTerminalIdentifier*/
public static final String TELETEXTERMINALIDENTIFIER = "teletexTerminalIdentifier";
/**Organization telephoneNumber*/
public static final String TELEPHONENUMBER = "telephoneNumber";
/**Organization internationaliSDNNumber*/
public static final String INTERNATIONALISDNNUMBER = "internationaliSDNNumber";
/**Organization facsimileTelephoneNumber*/
public static final String FACSIMILETELEPHONENUMBER = "facsimileTelephoneNumber";
/**Organization street*/
public static final String STREET = "street";
/**Organization postOfficeBox*/
public static final String POSTOFFICEBOX = "postOfficeBox";
/**Organization postalCode*/
public static final String POSTALCODE = "postalCode";
/**Organization postalAddress*/
public static final String POSTALADDRESS = "postalAddress";
/**Organization physicalDeliveryOfficeName*/
public static final String PHYSICALDELIVERYOFFICENAME = "physicalDeliveryOfficeName";
/**Organization st*/
public static final String ST = "st";
/**Organization l*/
public static final String L = "l";
}
/*
* Copyright [2021] [MaxKey of copyright http://www.maxkey.top]
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.maxkey.constants.ldap;
/**
* OrganizationalUnit objectclass attribute
* top
* @author shimingxy
*
*/
public class OrganizationalUnit {
/**OrganizationalUnit ou*/
public static final String OU = "ou";
/**OrganizationalUnit userPassword*/
public static final String USERPASSWORD = "userPassword";
/**OrganizationalUnit searchGuide*/
public static final String SEARCHGUIDE = "searchGuide";
/**OrganizationalUnit seeAlso*/
public static final String SEEALSO = "seeAlso";
/**OrganizationalUnit description*/
public static final String DESCRIPTION = "description";
/**OrganizationalUnit businessCategory*/
public static final String BUSINESSCATEGORY = "businessCategory";
/**OrganizationalUnit x121Address*/
public static final String X121ADDRESS = "x121Address";
/**OrganizationalUnit registeredAddress*/
public static final String REGISTEREDADDRESS = "registeredAddress";
/**OrganizationalUnit destinationIndicator*/
public static final String DESTINATIONINDICATOR = "destinationIndicator";
/**OrganizationalUnit preferredDeliveryMethod*/
public static final String PREFERREDDELIVERYMETHOD = "preferredDeliveryMethod";
/**OrganizationalUnit telexNumber*/
public static final String TELEXNUMBER = "telexNumber";
/**OrganizationalUnit teletexTerminalIdentifier*/
public static final String TELETEXTERMINALIDENTIFIER = "teletexTerminalIdentifier";
/**OrganizationalUnit telephoneNumber*/
public static final String TELEPHONENUMBER = "telephoneNumber";
/**OrganizationalUnit internationaliSDNNumber*/
public static final String INTERNATIONALISDNNUMBER = "internationaliSDNNumber";
/**OrganizationalUnit facsimileTelephoneNumber*/
public static final String FACSIMILETELEPHONENUMBER = "facsimileTelephoneNumber";
/**OrganizationalUnit street*/
public static final String STREET = "street";
/**OrganizationalUnit postOfficeBox*/
public static final String POSTOFFICEBOX = "postOfficeBox";
/**OrganizationalUnit postalCode*/
public static final String POSTALCODE = "postalCode";
/**OrganizationalUnit postalAddress*/
public static final String POSTALADDRESS = "postalAddress";
/**OrganizationalUnit physicalDeliveryOfficeName*/
public static final String PHYSICALDELIVERYOFFICENAME = "physicalDeliveryOfficeName";
/**OrganizationalUnit st*/
public static final String ST = "st";
/**OrganizationalUnit l*/
public static final String L = "l";
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册