mace-opensaml-users - Re: ds:KeyInfo and SubjectConfirmationData
Subject: OpenSAML user discussion
List archive
- From: Chad La Joie <>
- To: mace-opensaml-users <>
- Subject: Re: ds:KeyInfo and SubjectConfirmationData
- Date: Wed, 02 Aug 2006 11:00:47 -0400
I'll take a look at this. It's quite possible there is a bug with the KeyInfo code. The wrapped library that does the XML crypto stuff isn't as nice to use as I'd like.
One thing to note, though, is if you're expecting to see a certificate from this you're not going to. All your code is doing is adding a public key to the KeyInfo, not a cert. So what I'd expect to see if a KeyInfo element with a child KeyValue element with a child RSA/DSA key.
Thomas wrote:
Hello,
I'm using the java versione of opensaml 2 library. I'm trying to use ds:KeyInfo as
SubjectConfirmationData. I've created a KeyInfo object ad added it to the
SubjectConfirmationData element and I have specified the SubjectConfirmationDataType as
"KeyInfoConfirmationDataType". I've done the marshalling and I have no
exceptions or errros but in the resulting xml certificate the SubjectConfirmationData
is empty.
I've tryed to marshall only the ds:KeyInfo element but I obtain only an
empty XML file. I can only marshall correctly the element inside the
signature.
I suppose I'm mistaking something in the building of the KeyInfo element
inside SubjectConfirmationData but I can't figure out what. Thanks for your
help.
Thomas
--- code ---
...
sbjConfirmData = scdBuilder.buildObject( SubjectConfirmationData.DEFAULT_ELEMENT_NAME,
new QName( SAMLConstants.SAML20_NS, "KeyInfoConfirmationDataType",
SAMLConstants.SAML20_PREFIX ) );
KeyInfoBuilder kiBuilder = (KeyInfoBuilder) builderFactory.getBuilder(
KeyInfo.DEFAULT_ELEMENT_NAME );
KeyInfo keyInfo = kiBuilder.buildObject();
keyInfo.setPublicKey( subjectKey );
sbjConfirmData.getUnknownXMLObjects().add( keyInfo );
sbjConfirm.setSubjectConfirmationData( sbjConfirmData );
sbj.getSubjectConfirmations().add( sbjConfirm );
...
--- xml output ---
...
<saml:Subject>
<saml:SubjectConfirmation
Method="urn:oasis:names:tc:SAML:2.0:cm:holder-of-key">
<saml:SubjectConfirmationData xsi:type="saml:KeyInfoConfirmationDataType"/>
</saml:SubjectConfirmation>
</saml:Subject>
--
Chad La Joie 2052-C Harris Bldg
OIS-Middleware 202.687.0124
- ds:KeyInfo and SubjectConfirmationData, Thomas, 08/02/2006
- Re: ds:KeyInfo and SubjectConfirmationData, Chad La Joie, 08/02/2006
- Re: ds:KeyInfo and SubjectConfirmationData, Chad La Joie, 08/02/2006
- Build problem for xml-tooling, Dobroslav Kolev, 08/05/2006
- RE: Build problem for xml-tooling, Scott Cantor, 08/05/2006
- Build problem for xml-tooling, Dobroslav Kolev, 08/05/2006
- <Possible follow-up(s)>
- Re: Re: ds:KeyInfo and SubjectConfirmationData, Thomas, 08/02/2006
Archive powered by MHonArc 2.6.16.