cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Beucher Thierry <thierry.beuc...@worldline.com>
Subject FEDIZ-15 patch (Support the publish of the WS-Federation Metadata document)
Date Wed, 04 Sep 2013 15:36:09 GMT
HI Oli,

I am currently testing your FEDIZ-15 patch and it fails in unit tests of fediz-idp : an issue
related to file encoding IBM1252 not supported is raised during writing of metadatas (at document
signature phase) ...

Running org.apache.cxf.fediz.service.idp.util.MetadataWriterTest
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 42.943 sec <<< FAILURE!
testWriteIDPMetadata(org.apache.cxf.fediz.service.idp.util.MetadataWriterTest)  Time elapsed:
39.16 sec  <<< ERROR!
java.lang.RuntimeException: Error creating service metadata information: IBM1252
       at org.apache.cxf.fediz.service.idp.util.MetadataWriter.getMetaData(MetadataWriter.java:209)
       at org.apache.cxf.fediz.service.idp.util.MetadataWriterTest.testWriteIDPMetadata(MetadataWriterTest.java:52)

below the metadatas file to be signed :

<?xml version='1.0' encoding='IBM1252'?>
<EntityDescriptor ID="_96E3E566F42872B96B13783064585181" entityID="https://localhost:8443/fediz-idp/federation"
xmlns:fed="http://docs.oasis-open.org/wsfed/federation/200706" xmlns:wsa="http://www.w3.org/2005/08/addressing"
xmlns:auth="http://docs.oasis-open.org/wsfed/federation/200706" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <fed:RoleDescriptor xsi:type="fed:SecurityTokenServiceType" protocolSupportEnumeration="http://docs.oasis-open.org/wsfed/federation/200706"
ServiceDescription="IDP of Realm A" ServiceDisplayName="REALM A">
    <KeyDescriptor use="signing">
      <KeyInfo>
        <X509Data>
          <X509Certificate>MIICwTCCAamgAwIBAgIEFKo9KjANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDEwZSRUFMTUEwHhcNMTMwOTAzMjAyMjMxWhcNMjMwNzEzMjAyMjMxWjARMQ8wDQYDVQQDEwZSRUFMTUEwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCnmQKgcHaFmTG/rMzlSP1DDVUn1AIVlUo2eBNBaOloKvyXrYT6zwd+mno1Skj9EQMntx9LvK6xLiquLvuKP0XGeWHhJwgG4dBB1QQ71hosrWIaClLQrNuV8d8pztSkPfVrL5SdmlqDUAlC598rGhU7ttXPKp2FF8set2QIDSFZrRURpeAoh7aCdlySrJGBQsTGTvb4N6yF8yoxKcVBIBb62q4xS1qU10Oa+iYig3+b+vNwSzcN5RE9Etw+nQ8q8soiwfGcVLmWjv1oDuLrx1BOqL2zXxmISlJgv2/cC3DVnPb6IOmHaEklLbod7Nq0JgD0L27s4Js+ccXtkoBcQtRxAgMBAAGjITAfMB0GA1UdDgQWBBSSn4p1eScqsNyywCH37ipMdZNykzANBgkqhkiG9w0BAQsFAAOCAQEAnkmNaVR3lXJWh4nOvNvzXz6vBSMbm/K4khu8mRtUWHikbwZE72ZLCD2Bv69YhNsaAZmtH02CERUXZTbh8YXfZ0VnMh9ieTKHWpNGDOBdvfsd8jSLd4svIrP2vfMciS0px0Q87W4jntiQovhPuTEeOOanaG8R2eaROTONRsTQxWWGep5FqhH6Of2hL7kwEjFyLDE/NIMHHeURlxmbwwMbnJoA8/wVOZnGOCkmnKs96DXHD+MBCboD+2UMl76GONiksAsD+LjiqZwZeWsZCP+NDPEjXOv/7MzpiCSMLLk+AWzQAZDqpDwjys1YXREbVVFVlS+3Sob0hd0SJr/hsHl9Hw==
          </X509Certificate>
        </X509Data>
      </KeyInfo>
    </KeyDescriptor>
    <fed:SecurityTokenServiceEndpoint>
      <wsa:EndpointReference>
        <wsa:Address>https://localhost:0/fediz-idp-sts/REALMA
        </wsa:Address>
      </wsa:EndpointReference>
    </fed:SecurityTokenServiceEndpoint>
    <fed:PassiveRequestorEndpoint>
      <wsa:EndpointReference>
        <wsa:Address>https://localhost:8443/fediz-idp/federation
        </wsa:Address>
      </wsa:EndpointReference>
    </fed:PassiveRequestorEndpoint>
  </fed:RoleDescriptor>
</EntityDescriptor>


A fix in MetadataWriter at line #96 solves it :

            writer.writeStartDocument("UTF-8","1.0");

Does it make sense to take care of various encodings ?
Strangely I didn't encountered the same issue for MetadataWriter on project 'core' side ....

Thanks


________________________________

Ce message et les pi?ces jointes sont confidentiels et r?serv?s ? l'usage exclusif de ses
destinataires. Il peut ?galement ?tre prot?g? par le secret professionnel. Si vous recevez
ce message par erreur, merci d'en avertir imm?diatement l'exp?diteur et de le d?truire. L'int?grit?
du message ne pouvant ?tre assur?e sur Internet, la responsabilit? de Worldline ne pourra
?tre recherch?e quant au contenu de ce message. Bien que les meilleurs efforts soient faits
pour maintenir cette transmission exempte de tout virus, l'exp?diteur ne donne aucune garantie
? cet ?gard et sa responsabilit? ne saurait ?tre recherch?e pour tout dommage r?sultant d'un
virus transmis.

This e-mail and the documents attached are confidential and intended solely for the addressee;
it may also be privileged. If you receive this e-mail in error, please notify the sender immediately
and destroy it. As its integrity cannot be secured on the Internet, the Worldline liability
cannot be triggered for the message content. Although the sender endeavours to maintain a
computer virus-free network, the sender does not warrant that this transmission is virus-free
and will not be liable for any damages resulting from any virus transmitted.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message