@Override public Set<String> getCallerRoles(Caller caller, Environment callEnvironment, Set<String> runAsRoles) { return delegate.getCallerRoles(caller, callEnvironment, runAsRoles); }
@Override public AuthorizationResult authorize(Caller caller, Environment callEnvironment, Action action, TargetResource target) { return delegate.authorize(caller, callEnvironment, action, target); }
@Override public AuthorizationResult authorizeJmxOperation(Caller caller, Environment callEnvironment, JmxAction action, JmxTarget target) { return delegate.authorizeJmxOperation(caller, callEnvironment, action, target); }
@Override public AuthorizerDescription getDescription() { return delegate.getDescription(); }
@Override public AuthorizerDescription getDescription() { return delegate.getDescription(); }
@Override public AuthorizationResult authorize(Caller caller, Environment callEnvironment, Action action, TargetAttribute target) { return delegate.authorize(caller, callEnvironment, action, target); }
@Override public Set<String> getCallerRoles(Caller caller, Environment callEnvironment, Set<String> runAsRoles) { return delegate.getCallerRoles(caller, callEnvironment, runAsRoles); }
@Override public AuthorizerDescription getDescription() { return delegate.getDescription(); }
@Override public AuthorizationResult authorizeJmxOperation(Caller caller, Environment callEnvironment, JmxAction action, JmxTarget target) { return delegate.authorizeJmxOperation(caller, callEnvironment, action, target); }
@Override public AuthorizationResult authorize(Caller caller, Environment callEnvironment, Action action, TargetResource target) { return delegate.authorize(caller, callEnvironment, action, target); }
@Override public Set<String> getCallerRoles(Caller caller, Environment callEnvironment, Set<String> runAsRoles) { return delegate.getCallerRoles(caller, callEnvironment, runAsRoles); }
public void setDelegate(Authorizer delegate) { assert delegate != null : "null delegate"; Authorizer currentDelegate = this.delegate; if (delegate instanceof CustomAuthorizer) { AuthorizerDescription description = ((CustomAuthorizer) delegate).setAuthorizerConfiguration(writableAuthorizerConfiguration); writableAuthorizerConfiguration.setAuthorizerDescription(description); } else { writableAuthorizerConfiguration.setAuthorizerDescription(delegate.getDescription()); } this.delegate = delegate; if (currentDelegate instanceof CustomAuthorizer) { ((CustomAuthorizer) currentDelegate).shutdown(); } else if (currentDelegate instanceof StandardRBACAuthorizer) { ((StandardRBACAuthorizer) currentDelegate).shutdown(); } }
public AuthorizationResult authorizeJmxOperation(Caller caller, Environment callEnvironment, JmxAction action) { return delegate.authorizeJmxOperation(caller, callEnvironment, action); }
@Override public AuthorizationResult authorize(Caller caller, Environment callEnvironment, Action action, TargetResource target) { return delegate.authorize(caller, callEnvironment, action, target); }
private boolean isCallerInRole(String roleName, Caller caller, Environment callEnvironment, Set<String> operationHeaderRoles) { Set<String> mappedRoles = authorizer.getCallerRoles(caller, callEnvironment, operationHeaderRoles); if (mappedRoles == null) { return false; } else if (mappedRoles.contains(roleName)) { return true; } else { for (String role : mappedRoles) { if (role.equalsIgnoreCase(roleName)) { return true; } } } return false; }
public void setDelegate(Authorizer delegate) { assert delegate != null : "null delegate"; Authorizer currentDelegate = this.delegate; if (delegate instanceof CustomAuthorizer) { AuthorizerDescription description = ((CustomAuthorizer) delegate).setAuthorizerConfiguration(writableAuthorizerConfiguration); writableAuthorizerConfiguration.setAuthorizerDescription(description); } else { writableAuthorizerConfiguration.setAuthorizerDescription(delegate.getDescription()); } this.delegate = delegate; if (currentDelegate instanceof CustomAuthorizer) { ((CustomAuthorizer) currentDelegate).shutdown(); } else if (currentDelegate instanceof StandardRBACAuthorizer) { ((StandardRBACAuthorizer) currentDelegate).shutdown(); } }
@Override public AuthorizationResult authorize(Caller caller, Environment callEnvironment, Action action, TargetAttribute target) { return delegate.authorize(caller, callEnvironment, action, target); }
private boolean isCallerInRole(String roleName, Caller caller, Environment callEnvironment, Set<String> operationHeaderRoles) { Set<String> mappedRoles = authorizer.getCallerRoles(caller, callEnvironment, operationHeaderRoles); if (mappedRoles == null) { return false; } else if (mappedRoles.contains(roleName)) { return true; } else { for (String role : mappedRoles) { if (role.equalsIgnoreCase(roleName)) { return true; } } } return false; }
public void setDelegate(Authorizer delegate) { assert delegate != null : "null delegate"; Authorizer currentDelegate = this.delegate; if (delegate instanceof CustomAuthorizer) { AuthorizerDescription description = ((CustomAuthorizer) delegate).setAuthorizerConfiguration(writableAuthorizerConfiguration); writableAuthorizerConfiguration.setAuthorizerDescription(description); } else { writableAuthorizerConfiguration.setAuthorizerDescription(delegate.getDescription()); } this.delegate = delegate; if (currentDelegate instanceof CustomAuthorizer) { ((CustomAuthorizer) currentDelegate).shutdown(); } else if (currentDelegate instanceof StandardRBACAuthorizer) { ((StandardRBACAuthorizer) currentDelegate).shutdown(); } }
@Override public AuthorizationResult authorize(Caller caller, Environment callEnvironment, Action action, TargetAttribute target) { return delegate.authorize(caller, callEnvironment, action, target); }