WSO2 IS: Change HTTPS certificate

别说谁变了你拦得住时间么 提交于 2019-12-04 13:30:35

Step 1: Create a new keystore with private and public key (key-pair). Inside /repository/resources/security/ directory. The default keystore (wso2carbon.jks) and truststore (client-truststore.jks) will be stored here.

• Create a keystore containing a key-pair using java key tool (contained in the standard jdk) and save it as a jks file. The keystore contains THIS server’s key-pair (public & private keys).

• The Keystore/Key-Pair should have the following properties/attributes :

KeystoreType = JKS,
KeyPairAlgorithm = RSA,
Size = 2048 bits
SignatureAlgorithm = SHA-256 WITH RSA
Password    (Must be exactly the same as the keystore password)
Name(Subject):  The CN(Common Name) of the key-pair should be the server’s hostname upon which the IS will be deployed (if you intend to use it as the key manager for api manager)
Extensions:
Key usage : Digital Signature , Key Encipherment , Data Encipherment , on Repudian
Subject Alternate name : IP address = IP address of this server

Step 2: Import the certificate chain from the keystore created in Step 1 into a truststore.

Create new trust store with same attributes

• Export the certificate from the Keystore (step 1) into the truststore

Step 3: Change the configuration files as follows, reflecting the new keystore and truststore that have just been created.

Change the appropriate values in the following files (in /repository/conf/):

File                            Line number/s
identity.xml                    180
carbon.xml                      310
                                326
                                343
axis2/axis2_pt.xml              272
                                280
                                396
                                404
axis2/axis2.xml                 272
                                280
                                396
                                404
axis2/axis2_nhttp.xml           278
                                286
                                405
                                413
security/secret-conf.properties 21
                                30
sec.policy                      1

More or less , just search the files for "jks"

Delete the old keystores

Step4: Restart

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!