Package org.exist.security.xacml

Examples of org.exist.security.xacml.ExistPDP


            realm.start(broker);
        }
      
        enableXACML = (Boolean)broker.getConfiguration().getProperty("xacml.enable");
        if(enableXACML != null && enableXACML.booleanValue()) {
            pdp = new ExistPDP(pool);
            LOG.debug("XACML enabled");
        }
    }
View Full Code Here


        final XQueryContext context = expression.getContext();
     
        //check access to the query
        final XACMLSource source = expression.getSource();
        try {
            final ExistPDP pdp = context.getPDP();
            if(pdp != null) {
                final RequestCtx request = pdp.getRequestHelper().createQueryRequest(context, source);
                pdp.evaluate(request);
            }
        } catch(final PermissionDeniedException pde) {
            throw new XPathException("Permission to execute query: " + source.createId() + " denied.", pde);
        }
   
View Full Code Here

                {context.getProfiler().message(this, Profiler.START_SEQUENCES, "CONTEXT ITEM", contextItem.toSequence());}
        }

    //check access to the method
    try {
      final ExistPDP pdp = context.getPDP();
      if(pdp != null) {
        final RequestCtx request = pdp.getRequestHelper().createReflectionRequest(context, null, myClass.getName(), name);
        pdp.evaluate(request);
      }
    } catch (final PermissionDeniedException pde) {
      throw new XPathException(this, "Access to method '" + name + "' in class '" + myClass.getName() + "' denied.", pde);
    }
       
View Full Code Here

            }
        }

        //check access to the method
        try {
            final ExistPDP pdp = context.getPDP();
            if(pdp != null) {
                final RequestCtx request = pdp.getRequestHelper().createFunctionRequest(context, null, getName());
                //if request is null, this function belongs to a main module and is allowed to be called
                //otherwise, the access must be checked
                if(request != null) {
                    pdp.evaluate(request);
                }
            }
        } catch(final PermissionDeniedException pde) {
            final XPathException xe = new XPathException(this, "Access to function '" + getName() + "'  denied.", pde);
            xe.addFunctionCall(functionDef, this);
View Full Code Here

  {
        context.proceed(this);
    final QName functionName = function.getName();
    //check access to the method
    try {
      final ExistPDP pdp = getContext().getPDP();
      if(pdp != null) {
        final RequestCtx request = pdp.getRequestHelper().createFunctionRequest(context, null, functionName);
        if(request != null)
          {pdp.evaluate(request);}
      }
    } catch (final PermissionDeniedException pde) {
      throw new XPathException(function, "Access to function '" + functionName + "'  denied.", pde);
    }
        final long start = System.currentTimeMillis();
View Full Code Here

TOP

Related Classes of org.exist.security.xacml.ExistPDP

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.