Package com.sun.xacml.ctx

Examples of com.sun.xacml.ctx.RequestCtx


        for (GrantedAuthority role : auth.getAuthorities()) {
            XACMLRole xacmlRole = (XACMLRole) role;
            if (xacmlRole.isEnabled() == false)
                continue;
            RequestCtx requestCtx = GeoXACMLConfig.getRequestCtxBuilderFactory()
                    .getResourceInfoRequestCtxBuilder(xacmlRole, resourceInfo, mode)
                    .createRequestCtx();
            // XACMLUtil.getXACMLLogger().info(XACMLUtil.asXMLString(requestCtx));
            resultList.add(requestCtx);
        }
View Full Code Here


    private List<RequestCtx> createRequestCtxList() {
        List<RequestCtx> result = new ArrayList<RequestCtx>();
        for (WorkspaceInfo wsInfo : getCatalog().getWorkspaces()) {
            for (GrantedAuthority role : SecurityContextHolder.getContext().getAuthentication()
                    .getAuthorities()) {
                RequestCtx rctx = GeoXACMLConfig.getRequestCtxBuilderFactory()
                        .getWorkspaceRequestCtxBuilder((XACMLRole) role, wsInfo, AccessMode.READ)
                        .createRequestCtx();
                result.add(rctx);
            }
        }
View Full Code Here

        Set<Attribute> actions = new HashSet<Attribute>(1);
        addAction(actions);

        Set<Attribute> environment = new HashSet<Attribute>(1);

        RequestCtx ctx = new RequestCtx(subjects, resources, actions, environment);
        return ctx;
    }
View Full Code Here

        if (userName != null) {
            environment.add(new Attribute(XACMLConstants.UserEnvironmentURI,null,null,new StringAttribute(userName)));           
        }

       
        RequestCtx ctx = new RequestCtx(subjects, resources, actions, environment);
        return ctx;

    }
View Full Code Here

        Set<Attribute> actions = new HashSet<Attribute>(1);
        addAction(actions);

        Set<Attribute> environment = new HashSet<Attribute>(1);

        RequestCtx ctx = new RequestCtx(subjects, resources, actions, environment);
        return ctx;

    }
View Full Code Here

        Set<Attribute> actions = new HashSet<Attribute>(1);
        addAction(actions);

        Set<Attribute> environment = new HashSet<Attribute>(1);

        RequestCtx ctx = new RequestCtx(subjects, resources, actions, environment);
        return ctx;
    }
View Full Code Here

            throw new RuntimeException(ex); // should not happen
        }
       
       

        RequestCtx ctx = new RequestCtx(subjects, resources, actions, environment);
        return ctx;

    }
View Full Code Here

     * @return Response
     * @throws com.sun.xacml.ParsingException
     * @throws java.io.IOException
     */
    public ResponseCtx evaluate(Element xamlRequest) throws IOException, ParsingException {
        RequestCtx request = RequestCtx.getInstance(xamlRequest);
        ResponseCtx response = null;

        if ((response = getFromCache(request)) != null) {
            return response;
        }
View Full Code Here

            EntitlementEngine entitlementEngine = EntitlementEngine
                    .getInstance(getGovernanceUserRegistry(), CarbonContext.getCurrentContext().getTenantId());
            policyRequestBuilder = new PolicyRequestBuilder();
            policyResponseBuilder = new PolicyResponseBuilder();
            xacmlReq = policyRequestBuilder.getXacmlRequest(request);
            RequestCtx req = RequestCtx.getInstance(xacmlReq);
            List<PIPExtension> extensions = EntitlementServiceComponent.getPipConfig()
                    .getExtensions();
            for (Iterator iterator = extensions.iterator(); iterator.hasNext();) {
                PIPExtension pipExtension = (PIPExtension) iterator.next();
                pipExtension.update(req);
View Full Code Here

            actions.add(getAttribute("urn:oasis:names:tc:xacml:1.0:action:action-id",
                    "http://www.w3.org/2001/XMLSchema#string", action));

            ByteArrayOutputStream requestOut = new ByteArrayOutputStream();

            RequestCtx request = new RequestCtx(subjects, resources, actions, environment);
            request.encode(requestOut);
            return getDecision(requestOut.toString());

        } catch (Exception e) {
            log.error("Error occured while eveluating XACML request", e);
            throw new Exception("Error occured while eveluating XACML request");
View Full Code Here

TOP

Related Classes of com.sun.xacml.ctx.RequestCtx

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.