You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@santuario.apache.org by See Khim <le...@gmail.com> on 2011/06/29 13:31:48 UTC
How to modify the default prefix in the openSAML for encryptedAttribute
Christian Geuer-Pollmann <geuer-pollmann <at> nue.et-inf.uni-siegen.de> writes:
>
>
> --On Wednesday, September 18, 2002 1:03 PM -0400 Tom Oehser <tom <at>
toms.net>
> wrote:
>
> > We have a set of DTDs that require our signature look like:
> >
> > <Signature Id="TamperSealer01"
> > xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo> ...
> >
> > not like this:
> >
> > <ds:Signature Id="TamperSealer01"
> > xmlns:ds="http://www.w3.org/2000/09/xmldsig#"><ds:SignedInfo> ...
> >
> > I havn't found a straightforward way to get this to happen...
>
> Hi Tom,
>
> this is a hidden feature )
>
> org.apache.xml.security.utils.
> ElementProxy.setDefaultPrefix(
> "http://www.w3.org/2000/09/xmldsig#",
> "");
>
> (call this *after* Init.init())
>
> BTW, this behaviour is controlled by the PrefixMappings element in the
> config.xml file:
>
> <PrefixMappings>
> <!-- Many classes create Elements which are in a specific namespace;
> here, the prefixes for these namespaces are defined. But this
> can also be overwritten using the ElementProxy#setDefaultPrefix()
> method. You can even set all prefixes to "" so that the
> corresponding
> elements are created using the default namespace -->
> <PrefixMapping namespace="http://www.w3.org/2000/09/xmldsig#"
> prefix="ds" />
> <PrefixMapping namespace="http://www.w3.org/2001/04/xmlenc#"
> prefix="xenc" />
> <PrefixMapping namespace="http://www.w3.org/2002/06/xmldsig-filter2"
> prefix="xfilter2b" />
> <PrefixMapping namespace="http://www.w3.org/2001/10/xml-exc-c14n#"
> prefix="ec" />
>
> Christian
>
>
Hi Christian,
I saw your previous posting revealing the hidden features to set the default
prefix.
Thanks for revealing this hidden features. :)
Btw, do you observe any hidden features that allow us to set the prefix for
encryptedAttribute ?
I try to specify the prefix using the builder, but when i do the encryption,
it auto set the prefix to saml2.
</saml:AuthnStatement>
<saml:AttributeStatement>
<saml2:EncryptedAttribute
xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion">
I have every section in order except this encrypted part.
Really appreciate any thought or clue.
Best Regards,
See Khim
Re: How to modify the default prefix in the openSAML for encryptedAttribute
Posted by Chad La Joie <la...@itumi.biz>.
If you have questions about OpenSAML you should send them to the
OpenSAML list.
On 6/29/11 7:31 AM, See Khim wrote:
> Hi Christian,
>
>
> I saw your previous posting revealing the hidden features to set the default
> prefix.
>
> Thanks for revealing this hidden features. :)
>
> Btw, do you observe any hidden features that allow us to set the prefix for
> encryptedAttribute ?
>
> I try to specify the prefix using the builder, but when i do the encryption,
> it auto set the prefix to saml2.
>
> </saml:AuthnStatement>
> <saml:AttributeStatement>
> <saml2:EncryptedAttribute
> xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion">
>
> I have every section in order except this encrypted part.
--
Chad La Joie
http://itumi.biz
trusted identities, delivered