private String extractXACMLRequest(String decisionQuery) throws Exception { RequestType xacmlRequest = null; doBootstrap(); String queryString = null; XACMLAuthzDecisionQueryType xacmlAuthzDecisionQuery; try { xacmlAuthzDecisionQuery = (XACMLAuthzDecisionQueryType) unmarshall(decisionQuery); //Access the XACML request only if Issuer and the Signature are valid. if (validateIssuer(xacmlAuthzDecisionQuery.getIssuer())) { if (validateSignature(xacmlAuthzDecisionQuery.getSignature())) { xacmlRequest = xacmlAuthzDecisionQuery.getRequest(); } else { log.debug("The submitted signature is not valid!"); } } else { log.debug("The submitted issuer is not valid!"); } if (xacmlRequest != null) { queryString = marshall(xacmlRequest); queryString = queryString.replace("<?xml version=\"1.0\" encoding=\"UTF-8\"?>", "").replace("\n", ""); } return queryString; } catch (Exception e) { log.error("Error unmarshalling the XACMLAuthzDecisionQuery.", e); throw new Exception("Error unmarshalling the XACMLAuthzDecisionQuery.", e); } }
super.parseRequiredAttributes(startElement); XACMLAuthzDecisionQueryType xacmlQuery = new XACMLAuthzDecisionQueryType(id, issueInstant); super.parseBaseAttributes(startElement, xacmlQuery); xacmlQuery.setInputContextOnly(Boolean.parseBoolean(inputContextOnly)); xacmlQuery.setReturnContext(Boolean.parseBoolean(returnContext)); .getNodeAsStream(xacmlRequest)); RequestType req = jaxbRequestType.getValue(); xacmlQuery.setRequest(req); } catch (Exception e) { throw logger.parserException(e);
StaxUtil.writeAttribute(writer, JBossSAMLConstants.ID.get(), xacmlQuery.getID()); StaxUtil.writeAttribute(writer, JBossSAMLConstants.VERSION.get(), xacmlQuery.getVersion()); StaxUtil.writeAttribute(writer, JBossSAMLConstants.ISSUE_INSTANT.get(), xacmlQuery.getIssueInstant().toString()); "xacml-samlp:XACMLAuthzDecisionQueryType"); URI destination = xacmlQuery.getDestination(); if (destination != null) StaxUtil.writeAttribute(writer, JBossSAMLConstants.DESTINATION.get(), destination.toASCIIString()); String consent = xacmlQuery.getConsent(); if (StringUtil.isNotNull(consent)) StaxUtil.writeAttribute(writer, JBossSAMLConstants.CONSENT.get(), consent); NameIDType issuer = xacmlQuery.getIssuer(); if (issuer != null) { write(issuer, new QName(ASSERTION_NSURI.get(), JBossSAMLConstants.ISSUER.get(), ASSERTION_PREFIX)); RequestType xacmlRequest = xacmlQuery.getRequest();
XACMLAuthzDecisionQueryType queryType = new XACMLAuthzDecisionQueryType(id, XMLTimeUtil.getIssueInstant()); queryType.setRequest(xacmlRequest); queryType.setIssuer(nameIDType);
public synchronized static org.picketlink.identity.federation.saml.v2.protocol.ResponseType handleXACMLQuery( PolicyDecisionPoint pdp, String issuer, XACMLAuthzDecisionQueryType xacmlRequest) throws ProcessingException, ConfigurationException { RequestType requestType = xacmlRequest.getRequest();
StaxUtil.writeAttribute(writer, JBossSAMLConstants.ID.get(), xacmlQuery.getID()); StaxUtil.writeAttribute(writer, JBossSAMLConstants.VERSION.get(), xacmlQuery.getVersion()); StaxUtil.writeAttribute(writer, JBossSAMLConstants.ISSUE_INSTANT.get(), xacmlQuery.getIssueInstant().toString()); "xacml-samlp:XACMLAuthzDecisionQueryType"); URI destination = xacmlQuery.getDestination(); if (destination != null) StaxUtil.writeAttribute(writer, JBossSAMLConstants.DESTINATION.get(), destination.toASCIIString()); String consent = xacmlQuery.getConsent(); if (StringUtil.isNotNull(consent)) StaxUtil.writeAttribute(writer, JBossSAMLConstants.CONSENT.get(), consent); NameIDType issuer = xacmlQuery.getIssuer(); if (issuer != null) { write(issuer, new QName(ASSERTION_NSURI.get(), JBossSAMLConstants.ISSUER.get(), ASSERTION_PREFIX)); RequestType xacmlRequest = xacmlQuery.getRequest();
String id = IDGenerator.create("ID_"); XACMLAuthzDecisionQueryType queryType = new XACMLAuthzDecisionQueryType(id, XMLTimeUtil.getIssueInstant()); queryType.setRequest(xacmlRequest); queryType.setIssuer(nameIDType);
public static synchronized org.picketlink.identity.federation.saml.v2.protocol.ResponseType handleXACMLQuery( PolicyDecisionPoint pdp, String issuer, XACMLAuthzDecisionQueryType xacmlRequest) throws ProcessingException, ConfigurationException { RequestType requestType = xacmlRequest.getRequest();
StaxUtil.writeAttribute(writer, JBossSAMLConstants.ID.get(), xacmlQuery.getID()); StaxUtil.writeAttribute(writer, JBossSAMLConstants.VERSION.get(), xacmlQuery.getVersion()); StaxUtil.writeAttribute(writer, JBossSAMLConstants.ISSUE_INSTANT.get(), xacmlQuery.getIssueInstant().toString()); "xacml-samlp:XACMLAuthzDecisionQueryType"); URI destination = xacmlQuery.getDestination(); if (destination != null) StaxUtil.writeAttribute(writer, JBossSAMLConstants.DESTINATION.get(), destination.toASCIIString()); String consent = xacmlQuery.getConsent(); if (StringUtil.isNotNull(consent)) StaxUtil.writeAttribute(writer, JBossSAMLConstants.CONSENT.get(), consent); NameIDType issuer = xacmlQuery.getIssuer(); if (issuer != null) { write(issuer, new QName(ASSERTION_NSURI.get(), JBossSAMLConstants.ISSUER.get(), ASSERTION_PREFIX)); RequestType xacmlRequest = xacmlQuery.getRequest();
super.parseRequiredAttributes(startElement); XACMLAuthzDecisionQueryType xacmlQuery = new XACMLAuthzDecisionQueryType(id, issueInstant); super.parseBaseAttributes(startElement, xacmlQuery); xacmlQuery.setInputContextOnly(Boolean.parseBoolean(inputContextOnly)); xacmlQuery.setReturnContext(Boolean.parseBoolean(returnContext)); .getNodeAsStream(xacmlRequest)); RequestType req = jaxbRequestType.getValue(); xacmlQuery.setRequest(req); } catch (Exception e) { throw logger.parserException(e);
String id = IDGenerator.create("ID_"); XACMLAuthzDecisionQueryType queryType = new XACMLAuthzDecisionQueryType(id, XMLTimeUtil.getIssueInstant()); queryType.setRequest(xacmlRequest); queryType.setIssuer(nameIDType);
public static synchronized org.picketlink.identity.federation.saml.v2.protocol.ResponseType handleXACMLQuery( PolicyDecisionPoint pdp, String issuer, XACMLAuthzDecisionQueryType xacmlRequest) throws ProcessingException, ConfigurationException { RequestType requestType = xacmlRequest.getRequest();
StaxUtil.writeAttribute(writer, JBossSAMLConstants.ID.get(), xacmlQuery.getID()); StaxUtil.writeAttribute(writer, JBossSAMLConstants.VERSION.get(), xacmlQuery.getVersion()); StaxUtil.writeAttribute(writer, JBossSAMLConstants.ISSUE_INSTANT.get(), xacmlQuery.getIssueInstant().toString()); "xacml-samlp:XACMLAuthzDecisionQueryType"); URI destination = xacmlQuery.getDestination(); if (destination != null) StaxUtil.writeAttribute(writer, JBossSAMLConstants.DESTINATION.get(), destination.toASCIIString()); String consent = xacmlQuery.getConsent(); if (StringUtil.isNotNull(consent)) StaxUtil.writeAttribute(writer, JBossSAMLConstants.CONSENT.get(), consent); NameIDType issuer = xacmlQuery.getIssuer(); if (issuer != null) RequestType xacmlRequest = xacmlQuery.getRequest();
super.parseRequiredAttributes(startElement); XACMLAuthzDecisionQueryType xacmlQuery = new XACMLAuthzDecisionQueryType(id, issueInstant); super.parseBaseAttributes(startElement, xacmlQuery); xacmlQuery.setInputContextOnly(Boolean.parseBoolean(inputContextOnly)); xacmlQuery.setReturnContext(Boolean.parseBoolean(returnContext)); .getNodeAsStream(xacmlRequest)); RequestType req = jaxbRequestType.getValue(); xacmlQuery.setRequest(req); } catch (Exception e) { throw logger.parserException(e);
String id = IDGenerator.create("ID_"); XACMLAuthzDecisionQueryType queryType = new XACMLAuthzDecisionQueryType(id, XMLTimeUtil.getIssueInstant()); queryType.setRequest(xacmlRequest); queryType.setIssuer(nameIDType);
ConfigurationException RequestType requestType = xacmlRequest.getRequest();
StaxUtil.writeAttribute(writer, JBossSAMLConstants.ID.get(), xacmlQuery.getID()); StaxUtil.writeAttribute(writer, JBossSAMLConstants.VERSION.get(), xacmlQuery.getVersion()); StaxUtil.writeAttribute(writer, JBossSAMLConstants.ISSUE_INSTANT.get(), xacmlQuery.getIssueInstant().toString()); "xacml-samlp:XACMLAuthzDecisionQueryType"); URI destination = xacmlQuery.getDestination(); if (destination != null) StaxUtil.writeAttribute(writer, JBossSAMLConstants.DESTINATION.get(), destination.toASCIIString()); String consent = xacmlQuery.getConsent(); if (StringUtil.isNotNull(consent)) StaxUtil.writeAttribute(writer, JBossSAMLConstants.CONSENT.get(), consent); NameIDType issuer = xacmlQuery.getIssuer(); if (issuer != null) RequestType xacmlRequest = xacmlQuery.getRequest();
XACMLAuthzDecisionQueryType xacmlQuery = new XACMLAuthzDecisionQueryType(id, issueInstant); super.parseBaseAttributes(startElement, xacmlQuery); if (inputContextOnly != null) xacmlQuery.setInputContextOnly(Boolean.parseBoolean(inputContextOnly)); xacmlQuery.setReturnContext(Boolean.parseBoolean(returnContext)); .getNodeAsStream(xacmlRequest)); RequestType req = jaxbRequestType.getValue(); xacmlQuery.setRequest(req);
ConfigurationException RequestType requestType = xacmlRequest.getRequest();
XACMLAuthzDecisionQueryType xacmlQuery = new XACMLAuthzDecisionQueryType(id, issueInstant); super.parseBaseAttributes(startElement, xacmlQuery); if (inputContextOnly != null) xacmlQuery.setInputContextOnly(Boolean.parseBoolean(inputContextOnly)); xacmlQuery.setReturnContext(Boolean.parseBoolean(returnContext)); .getNodeAsStream(xacmlRequest)); RequestType req = jaxbRequestType.getValue(); xacmlQuery.setRequest(req);