4 Replies Latest reply on Dec 7, 2016 2:42 AM by Stefan Maier

    Adding a security domain with server identity in host.xml via CLI

    Stefan Maier Newbie

      Hello,

       

      I'm trying to add a security realm with a server identity to the host.xml file. The result should be as follows:

       

      <host name="SlaveNode" xmlns="urn:jboss:domain:2.2">
      
          <management>
              <security-realms>
                  <security-realm name="ManagementRealm">
                      <authentication>
                          <local default-user="$local" skip-group-loading="true"/>
                          <properties path="mgmt-users.properties" relative-to="jboss.domain.config.dir"/>
                      </authentication>
                      <authorization map-groups-to-roles="false">
                          <properties path="mgmt-groups.properties" relative-to="jboss.domain.config.dir"/>
                      </authorization>
                  </security-realm>
                  <security-realm name="ApplicationRealm">
                      <authentication>
                          <local default-user="$local" allowed-users="*" skip-group-loading="true"/>
                          <properties path="application-users.properties" relative-to="jboss.domain.config.dir"/>
                      </authentication>
                      <authorization>
                          <properties path="application-roles.properties" relative-to="jboss.domain.config.dir"/>
                      </authorization>
                  </security-realm>
                  <security-realm name="SlaveNodeRealm">
                      <server-identities>
                          <secret value="MySecretValue"/>
                      </server-identities>
                  </security-realm>
              </security-realms>
      

       

      I tried

       

      /host=SlaveNode/core-service=management/security-realm
      

       

      but there does not seem to be any add method. Could somebody show me how to do this the right way?