How to use digest authentication in Tomcat 8.5?

前端 未结 4 383
[愿得一人]
[愿得一人] 2020-12-17 00:48

I am trying to use the manager application that comes with Tomcat 8.5. However, every time that I try to log on with the password of \"test\" for the user \"admin\", it does

4条回答
  •  清酒与你
    2020-12-17 01:18

    **** Password digest process has been change to tomcat 8.5 version; it has been modified then how it was in tomcat earlier versions

    Here is the tomcat password digest process for Tomcat 8.5.x ( we are using algorithm SHA-256 and SHA-512)

    1. Change in $CATALINA_BASE/conf/server.xml file:
        a. From 
             
                    
                    
                 
        b. To
             
                    
                    
                                    
                    
                 
    2. Create digest password:
        a. Go to location $CATALINA_BASE/bin/ and run digest.sh
            i. For sha-256: 
            [root@aa22 bin]# ./digest.sh -a sha-256 -h org.apache.catalina.realm.MessageDigestCredentialHandler xxxxxxxx
            xxxxxxxx:5327b745a19144e34ca40128219ab660b09ff9cf866222c1850a5e7a716db669$1$b4b734709246d25373a730cad709151db47920f79e1a1d65f6772d1307216f1b
    
            ii. For sha-512:
            [root@aa12 bin]# ./digest.sh -a sha-512 -h org.apache.catalina.realm.MessageDigestCredentialHandler xxxxxxxx
            xxxxxxxx:d92d95ae2fab83ca1eafae3b900ae9ab2115eac644935fb35a5973c3032dbcc7$1$c1f8e55b0beb771198ab46a69e1559ae145f172226d6f11ee91d67fde361717ca7498f48e486e4267e810b64e0a9096b16311ddc85b746c0019088462975bc9f
    
    3. Now copy digested password to $CATALINA_BASE/conf/tomcat-users.xml
        a. Replace the plain text password with this digested password and restart tomcat. Make sure; you are using same algo name in server.xml; by which you digested the plain test password.
    4. End
    

提交回复
热议问题