private ModelControllerClient createClient( String userName, boolean allowLocalAuth, JBossAsManagedConfiguration clientConfig) throws UnknownHostException { return ModelControllerClient.Factory.create( clientConfig.getHostControllerManagementProtocol(), clientConfig.getHostControllerManagementAddress(), clientConfig.getHostControllerManagementPort(), new RbacAdminCallbackHandler(userName), allowLocalAuth ? Collections.<String, String>emptyMap() : SASL_OPTIONS); }