談笑有鴻儒,往來無白丁

          在恰當的時間、地點以恰當的方式表達給恰當的人...  閱讀的時候請注意分類,佛曰我日里面是談笑文章,其他是各個分類的文章,積極的熱情投入到寫博的隊伍中來,支持blogjava做大做強!向dudu站長致敬>> > 我的微博敬請收聽

          今天的手又癢癢了,覺得應該是時候寫點東西了。
          這一周的時間在忙活LDAP認證,這個已經不是什么新鮮名詞了概念就免了;
          之所以學LDAP,還是為了SSO和PORTAL。
          經過一周的時間,搭建好了LDAP服務器,用的開源的APACHE的DS,還有APACHE的studio;配置起來非常的簡單主要掌握幾個要點就好了:
          1、server.xml的配置
          Adding your own partition resp. suffix
          添加自己的數據格式
          <property name="contextPartitionConfigurations">
          ? <set>
          ??? <ref bean="examplePartitionConfiguration"/>
          ??? <ref bean="myPartitionConfiguration"/>
          ? </set>
          </property>
          然后查詢examplePartitionConfiguration把他的bean配置重新復制一份需要修改幾個地方
          <bean id="myPartitionConfiguration"
          ????? class="org.apache.directory.server.core.partition.
          ??????????????????????????? impl.btree.MutableBTreePartitionConfiguration">
          Next give the partition a name and change the suffix to o=mydomain
          <property name="name" value="mydomain" />

          <property name="contextEntry">
          ??? <value>
          ????? objectClass: top
          ????? objectClass: domain
          ????? objectClass: extensibleObject
          ????? dc: example ---> o:mydomaim
          ??? </value>
          </property>
          重新啟動apache ds;

          2、LDIF文件的格式
          第一步:組織結構以及管理員信息
          dn: o=chinantn,dc=com
          objectclass: organization
          objectclass: top
          o: chinantn

          dn: cn=manager,o=chinantn,dc=com
          objectclass: organizationalPerson
          objectclass: person
          objectclass: top
          cn: manager
          sn: badboyryan
          userpassword:: c2VjcmV0

          dn: ou=departments,o=chinantn,dc=com
          objectclass: organizationalUnit
          objectclass: top
          ou: departments

          dn: ou=market,ou=departments,o=chinantn,dc=com
          objectclass: organizationalUnit
          objectclass: top
          ou: market

          dn: ou=developer,ou=departments,o=chinantn,dc=com
          objectclass: organizationalUnit
          objectclass: top
          ou: developer

          dn: ou=service,ou=departments,o=chinantn,dc=com
          objectclass: organizationalUnit
          objectclass: top
          ou: service

          dn: ou=finance,ou=departments,o=chinantn,dc=com
          objectclass: organizationalUnit
          objectclass: top
          ou: finance

          dn: ou=directorate,ou=departments,o=chinantn,dc=com
          objectclass: organizationalUnit
          objectclass: top
          ou: directorate

          dn: ou=engineer,ou=departments,o=chinantn,dc=com
          objectclass: organizationalUnit
          objectclass: top
          ou: engineer

          dn: ou=partners,o=chinantn,dc=com
          objectclass: organizationalUnit
          objectclass: top
          ou: partners

          dn: ou=customers,ou=partners,o=chinantn,dc=com
          objectclass: organizationalUnit
          objectclass: top
          ou: customers

          dn: ou=suppliers,ou=partners,o=chinantn,dc=com
          objectclass: organizationalUnit
          objectclass: top
          ou: suppliers

          dn: ou=employees,ou=partners,o=chinantn,dc=com
          objectclass: organizationalUnit
          objectclass: top
          ou: employees

          第二步:人員信息

          dn: uid=scf,ou=developer,ou=departments,o=chinantn,dc=com
          objectClass: person
          objectClass: uidObject
          objectClass: organizationalPerson
          objectClass: top
          cn: sss
          sn: scf
          uid: scf
          userpassword:: e01ENX1YTXNwY1ZWVFhUbFh1K1M0QllLY0hBPT0=
          人員信息就少寫一點了,有空你再慢慢的補充上。
          第三步:導入LDIF文件,這個時候LDAP服務器里面就有了一棵樹(組織結構)
          第四步:被指jira讓他利用LDAP認證來登錄系統,如下圖所示:




          經過上面的折騰就完成了一個通過LDAP認證的小例子了。
          注意轉帖的時候帶上:
          ?所有:http://badboyryan.blogjava.net
          隨意的轉帖不受法律約束。

          posted on 2007-09-28 13:16 壞男孩 閱讀(7587) 評論(9)  編輯  收藏 所屬分類: java命令學習

          FeedBack:
          # re: jira如何配置使用LDAP認證
          2007-09-28 13:30 | CowNew開源團隊
          感謝badboy的共享精神!:)  回復  更多評論
            
          # re: jira如何配置使用LDAP認證
          2007-09-28 15:02 | 千里冰封
          感謝  回復  更多評論
            
          # re: jira如何配置使用LDAP認證
          2007-09-28 21:30 | BeanSoft
          多謝壞男孩的培訓!  回復  更多評論
            
          # re: jira如何配置使用LDAP認證
          2007-10-09 15:35 | 站名
          中國筑養機械租賃網站  回復  更多評論
            
          # re: jira如何配置使用LDAP認證
          2008-05-02 16:59 | tangxwy
          我在配置時,出現下面的錯誤,這個帳號在其他系統是可以登錄的,但在jira里報沒權限,不知這個權限應該如何設置?
          Initial connect and search successful, but second phase connection to LDAP as 'uid=3533,ou=employees,dc=example,dc=com' failed (error: javax.naming.NoPermissionException: [LDAP: error code 50 - Insufficient Access Rights]; remaining name 'uid=3533,ou=employees,dc=example,dc=com'. More in logs)
          如可以,請發送郵件到tangxwy@tom.com,謝謝  回復  更多評論
            
          # re: jira如何配置使用LDAP認證[未登錄]
          2008-12-01 16:02 |
          感謝!  回復  更多評論
            
          # re: jira如何配置使用LDAP認證[未登錄]
          2008-12-01 16:07 |
          問題同上上,我的郵箱:maple_happy_yes@sina.com.cn  回復  更多評論
            
          # re: jira如何配置使用LDAP認證
          2009-02-25 17:21 | huyong
          我也遇到了這個問題
          mail:huyong.java@gmail.com
          thank you !  回復  更多評論
            
          # re: jira如何配置使用LDAP認證
          2010-10-10 17:59 | pengliu
          我配置成功后登錄時。驗證碼的圖打不開。所以還是導致無活登錄。樓主給判斷下吧,謝謝。  回復  更多評論
            
          主站蜘蛛池模板: 荃湾区| 翼城县| 丹棱县| 邵阳市| 河北省| 前郭尔| 措勤县| 盐城市| 清苑县| 利川市| 伊宁市| 平潭县| 玉门市| 沭阳县| 施秉县| 策勒县| 钟山县| 元谋县| 昌都县| 涞水县| 手机| 岳西县| 五河县| 泾源县| 新巴尔虎右旗| 宝山区| 阳曲县| 彩票| 玉屏| 台江县| 阿尔山市| 富川| 隆子县| 凤台县| 岳阳市| 临洮县| 肃宁县| 栾川县| 永昌县| 林芝县| 谷城县|