Java Reference
In-Depth Information
<subsystem xmlns="urn:jboss:domain:undertow:1.0">
<buffer-caches>
<buffer-cache name="default"
buffer-size="1024" buffers-per-region="1024"
max-regions="10"/>
</buffer-caches>
<server name="default-server">
<https-listener name="default"
socket-binding="https" security-realm="EJBRealm"/>
<host name="default-host" alias="localhost">
<location name="/"
handler="welcome-content"/>
<filter-ref name="server-header"/>
<filter-ref name="x-powered-by-header"/>
</host>
</server>
<servlet-container name="default"
default-buffer-cache="default"
stack-trace-on-error="local-only">
<jsp-config/>
</servlet-container>
// some more code
</subsystem>
As you can see, we referenced
EJBRealm
in the configuration, but we still need to define
it. We will do this in the next sections.
Generating the server and client certificates
Start by generating a public/private key pair for the entity whose unique name has the
common name
John Smith
, organization
PacktPub
, and two-letter country code
GB
.
keytool -genkey -v -alias wflyAlias -keyalg RSA -keysize
1024 -keystore wfly.keystore -validity 180 -keypass
mypassword -storepass mypassword -dname "cn=John
Smith,o=PacktPub,c=GB"
Next, export the server's public key into a certificate named
sslPublicKey.cer
that
uses the password
mypassword
.