Sunday, February 28, 2010

Dealing with mercy

Later this morning I'll speak on Romans 12:1-8 about offering yourself as a 'living sacrifice'. It makes no sense to sacrifice your life for the sake of others. What makes sense is holding on to what little I have in an this cold and unfair world. But Paul doesn't say 'Hey, offer your bodies as a living sacrifice' rather he says 'In view of God's mercy offer your bodies as a living sacrifice.' God's mercy stuns me.

I've been guilty and I've been punished for it plenty of times. I've been guilty and gotten away with it. I recognize the beauty and goodness and perfection there is in the world and admit I have sometimes chosen against it, reveling in the opposite instead. Were the Great Judge to render a verdict in a booming voice I'd hear GUILTY and the Judge would be just and right. I'd have no worthy defense.

Mercy is the engine of the change in my life. Whereas I stood guilty with no defense, there was another in the room, bright and perfect. "God was pleased to look on him and pardon me." How could it be...? As I walk out, breathing deep the air of freedom, knowing I do not deserve it, I have one response: gratitude. Gratitude for mercy fractures my heart into a thousand shards of joy, peace, excitement, wonder... and a will to worship this merciful one, to please Him. To live worthy of what I could not earn. To be a 'living sacrifice.' I want to show mercy, too, and be like him.

Thursday, February 25, 2010

cas 3.3.5 and utf8 passwords SUCCESS

Finally, everything is working to have CAS correctly handle authentication with utf8 passwords. The final remaining bugaboo was in my own code. We wrap CAS inside of our own value-added service and use HttpClient to communicate with CAS. HttpClient doesn't encode the posted form fields as utf8 unless you ask it to:


authpost.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=utf-8");


Now we're back in business. Of course, that leaves me wondering: Did the utf8 passwords ever work before? I was operating under the assumption that I had tested the system last year to make sure foreign/special character passwords would be allowed. But if I wasn't sending utf8 passwords via HttpClient, I can hardly see how they could have been working. Perhaps that was just a gross oversight on my part.

Tuesday, February 23, 2010

Getting sourcecode to show in blogger

This blog entry shared a nifty trick to get the xml snippet to show up properly below. There are a couple of files you have to download and copy somewhere but now that is done I'll be able to simply wrap any code like so:



some code to show!

cas 3.3.5 and utf8 passwords

After we upgraded to CAS 3.3.5 users with foreign character passwords failed authentication. Two things were missing:

in /WEB-INF/web.xml I added the following filter:



SetCharacterEncodingFilter
org.springframework.web.filter.CharacterEncodingFilter

encoding
UTF-8


forceEncoding
true




SetCharacterEncodingFilter
/*





And then on top.jsp and casLoginView.jsp I needed to add this line:

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>

And now we're back in business.

getting wireshark up on osx

I downloaded wireshark, which is a very nice looking packet sniffer, in order to try to see if the communication between CAS (3.3.5) and the ldap server is indeed utf8. (for some reason, every time I try to use a utf8 password, CAS won't recognize it as valid, even if it is). We didn't have this problem with CAS 3.3.

Anyhow, I have wireshark and it looks great! However it didn't see any interfaces to monitor. After a quick google, i need to give my user permission to the bpf interface device. Here's the magic:

sudo chown {your account name} /dev/bpf*

I'm not going to run wireshark that often, I expect, so I'll modify the permissions for this session, but check out http://www.wireshark.org/lists/wireshark-users/200608/msg00014.html if you want the new permission to persist between reboots.