久久精品精选,精品九九视频,www久久只有这里有精品,亚洲熟女乱色综合一区
    分享

    Webapp with CLIENT-CERT authentication method

     digitaldreamer 2007-01-14

    The first prerequisite is tomcat running over SSL channel. Or you will get

     

     

    Another prerequisite is to set the SSL port of Tomcat as mutual authentication. That way the UA will present your certificate to the server.

    You will get this if no client certificate is provided.

     

    The third prerequisite is the client must trust the server‘s certificate and vice verse. Firefox will raise this alter window if your certificate is not trusted by the server.

     

     

     


    The web.xml of web app is,

    <servlet-mapping>

    <servlet-name>ProtectedServlet</servlet-name>

    <url-pattern>/ProtectedByClientCert</url-pattern>

    </servlet-mapping>

     

    <security-role>

    <role-name>members</role-name>

    </security-role>

     

    <security-constraint>

    <web-resource-collection>

    <web-resource-name>Resource protected by client cert</web-resource-name>

    <url-pattern>/ProtectedByClientCert</url-pattern>

    </web-resource-collection>

    <auth-constraint>

    <role-name>members</role-name>

    </auth-constraint>

    </security-constraint>

     

    <login-config>

    <auth-method>CLIENT-CERT</auth-method>

    <realm-name>Client Cert Users-only Area</realm-name>

    </login-config>

     

     

    Please pay attention to the <auth-constraint>. It constraints the allowed users to the role of members. So you also need to add user names into tomcat-users.xml. But what‘s the user name? In other authentication methods, users are given the chance to input their name when accessing the protected resources. In CLLENT-CERT method, there is no chance to let uses do that. Certificate is the only credential user presents. So you should use information contained in certificate as user name. Solely using value of CN field won‘t work. Imagine a situation that there are two Johns belong to different organization unit. How tomcat distinguishes these two guys by the CN ? So the correct value you set in tomcat-users.xml is the DN of the user. Below is an example file.

    <?xml version=‘1.0‘ encoding=‘utf-8‘?>

    <tomcat-users>

    <role rolename="tomcat"/>

    <role rolename="members"/>

    <role rolename="role1"/>

    <user username="tomcat" password="tomcat" roles="tomcat"/>

    <user username="role1" password="tomcat" roles="role1"/>

    <user username="both" password="tomcat" roles="tomcat,role1,members"/>

    <user username="CN=clientbrowser, OU=scn1266, O=scn1266, L=sh, ST=sh, C=cn" password="" roles="members"/>

    </tomcat-users>

    Remember, only put "clientbrowser" in the username field won‘t work!!

     


    The connector configuration for this example is,

    <Connector port="8443" maxHttpHeaderSize="8192"

    maxThreads="150" minSpareThreads="25" maxSpareThreads="75"

    enableLookups="false" disableUploadTimeout="true"

    acceptCount="100" scheme="https" secure="true"

    clientAuth="true" sslProtocol="TLS"

    keystoreFile="/root/tomcat.keystore.jks" keystorePass="changeit"

    debug="9"

    />

     


     

    One question:

    If the client owns more than one certificates how the UA sends the server the proper certificate ?

    A quick guessing is the UA may send all certificates that the client owns to the server to let the server choose one among them.

     

     

     

      本站是提供個(gè)人知識(shí)管理的網(wǎng)絡(luò)存儲(chǔ)空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點(diǎn)。請(qǐng)注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購(gòu)買(mǎi)等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊一鍵舉報(bào)。
      轉(zhuǎn)藏 分享 獻(xiàn)花(0

      0條評(píng)論

      發(fā)表

      請(qǐng)遵守用戶 評(píng)論公約

      類似文章 更多

      主站蜘蛛池模板: 国产精品久久久久AV福利动漫| 在线 国产 欧美 专区| 国产初高中生在线视频| 无码国产精品一区二区免费模式 | 国产成人欧美日韩在线电影| 亚洲AV无码乱码国产麻豆| 国产高清在线男人的天堂| 亚洲AV永久无码精品秋霞电影影院| av色国产色拍| 午夜大片爽爽爽免费影院| 四虎亚洲精品无码| 国产成人久久综合一区| 天堂中文8资源在线8| 丰满爆乳在线播放| 亚洲av无码精品蜜桃| 做暖暖视频在线看片免费 | 国产成人AV在线免播放观看新| 亚洲中文久久久精品无码| 人妻精品动漫H无码中字| 国产喷水1区2区3区咪咪爱AV| 国产情侣激情在线对白| 日日噜噜夜夜狠狠视频| 国产亚洲精品AA片在线播放天 | 精品国产一区二区三区麻豆| 男女激情一区二区三区| 国产成人AV三级在线观看按摩| 少妇办公室好紧好爽再浪一点| 88国产精品视频一区二区三区| 菠萝菠萝蜜午夜视频在线播放观看| 亚洲av无码成人精品区一区| 老色鬼永久精品网站| 国产精品美女久久久久久麻豆 | 无码人妻久久一区二区三区免费丨| 人妻一区二区三区三区| 亚洲AV中文无码乱人伦在线咪咕| 国产美女MM131爽爽爽| 亚洲综合精品第一页| 精品人妻伦九区久久AAA片| 无码人妻丰满熟妇啪啪网不卡| 无遮无挡爽爽免费视频| 人妻无码久久一区二区三区免费|