Monday, October 10, 2011

JMeter, BeanShell, and Portecle ( and Bouncy Castle)

Discovered a very cool feature to JMeter.

You can embed Java scripting into JMeter; specifically BeanShell Sampler. BeanShell Sampler uses the BeanShell scripting language, which, when used in JMeter - allows you to write Java inside JMeter for specialized test scripts you might need to run.

Since I do a lot of security testing I need to access more specialized cryptographic libraries when using JMeter. BeanShell Sampler allows me one way to do security testing.

Since security testing involves truststores and key stores, I could use keytool on the command line but I found out about Portecle and that allows me to create, update and delete truststores and associated keys/certs in an easier to use GUI tool.

JMeter: trustAnchors parameter must be non-empty

If you're doing security/cryptographic testing with Java - especially with JMeter - you might encounter errors in your testing where you might get a message similar to:

javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty

Searching Google gives you hints that you haven't defined your keystore or truststore correctly and it's coming up null when the test is run. This was the case for me too.

In regards to JMeter I had to check my script inside JMeter AND also the jmeter.properties and system.properties files under the bin directory.

Once I had successfully defined the cacerts file location I got past this error and was able to run my test.

Here is the snippet:

# Location of the truststore (trusted certificates)
javax.net.ssl.trustStore=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/security/cacerts

Monday, August 22, 2011

Fair Game - Brief review

Saw the movie Fair Game a few days ago.

I'd recommend it since it condenses the story-line, leading up to and through the first part of the Iraq war, of the major and sidelined players who were influential and non-influential, respectively, in the shaping of our eventual involvement in Iraq.

In some ways it's a movie of how the Bush administration shaped intelligence to suit their policy for invading Iraq, going against some formidable evidence that Saddam wasn't pursuing weapons of mass destruction; principally, that he was NOT buying Yellow Cake from Niger.

I really enjoyed the performances of Sean Penn and Naomi Watts.

Another notable thing about watching the Blu-ray was the background commentary done by the former CIA analyst Valeria Plame and her husband Joe Wilson. Usually, this is done by the director and actors but not the actual real-life people that the movie is about. That was an unexpected bonus; although they were limited in their comments due to possible liability and non-disclosure agreements they've been bound to.

Wednesday, August 17, 2011

Highlighting in Windows command window suspends running programs

I use the command window quite a bit in Windows and have noticed that with some Windows versions, highlighting requires you to explicitly choose Mark and then select the text while other command windows you left or right click and highlighting happens automatically.

Automatic highlighting seems to be easier to do in more recent of versions of Windows; especially Windows 2008 Server, R2.

At work, I almost always run our principal application through the Windows command prompt as Administrator.

The problem though is that I would highlight and cause our BATCH application to suspend, without me knowing that I was going into suspend mode.

And learned as of yesterday, to un-suspend, the user needs to hit the ESCAPE key or use the keystroke CTRL-C in the command window.

Monday, July 25, 2011

Planes, Trains, Automobiles (and buses)

Went to Chicago for 36 hours last weekend.

Besides a short trip in my car I used mass transit to get to and from my friend's wedding.

Here's the breakdown:

1) Drive to the Table Mesa Park and ride. Cost to leave car 48 hours > $2.00
2) Bus ride to downtown Denver on BX bus: free using Eco-pass (I worked for a few hours at my desk)
3) Bus ride to Denver International Airport (DIA) using the AF line: free using Eco-pass
4) Southwest flight from Denver airport to Midway airport: $219.xx
5) Bus ride on the 55 Garfield route close to my parent's apartment: $2.25 but only had $3.00 so paid $3.00 since no change given.
6) Walked to my parent's place. About 2 blocks from the bus stop.
7) First night of sleeping: free
8) Bus ride to train station in the afternoon: $2.25
9) Train ride using the red and brown line: bought a $5.00 transit card before getting on the train.
10) Time at wedding. Fun!
11) Return on bus line around midnight: free since part part of $5.00 transit card purchased earlier.
12) Bus ride on 55 Garfield line: also free since part of transfer using $5.00 transit card used earlier
13) Slept second night at parent's house: free
14) Bus ride using the 55 Garfield to airport: $2.25
15) Southwest flight back to Denver: part of airfare stated above
16) Bus ride back to park-n-ride where I had my car: free using Eco-pass card

Cost of using public parking and public transportation: less than $20.00 for a day and a half in the city.

Total cost of transportation: ~$232.00

I'd say using mass transit with a commuter card and transfers saved me quite a bit of money. If I had taken a taxi to the wedding it would have easily cost $60.00 to $80.00 dollars both ways.

Sunday, June 05, 2011

Celsius to Fahrenheit simplified

I was certainly taught Celsius Fahrenheit conversions in the past but would forget the actual conversion math.

What was needed was a better, simplified method to remember the comparison of the temperature grades by using a simple rule than trying to remember the math. Then learning a few data points on the Celsius scale would make it much simpler.

For me, a good first step would be to remember that every 10 degrees Celsius would be 18 degrees Fahrenheit.

Then I realized that I wanted to concentrate on every 10th degree Celsius: 10, 20, 30 and 40 degrees.

So for: 10 degrees Celsius it would be 50 degrees Fahrenheit.

20 degrees Celsius it would be 68 degrees Fahrenheit.

30 degrees Celsius it would be 86 degrees Fahrenheit.

40 degrees Celsius it would be 104 degrees Fahrenheit.

For me, this is easy to remember quite quick and fast.

Remember the KISS acronym.

Exploring ELK (Elastic) Stack for hack-a-thon

At my current gig, our group finally got to do hack-a-thon week and I joined a team project that tied together a few of the technologies I...