@Test(expected = UninheritableAuthorizationsException.class) public void testCheckInheritNonConfigurableUserGroupProvider() throws Exception { final UserGroupProvider userGroupProvider = mock(UserGroupProvider.class); final ManagedRangerAuthorizer managedRangerAuthorizer = getStandardManagedAuthorizer(userGroupProvider); managedRangerAuthorizer.checkInheritability(NON_EMPTY_FINGERPRINT); }
@Override public void checkInheritability(String proposedFingerprint) throws AuthorizationAccessException, UninheritableAuthorizationsException { final String userGroupFingerprint = parseFingerprint(proposedFingerprint); if (StringUtils.isNotBlank(userGroupFingerprint)) { if (userGroupProvider instanceof ConfigurableUserGroupProvider) { ((ConfigurableUserGroupProvider) userGroupProvider).checkInheritability(userGroupFingerprint); } else { throw new UninheritableAuthorizationsException("User/Group fingerprint is not blank and the configured UserGroupProvider does not support fingerprinting."); } } }
ManagedRangerAuthorizer extends RangerNiFiAuthorizer implements ManagedAuthorizer { @Override public void checkInheritability(String proposedFingerprint) throws AuthorizationAccessException, UninheritableAuthorizationsException { final String userGroupFingerprint = parseFingerprint(proposedFingerprint); if (StringUtils.isNotBlank(userGroupFingerprint)) { if (userGroupProvider instanceof ConfigurableUserGroupProvider) { ((ConfigurableUserGroupProvider) userGroupProvider).checkInheritability(userGroupFingerprint); } else { throw new UninheritableAuthorizationsException("User/Group fingerprint is not blank and the configured UserGroupProvider does not support fingerprinting."); } } } }
ManagedRangerAuthorizer extends RangerNiFiAuthorizer implements ManagedAuthorizer { @Override public void checkInheritability(String proposedFingerprint) throws AuthorizationAccessException, UninheritableAuthorizationsException { final String userGroupFingerprint = parseFingerprint(proposedFingerprint); if (StringUtils.isNotBlank(userGroupFingerprint)) { if (userGroupProvider instanceof ConfigurableUserGroupProvider) { ((ConfigurableUserGroupProvider) userGroupProvider).checkInheritability(userGroupFingerprint); } else { throw new UninheritableAuthorizationsException("User/Group fingerprint is not blank and the configured UserGroupProvider does not support fingerprinting."); } } }  }
ManagedRangerAuthorizer extends RangerNiFiAuthorizer implements ManagedAuthorizer { @Override public void checkInheritability(String proposedFingerprint) throws AuthorizationAccessException, UninheritableAuthorizationsException { final String userGroupFingerprint = parseFingerprint(proposedFingerprint); if (StringUtils.isNotBlank(userGroupFingerprint)) { if (userGroupProvider instanceof ConfigurableUserGroupProvider) { ((ConfigurableUserGroupProvider) userGroupProvider).checkInheritability(userGroupFingerprint); } else { throw new UninheritableAuthorizationsException("User/Group fingerprint is not blank and the configured UserGroupProvider does not support fingerprinting."); } } }  @Override void initialize(AuthorizerInitializationContext initializationContext); @Override void onConfigured(AuthorizerConfigurationContext configurationContext); @Override AccessPolicyProvider getAccessPolicyProvider(); @Override String getFingerprint(); @Override void inheritFingerprint(String fingerprint); @Override void checkInheritability(String proposedFingerprint); }
ManagedRangerAuthorizer extends RangerNiFiAuthorizer implements ManagedAuthorizer { @Override public void checkInheritability(String proposedFingerprint) throws AuthorizationAccessException, UninheritableAuthorizationsException { final String userGroupFingerprint = parseFingerprint(proposedFingerprint); if (StringUtils.isNotBlank(userGroupFingerprint)) { if (userGroupProvider instanceof ConfigurableUserGroupProvider) { ((ConfigurableUserGroupProvider) userGroupProvider).checkInheritability(userGroupFingerprint); } else { throw new UninheritableAuthorizationsException("User/Group fingerprint is not blank and the configured UserGroupProvider does not support fingerprinting."); } } }  @Override void initialize(AuthorizerInitializationContext initializationContext); @Override void onConfigured(AuthorizerConfigurationContext configurationContext); @Override AccessPolicyProvider getAccessPolicyProvider(); @Override String getFingerprint(); @Override void inheritFingerprint(String fingerprint); @Override void checkInheritability(String proposedFingerprint);  }