Package com.dtolabs.rundeck.core.authorization

Examples of com.dtolabs.rundeck.core.authorization.Decision


     * Return the evaluation decision for the resource, subject, action, environment and contexts
     */
    private Decision evaluate(Map<String, String> resource, Subject subject,
                             String action, Set<Attribute> environment, List<AclContext>contexts) {

        Decision decision = internalEvaluate(resource, subject, action, environment, contexts);
        StringBuilder sb = new StringBuilder();
        sb.append("Evaluating ").append(decision).append(" (").append(decision.evaluationDuration()).append("ms)");
        logger.info(sb.toString());

        return decision;
    }
View Full Code Here


        Set<Decision> decisions = new HashSet<Decision>();
        long duration=0;
        List<AclContext> aclContexts = policies.narrowContext(subject, environment);
        for(Map<String, String> resource: resources) {
            for(String action: actions) {
                final Decision decision = evaluate(resource, subject, action, environment, aclContexts);
                duration += decision.evaluationDuration();
                decisions.add(decision);
            }
        }
        return decisions;
    }
View Full Code Here

   
    private static Decision createAuthorize(final boolean authorized, final Explanation explanation,
            final Map<String, String> resource, final Subject subject,
            final String action, final Set<Attribute> environment, final long evaluationTime) {
       
        return new Decision(){
            private String representation;
            public boolean isAuthorized() { return authorized; }
            public Map<String, String> getResource() { return resource;  }
            public String getAction() { return action; }
            public Set<Attribute> getEnvironment() { return environment; }
View Full Code Here

TOP

Related Classes of com.dtolabs.rundeck.core.authorization.Decision

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.