<dependency>
<groupId>org.wildfly.swarm</groupId>
<artifactId>management</artifactId>
</dependency>
Management
The management fraction supports enabling the WildFly management interface and specifying security realms.
Configuration
To use the management fraction in your application, you need to add the following dependency:
By default, the HTTP-upgrade-based management interface is exposed. You will probably desire to provide a security-realm at least for the ManagementRealm
to secure the management interface.
You may use the InMemoryAuthentication
and InMemoryAuthorization
plugins for simple compile-time definition of security-realms. Each of these can be specified programattically or through user-defined loading of .properties
files similar to the default mgmt-users.properties
and mgmt-groups.properties
that WildFly normally uses.
ManagementFraction.createDefaultFraction()
.httpInterfaceManagementInterface((iface) -> {
iface.securityRealm("ManagementRealm");
})
.securityRealm("ManagementRealm", (realm) -> {
realm.inMemoryAuthentication( (authn)->{
authn.add( "bob", "tacos!", true );
});
realm.inMemoryAuthorization( (authz)->{
authz.add( "bob", "admin" );
});
})
If you wish to perform more advanced configuration, please see the JavaDocs for the Management API.
Properties
The following properties control options for the management interface:
Name | Description | Default |
---|---|---|
swarm.management.http.port |
The HTTP port management will listen on |
9990 |
swarm.management.https.port |
The HTTPS port management will listen on |
9993 |