Skip to Content.
Sympa Menu

mace-opensaml-users - Re: Bug?

Subject: OpenSAML user discussion

List archive

Re: Bug?


Chronological Thread 
  • From: Grover Manuel Campos Ancajima <>
  • To: Scott Cantor <>
  • Cc:
  • Subject: Re: Bug?
  • Date: Fri, 25 Jun 2004 21:37:34 -0300
  • Organization: Universidade Federal de Santa Catarina

Scott Cantor escribió:
	   I'm making a system, I need send a Authorization Decision Query
with Evidence a Attribute Assertion. the servlet 'QueryWSE' send a
SAMLRequest to other servlet 'Autoridad', I got a SAMLException from
Autoridad, that exception is logic but not's logic why that exception?
    

Not all your code is there, but it looks like you're reusing the same
subject parameter and passing it into two different objects as a piece to
include. You need to clone the subject to use it twice, because I don't copy
anything for the caller. My C++ poking through, I prefer to favor efficiency
over assuming that copying is needed.

  
SAMLAssertion assertion = aut.getAttributeAssertion(user, subject);
    

Change the second parameter to subject.clone() and it should fix it.

-- Scott
  
First: thanks for your faster response, I try with your suggest, but it don't work, well work (now seems I get a Request correct) but got this exception:

java.lang.NullPointerException
        at org.apache.xerces.dom.ElementImpl.setIdAttributeNode(Unknown Source)
        at org.opensaml.SAMLAssertion.fromDOM(Unknown Source)
        at org.opensaml.SAMLAssertion.<init>(Unknown Source)
        at org.catalogo.web.QueryWSExtendido.comprobar(QueryWSExtendido.java:234)


I modified the code:

            .......
        SAMLSubject suj = (SAMLSubject)subject.clone();
        SAMLAssertion assertion = aut.getAttributeAssertion(user, suj);
        SAMLAuthorizationDecisionQuery query =
            new SAMLAuthorizationDecisionQuery();
        SAMLAction action = "new" SAMLAction();
        // setup el action
        action.setData("Read");
        action.setNamespace(SAMLAction.SAML_ACTION_NAMESPACE_RWEDC);
        // setup el query
        query.setSubject((SAMLSubject)subject.clone());
            .........
       
The AttributeStatement of the Assertion of the evidence already contains the subject. But now failed from comprobar:

    private boolean comprobar(SAMLObject asercion) throws IOException{
        try{
            ByteArrayOutputStream os = new ByteArrayOutputStream();
            asercion.toStream(os);
            ByteArrayInputStream is = new ByteArrayInputStream(os.toByteArray());
            SAMLAssertion otro = new SAMLAssertion(is);    <----- line 234
            return true;
        } catch(SAMLException se){
            Util.logger("comprobar", se.toString());
            return false;
        }
    }





  • Bug?, Grover Manuel Campos Ancajima, 06/25/2004
    • RE: Bug?, Scott Cantor, 06/25/2004
      • Re: Bug?, Grover Manuel Campos Ancajima, 06/25/2004
        • RE: Bug?, Scott Cantor, 06/25/2004
          • Re: Bug?, Grover Manuel Campos Ancajima, 06/26/2004
            • RE: Bug?, Scott Cantor, 06/26/2004
              • Re: Bug?, Grover Manuel Campos Ancajima, 06/26/2004
                • RE: Bug?, Scott Cantor, 06/26/2004
                • Re: Bug?, Grover Manuel Campos Ancajima, 06/26/2004

Archive powered by MHonArc 2.6.16.

Top of Page