UNSOLVED

dirk_aumueller

updated

16 years ago

0

4302

November 26th, 2010 00:00

Mismatch of Signature

Dear all!

I recently started working with Atmos and wrote an java class to extract recursively all metadata of files and directories stored in a certain namespace. Testing my implementation with the Atmos Online Service, it worked out fine. So, my next step was to try it out on my companies Atmos testing installation. Here the extraction fails with the following message:

/rest/namespace/test1/

x-emc-uid:myUsername

Hash: u25S8mUOOqi1+ADqMLV6l0UO7I8=

1032

There was a mismatch between the signature in the request and the signature computed by the server.

Reading through all discussions concerning the mismatch of signatures, it looks like that the Api fails to sign the request correctly. But I don't know why it works with the Atmos Online Service and not with my companies Atmos testing installation.

Please help me and give some advices or tips where I should start debugging.

Best regards,

Dirk Aumueller

  • rbala1

    1 Rookie

    •

    222 Posts

    540

    0

    Posted November 29th, 2010 06:00

    Dirk,

    Are you using the correct set of UIDs and shared secrets for the on-premise Atmos instance?  There are no differences with regards to how requests are signed with Atmos Online vs. a private cloud instance of Atmos. 

    Can you try to access your on-premise instance with the AtmosFox plugin using the same UIDs and shared secrets that fail with your code?

    Here's link to download the plugin for Firefox:  https://addons.mozilla.org/en-US/firefox/addon/178414/

    Raj

  • 540

    0

    Posted November 29th, 2010 07:00

    Hi Raj,

    thanks for your answer.

    I'm using AtmosFox to deploy my test data and metadata no matter if testing with the EMC Online Atmos instance or my private instance of Atmos. It works fine on both.

    The error only happens when I run my source code on my private instance of Atmos. I'm sure of this behaviour, because I tested my source code first with the EMC online instance of Atmos. There everything works fine.

    That's the reason, I'm so surprised about the error and have no answer, yet.

    Dirk

  • rbala1

    1 Rookie

    •

    222 Posts

    540

    0

    Posted November 29th, 2010 10:00

    Dirk,

    Are you using our Java wrapper? 

    http://code.google.com/p/atmos-java/


    Raj

  • scot4

    18 Posts

    540

    0

    Posted November 29th, 2010 11:00

    Dirk can you post a wireshark trace of  your app running when it generates this error?  what ersion of Atmos and what version of the wrappers are you using?

    Scot

  • 540

    0

    Posted November 30th, 2010 00:00

    Hi,

    thanks for your efforts!

    I'm running atmos-java wrapper version 1.4.0.29 and Atmos version 1.4.

    Here is a trace with wireshark when I run my code:

    No.     Time        Source                Destination           Protocol Info
         37 3.265657    10.212.xx.xx          10.212.xx.xx          HTTP     GET /rest/namespace/ HTTP/1.1
    Frame 37: 321 bytes on wire (2568 bits), 321 bytes captured (2568 bits)
    Ethernet II, Src: Dell_a8:bb:xx (f0:4d:a2:a8:xx:xx), Dst: Vmware_be:00:xx (00:50:56:be:xx:xx)
    Internet Protocol, Src: 10.212.xx.xx (10.212.xx.xx), Dst: 10.212.xx.xx (10.212.xx.xx)
    Transmission Control Protocol, Src Port: 60939 (60939), Dst Port: http (80), Seq: 1, Ack: 1, Len: 267
    Hypertext Transfer Protocol
        GET /rest/namespace/ HTTP/1.1\r\n
            [Expert Info (Chat/Sequence): GET /rest/namespace/ HTTP/1.1\r\n]
                [Message: GET /rest/namespace/ HTTP/1.1\r\n]
                [Severity level: Chat]
                [Group: Sequence]
            Request Method: GET
            Request URI: /rest/namespace/
            Request Version: HTTP/1.1
        x-emc-signature: ICGZbnTRWzOXtW9twPcbsgoES3s=\r\n
        Date: Tue, 30 Nov 2010 07:52:37 GMT\r\n
        x-emc-uid: dirk\r\n
        User-Agent: Java/1.6.0_22\r\n
        Host: 10.212.xx.xx\r\n
        Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2\r\n
        Connection: keep-alive\r\n
        \r\n

    No.     Time        Source                Destination           Protocol Info

         40 3.314193    10.212.xx.xx          10.212.xx.xx          HTTP/XML HTTP/1.1 400 Bad Request

    Frame 40: 394 bytes on wire (3152 bits), 394 bytes captured (3152 bits)

    Ethernet II, Src: Vmware_be:00:xx (00:50:56:be:xx:xx), Dst: Dell_a8:bb:xx (f0:4d:a2:a8:xx:xx)

    Internet Protocol, Src: 10.212.xx.xx (10.212.xx.xx), Dst: 10.212.xx.xx (10.212.xx.xx)

    Transmission Control Protocol, Src Port: http (80), Dst Port: 60939 (60939), Seq: 1, Ack: 268, Len: 340

    Hypertext Transfer Protocol

        HTTP/1.1 400 Bad Request\r\n

            [Expert Info (Chat/Sequence): HTTP/1.1 400 Bad Request\r\n]

                [Message: HTTP/1.1 400 Bad Request\r\n]

                [Severity level: Chat]

                [Group: Sequence]

            Request Version: HTTP/1.1

            Response Code: 400

        Date: Tue, 30 Nov 2010 07:57:14 GMT\r\n

        Server: Apache\r\n

        Content-Length: 195\r\n

            [Content length: 195]

        Connection: close\r\n

        Content-Type: text/xml\r\n

        \r\n

    eXtensible Markup Language

       

            version='1.0'

            encoding='UTF-8'

            ?>

       

           

                1032

               

           

                There was a mismatch between the signature in the request and the signature computed by the server.

               

           

  • scot4

    18 Posts

    540

    0

    Posted November 30th, 2010 13:00

    Dirk

    Do any requests work with the java wrappers to this particular Atmos node? Or do all requests fail with a bad signature error?

  • 540

    0

    Posted November 30th, 2010 23:00

    Hi Scot,

    when using AtmosFox on this node, everything works fine.

  • ragr1

    12 Posts

    540

    0

    Posted December 3rd, 2010 12:00

    Trusting the error message is correct, I would recheck all the values used for signature calculation.  With correct parameters supplied (uid/token, sharedkey) for your private Atmos, the Java code should take care of the signature. BTW, I use 1.3 and the Java code works fine.  Signature calculation for REST W/S is documented in the Atmos Programmer's Guide. Please review that and see if you can debug/dump the values to determine the issue.

    BTW, ensure the time on the client and the server are same. There is a 5 min time window. But if that is the problem then you will get a specific error.

    Best wishes,

    Rag