@Test public void testValidPropertiesProvided() { final String pattern = "^cn=(.*?),dc=(.*?),dc=(.*?)$"; final String value = "$1@$2.$3"; Properties properties = new Properties(); properties.setProperty("nifi.security.identity.mapping.pattern.dn", pattern); properties.setProperty("nifi.security.identity.mapping.value.dn", value); final NiFiProperties nifiProperties = getNiFiProperties(properties); TestableNiFiAuthenticationProvider provider = new TestableNiFiAuthenticationProvider(nifiProperties); List<IdentityMapping> mappings = provider.getMappings(); assertEquals(1, mappings.size()); assertEquals("dn", mappings.get(0).getKey()); assertEquals(pattern, mappings.get(0).getPattern().pattern()); assertEquals(value, mappings.get(0).getReplacementValue()); }
public List<IdentityMapping> getMappings() { return mappings; }
NiFiAuthenticationProvider implements AuthenticationProvider { public List<IdentityMapping> getMappings() { return mappings; } }
NiFiAuthenticationProvider implements AuthenticationProvider { public List<IdentityMapping> getMappings() { return mappings; } NiFiAuthenticationProvider(final NiFiProperties properties); }
NiFiAuthenticationProvider implements AuthenticationProvider { public List<IdentityMapping> getMappings() { return mappings; } NiFiAuthenticationProvider(final NiFiProperties properties); List<IdentityMapping> getMappings(); }
NiFiAuthenticationProvider implements AuthenticationProvider { public List<IdentityMapping> getMappings() { return mappings; } NiFiAuthenticationProvider(final NiFiProperties properties); List<IdentityMapping> getMappings();  }