Add a new certificate to wildfly server

Add a realm for the new certificate:
/core-service=management/security-realm={NEW_REALM_NAME}:add()

Set path to keystore:
/core-service=management/security-realm={NEW_REALM_NAME}/server-identity=ssl:write-attribute(name=keystore-relative-to,value=jboss.server.config.dir)

Set keytore:
/core-service=management/server-identity=ssl:add(keystore-password={KEY_STORE_PASSWORD}, keystore-path={KEY_STORE_FILE_NAME.jks})

Add realm to the https listener:
/subsystem=undertow/server=default-server/https-listener=https:write-attribute(name=security-realm,value={NEW_REALM_NAME})

Leave a Reply