/** * Creates PicketBox security domain * @throws Exception */ private void configurePicketBox() throws Exception { // Create security domain AddSecurityDomain addSecurityDomain = new AddSecurityDomain.Builder(securityDomainName).build(); managementClient.apply(addSecurityDomain); // Create login module AddLoginModule addLoginModule = new AddLoginModule.Builder("org.jboss.security.auth.spi.UsersRolesLoginModule", PICKETBOX_LOGIN_MODULE_NAME) .securityDomainName(securityDomainName) .flag("required") .module("org.picketbox") .addModuleOption("usersProperties", USERS_FILE.getAbsolutePath()) .addModuleOption("rolesProperties", ROLES_FILE.getAbsolutePath()) .build(); managementClient.apply(addLoginModule); administration.reloadIfRequired(); assertTrue("The login module should be created", ops.exists(PICKETBOX_LOGIN_MODULE_ADDRESS)); }
@Override public void apply(OnlineCommand... commands) throws CommandFailedException { try { delegate.apply(commands); } catch (RuntimeCommandFailedException e) { throw e.original; } }
@Override public void apply(Iterable<OnlineCommand> commands) throws CommandFailedException { try { delegate.apply(commands); } catch (RuntimeCommandFailedException e) { throw e.original; } }
@Override public void apply(Iterable<OnlineCommand> commands) throws CommandFailedException { try { ensureInitialized(); } catch (IOException e) { throw new CommandFailedException("Failed to create underlying OnlineManagementClient", e); } delegate.apply(commands); }
@Override public void apply(OnlineCommand... commands) throws CommandFailedException { try { ensureInitialized(); } catch (IOException e) { throw new CommandFailedException("Failed to create underlying OnlineManagementClient", e); } delegate.apply(commands); }