Finally - you can view posts and leave comments!

Okay then! I've finally taken a few minutes out of my life and applied it to my own blog configuration. You may finally click on entries to view them individually! Hooray!

Additionally, I've set the file system permissions properly so that CAPTCHA's are now properly generated, allowing you to leave comments! Hooray!

There are still a few things broken here, and I need to spend some deep time pulling in some old Mango blog posts that are lodged firmly into the Google machine that people keep trying to find here, and I hate continually disappointing them. It will take some URL re-writing, and that will probably necessitate the Tuckey Rewrite Servlet Filter, which I've gotten some additional experience lately working with.

More to come.

Having and eating cake - transient definitions and performance

I had a dilemma: the strict side of me wants to have solidly defined object classes to represent all of my transients in a domain model. However, the performance side of me wants to just deal with everything in structures and JSON strings. Let's PRO/CON this out.

Object Classes

PROS
  • Well defined
  • Documented structure
  • Type that can be validated

CONS

  • Slow to initialize (relatively to structs)
  • Takes longer to develop
  • Can take longer to maintain changes

Structures/POJO/JSON

PROS
  • Simple to code
  • Super fast to create & instantiate
  • Extremely common data type

CONS

  • No definition structure
  • Cannot be validated
  • No contract between domain model and application code regarding the class definition

I've got some ideas I'm trying out right now. I'll post a follow up soon showing where I end up with in this quandary.

Late night upgrades

It's a graveyard shift tonight. The holidays here at the university send the students and faculty away, mostly. This makes it the perfect time for the team to perform upgrades. We're upgrading the student information system, which disables much of the company as we are tighly coupled/integrated into it. For the better, ultimately, but we try to keep some things up. It would be great if more things could be left running.

I've tasked myself with upgrading our remaining ColdFusion MX 7 servers to ColdFusion 8.0.1 Enterprise. We acquired the licensing this fall and it's go time. There's a remote terminal on my other screen running the update on the first of two servers right now. I expect it to go smoothly since our development server has been on 8.x for over a year now, and all the products running on these two production servers are built and maintained there. Anything dire would have come out of the woodwork right now. And even if things remain, that's what the holiday break is for. :)

This whole time I've been wanting to get 8 on there to be able to watch the performance monitor. Yet now that I think about it, how effective is a ColdFusion performance monitor that is itself a ColdFusion application? Hmmm...

Tomcat URL Re-writing Without Apache

The installation of this very blog inspired me to touch on this subject. I had a problem immediately with the SES URLs here. Notice they are present when you click on the title of an entry here. Railo's default web.xml only defines the servlets to handle *.cfm, *.cfml, and *.cfc url-patterns, so of course SES needs some help there. I won't go into detail about that because there are a zillion other blog posts on this. In short, you need to add this to your Railo's WEB-INF/web.xml file:

view plain print about
1<servlet-mapping>
2        <servlet-name>CFMLServlet</servlet-name>
3        <url-pattern>/index.cfm/*</url-pattern>
4    </servlet-mapping>

Or rather, for this blog in particular, I had to add this to meet the path requirements:

view plain print about
1<servlet-mapping>
2        <servlet-name>CFMLServlet</servlet-name>
3        <url-pattern>/blog/index.cfm/*</url-pattern>
4    </servlet-mapping>

But that's all an aside. What I wanted to note here was a cool library I found while looking into these URL pattern matching issues. There's this little gem, UrlRewriteFilter, that acts just like Apache's mod_rewrite except it operates at the servlet layer in the Tomcat container. Good stuff, and well documented, too!

Enjoy!

Getting a base64 cert fingerprint from a Java keystore

The title says it all. I just wrestled with this for a while because I don't deal with certificates much at all (thankfully!).

I'm specifically working with SAML single-sign-on integration between an identity provider (a product we've chosen, and are running in-house) and a ColdFusion application. I'm at the part where I can authenticate users against our user directory via a service-provider initiated logon, but I haven't gotten the all-important verification of the return XML SAML data working yet. You know, the part where you ensure that the server POST'ing to your CF application really is the server you think it is! Which, really, it's the user's browser doing the post, not a server. The server only triggered the user's browser to do it. So there's no security there whatsoever.

So what needs to happen is that the XML digital signature is verified back on your CF app. All I needed was for my CF app to know the base64 string that is the trusted cert fingerprint from the identity provider's keystore. I had never done that before. Now, without further adeiu, here is the way to get that base64 string into a file.

view plain print about
1keytool -export -alias mykey -file mybase64cert.cer -rfc

This is run from a terminal while in the same directory as the keystore file, which is generated by the SSO software we're running. Now I can move that CER file to my app and read it in, from where I can validate my XML returns from the IdP when people are logging in.

Starting Point - Again

My new web site is finally in place. Sort of. Well, almost. I've been playing around with a lot of new technologies, namely the Amazon Web Services products. I just launched all this in an evening and I'm kind of proud of that. Of course, who knows what Amazon will charge me now. Heheh...

I've got more than a few blog entries to import from my old Mango Blog installation at my old host. Then I can get serious again about blogging. I've learned so much lately and I want to continue sharing with the ColdFusion and open source communities that have given me so much over the years.

More to come...