[JIRA] Commented: (SIDP-552) IdP-Metadata containing german umlauts shows encoding-problems on Microsoft Windows (Error in ResourceBackedMetadataProvider?)

Nikolaus Ortner (JIRA) noreply at shibboleth.net
Thu May 24 09:04:03 BST 2012


    [ https://issues.shibboleth.net/jira/browse/SIDP-552?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14095#comment-14095 ] 

Nikolaus Ortner commented on SIDP-552:
--------------------------------------

Yes - this is where someone (e.g.a Service Provider or some federation administrator) can fetch the (invalid) metadata containing non-ASCII characters in some elements; [/idp/shibboleth returns a forward to /idp/profile/Metadata/SAML]

And I was trying to configure my IdP to return correct metadata when he is requested to. "correct" = wellformed and correctly encoded xml readable by other software. So I added the umlauts to the metadata describing the IdP himself ($IDP_HOME$/metadata/idp-metadata.xml), tried several encodings (specified in the xml itself and when saving the file to disk) and encountered problems (in my Microsoft Windows environment).

And only when some (non default) JVM-option is added to where the servlet container is started, the $IDP_HOME$/metadata/idp-metadata.xml is read from disk and delivered to the requester ok. This is what I've done, and it works! - but to my honest opinion this is only a workaround not knowing which side-effects may occur to other applications hosted in this servlet container.


The problem is that the mechanism serving /idp/profile/Metadata/SAML (responding to external requests by reading the metadata-file describing the IdP and returning it) somehow reads and processes the file in a different manner. So that the encoding specified in the xml-file somehow is disregarded, may it depend on the operating system, the JVM, some JVM-option or anything else.

And I consider this a bug because the IdP obviousely correctly processes several other files containing non-ASCII characters (eg. locally maintained SP-metadata or the configuration in conf/attribute_resolver.xml encoded UTF-8 and ISO-8859-1) as the encoding specified at the first line(s) of the xml files is taken into account when accessing the files - no matter if the mentioned Java-option is set or not.


> IdP-Metadata containing german umlauts shows encoding-problems on Microsoft Windows (Error in ResourceBackedMetadataProvider?)
> ------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: SIDP-552
>                 URL: https://issues.shibboleth.net/jira/browse/SIDP-552
>             Project: Shibboleth IdP 2 - Java
>          Issue Type: Bug
>         Environment: IdP 2.3.6 (MSI-Install) on Microsoft Windows Server 2008 (x86 SP 2 and 64 Bit R2 SP1, Sun/Oracle JRE 1.6.0_31-b05 / 1.6.0_29-b11). IdP runs standalone with the included Tomcat 6.
>            Reporter: Nikolaus Ortner
>            Assignee: Chad La Joie
>            Priority: Minor
>         Attachments: exception.txt
>
>
> Had some trouble with german umlauts in our IdP-Metadata (OrganizationName, OrganizationDisplayName and UIInfo/DisplayName). I tried various encodings in the XML declaration besides <?xml version="1.0" encoding="UTF-8"?> and saving the file in different encodings (UTF-8/ANSI/..) - but no combination did work. MetadataProvider [id="IdPMD"] is of type "ResourceBackedMetadataProvider".
> The workaround was to start tomcat's Java with Option "-Dfile.encoding=UTF8" [side-effects on other applications may occur then?] and the specified encoding is then taken into account. It works fine with ISO-8859-1 encoded metadata now.
> Since other configuration files are always read correct according to their specified encoding (eg. conf/attribute-resolver.xml where I have some static attributes containing umlauts in their values), it seems like the ResourceBackedMetadataProvider has a problem.
> -Niko

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the commits mailing list