@Test public void testMapIdentityWithIncorrectGroupReference() { final Properties properties = new Properties(); properties.setProperty("nifi.security.identity.mapping.pattern.dn", "^cn=(.*?),dc=(.*?),dc=(.*?)$"); properties.setProperty("nifi.security.identity.mapping.value.dn", "$1@$2.$4"); final NiFiProperties nifiProperties = getNiFiProperties(properties); final TestableNiFiAuthenticationProvider provider = new TestableNiFiAuthenticationProvider(nifiProperties); final String identity = "cn=jsmith,dc=aaa,dc=bbb"; final String mappedIdentity = provider.mapIdentity(identity); assertEquals("jsmith@aaa.$4", mappedIdentity); }
protected String mapIdentity(final String identity) { return IdentityMappingUtil.mapIdentity(identity, mappings); }
NiFiAuthenticationProvider implements AuthenticationProvider { protected String mapIdentity(final String identity) { return IdentityMappingUtil.mapIdentity(identity, mappings); } }
NiFiAuthenticationProvider implements AuthenticationProvider { protected String mapIdentity(final String identity) { return IdentityMappingUtil.mapIdentity(identity, mappings); } NiFiAuthenticationProvider(final NiFiProperties properties); }
NiFiAuthenticationProvider implements AuthenticationProvider { protected String mapIdentity(final String identity) { return IdentityMappingUtil.mapIdentity(identity, mappings); } NiFiAuthenticationProvider(final NiFiProperties properties); List<IdentityMapping> getMappings(); }
NiFiAuthenticationProvider implements AuthenticationProvider { protected String mapIdentity(final String identity) { return IdentityMappingUtil.mapIdentity(identity, mappings); } NiFiAuthenticationProvider(final NiFiProperties properties); List<IdentityMapping> getMappings();  }