hi i am trying to add a certoficate to wildfly server 32
for that perperse I’ve tried three methods to configure Let’s Encrypt with WildFly. In the first attempt, I followed the official WildFly Elytron Security documentation Doc wildfly Elytron Security
and i applyed this command
/subsystem=elytron/certificate-authority-account=myLEAccount:add(alias=example,key-store=accountsKS,contact-urls=[mailto:[email protected]])
/subsystem=elytron/certificate-authority=myCA:add(url="https://my.example.url/acme/directory", staging-url="https://my.example.staging.url/acme/directory")
/subsystem=elytron/certificate-authority-account=myCAAccount:add(certificate-authority=myCA,alias=example,key-store=accountsKS,contact-urls=[mailto:[email protected]])
/subsystem=elytron/key-store=accountsKS:obtain-certificate(alias=server,domain-names=[www.example.org],certificate-authority-account=myLEAccount,agree-to-terms-of-service=true,algorithm=RSA,key-size=2048,credential-reference={clear-text=secret})
Second and i also applyed this Security command from wildfly-security.github.io
security enable-ssl-http-server --interactive --lets-encrypt
security enable-ssl-management --interactive --lets-encrypt
In both of my attempts to configure Let’s Encrypt with WildFly, I encountered an exception.
on ./Jboss-cli.sh
{
"outcome" => "failed",
"failure-description" => "WFLYELY01088: Missing certificate authority challenge",
"rolled-back" => true
}
i think that beacause WildFly wasn’t able to respond to the ACME challenge from Let’s Encrypt like in case of sudo certbot certonly --manual --preferred-challenges dns --test-cert
Since I wasn’t able to resolve the challenge response issue with the first two methods, I attempted a third approach. This involved manually modifying the standalone.xml file and adding the following code:
<management>
...
<security-realms>
<security-realm name="MyRealm">
<server-identity certificate-keystore="key_cert_wdf.jks"
certificate-alias="KEYSTOREALIAS"
keystore-password="%*NbK5dcWv4aHWc5s*$"
key-password="%*NbK5dcWv4aHWc5s*$"/>
</security-realm>
</security-realms>
...
but the wildfly throws an error in `server.log`
42: <management>
| 43:
| 44: <security-realms>
| ^^^^ 'security-realms' isn't an allowed element here
|
| Elements allowed here are: access-control, audit-log,
| configuration-changes, identity, management-interfaces
|
| 45:
| 46: <security-realm name="MyRealm">
| 47: <server-identity certificate-keystore="key_cert_wdf.jks"
|
| The primary underlying error message was:
| > ParseError at [row,col]:[44,18]
| > Message: WFLYCTL0198: Unexpected element
| > '{urn:jboss:domain:20.0}security-realms' encountered
Thank you in advance for your help