Week 11 of the Summer of Code brought the ending to a summer long problem, the MT WSSE authentication issue. The MT importer is now officially a reality, and I am happy to say I will be able to complete my original set goals.
Fixing My MT WSSE Authentication Problem
Earlier this week I received a great deal of help from two Movable Type developers, Mark Paschal and Byrne Reese. After finding the source of my issue, Mark took a closer look at the specific problem. His diagnosis: I had a bug in my end of the WSSE authentication.
After spending numerous weeks working with the Atom Protocol Exerciser, I came to rely on it as a crutch. Whenever my Atom retrieval failed, the APE always succeeded. Well, that turned out to be a bad habit. Movable Type’s WSSE authentication was implemented differently than the APE, and thus the APE was useless against it. So, when I ran into a problem with my code and the APE didn’t work either, I assumed the issue was on MT’s end. That was simply not the case.
After Marked looked at my code, he informed me my nonces were repeating. The AtomPub library I had be using did not rebuild the nonce after each sequential request, and therefore failed to authenticate on the second Atom request, the list of posts. After I added a snippet of code Mark suggested, everything started authenticating perfectly.
So, this entire issue came down to one line of code on my end, and it could have been completely avoided had a took a closer look at my end of the code. Had I approached the problem differently, I am confident I would have found the repeating nonces, but I didn’t even look in that direction. I will definitely be taking this programming lesson with me into future projects.
The Status of the Movable Type Importer
Now that everything is authenticating, the MT importer is not far behind. I’m currently putting the finishing touches on some changes I had to make that differed from TypePad. Once those changes have been made, the importer should be working fine. I expect the MT importer to be completed over the next couple of days, and I should finally have everything submitted to WordPress’ Trac.