@Override public boolean isSecurityEnabled() { return server().isSecurityEnabled(); }
@Test public void shouldNotSaySecurityEnabledIfSecurityHasNoAuthenticatorsDefined() { ServerConfig serverConfig = new ServerConfig(); assertFalse("Security should not be enabled by default", serverConfig.isSecurityEnabled()); }
@Test public void shouldSaySecurityEnabledIfPasswordFileSecurityEnabled() { ServerConfig serverConfig = server(passwordFileAuthConfig(), admins()); assertTrue("Security should be enabled when password file config present", serverConfig.isSecurityEnabled()); }