Red Hat Training

A Red Hat training course is available for Red Hat JBoss Enterprise Application Platform

9.2.4.6. Add a New Security Realm

  1. Run the Management CLI.

    Start the jboss-cli.sh or jboss-cli.bat command and connect to the server.
  2. Create the new security realm itself.

    Run the following command to create a new security realm named MyDomainRealm on a domain controller or a standalone server.
    For a domain instance, use this command:
    /host=master/core-service=management/security-realm=MyDomainRealm:add()
    For a standalone instance, use this command:
    /core-service=management/security-realm=MyDomainRealm:add()
  3. Create the references to the properties file which will store information about the new role.

    Run the following command to create a pointer a file named myfile.properties, which will contain the properties pertaining to the new role.

    Note

    The newly created properties file is not managed by the included add-user.sh and add-user.bat scripts. It must be managed externally.
    For a domain instance, use this command:
    /host=master/core-service=management/security-realm=MyDomainRealm/authentication=properties:add(path=myfile.properties)
    For a standalone instance, use this command:
    /core-service=management/security-realm=MyDomainRealm/authentication=properties:add(path=myfile.properties)
Result

Your new security realm is created. When you add users and roles to this new realm, the information will be stored in a separate file from the default security realms. You can manage this new file using your own applications or procedures.