butonic.de Rotating Header Image

A simple JAX-RS security context example in GlassFish

When creating a REST api with Java EE 6 and JAX-RS there comes the time when you start thinking about security. In our case we were trying to set up HTTP Basic Auth for the REST api to identify users and keep them from deleting other peoples stuff. It took me a while to understand the different aspects of configuring HTTP Basic Auth when using GlassFish:

  1. Use SecurityContext in your Java code to access the authentication information.
  2. To enable HTTP Basic Auth add a <security-constraint> section to your web.xml
  3. Map user roles to GlassFish groups by creating a sun-web.xml
  4. Configure a FileRealm / JDBCRealm in GlassFish to store user passwords

I will detail the steps with a simple deleteRating() example and xml snippets.
Continue reading →

Blog migration from s9y to wp finished

I just finished configuring the redirects for the old s9y urls. Posts, Feeds and Tags should now redirect to the proper wordpress pages. Unfortunately, the script I used to migrate the content left out the tags, so I retagged all the posts. On the bright side I now know which posts still need to be fixed because an image did not get uploaded or a link is broken.

I still need to think of a use for categories … so the site will be in flux a few more days. Lets see how google handles the new url, as http://blog.butonic.de now points to http://butonic.de, the new wordpress installation.

updates and breakdowns and upgrades

I don’t exactly remember when the server started to fall apart. I wanted to move from hardy to lucid and ended up juggling the partitions to create a small gap between the MBR and the first partition. You know, thats where the grub bootloader puts some of his code … at least it warns you about this. That star-hosting uses a completely anarchistic rescue image did not make it any easier.

In the process  I also moved from serendipity to WordPress. Mainly because an Android app is availiable. I’ll take this as an opportunity to restart my blogging efforts. So, expect posts more often in the future.

I can hear it

I’m 30 and it made me rip out my earphones.
Train Horns

Created by Train Horns

possible nickname explanations

I tried out the Cuil search engine and typed in my nickname. It did not find my website, but I found this in the Hellatine Dictionary of Bureaucratese:

butonic;
n., Any political view or ideology reduced to a slogan designed to fit on a pin, button or other small clothing accessory, as either a symbol or as text. adj.. Describing a political stand which has been reduced, ad absurdam, to fit the limted intellectual or philosophical capacity of its proponent. Also butonism.
(Fr. boutonier: a decorative element worn in a buttonhole)

Really Achieving Your Childhood Dreams

I found this in the last WWWW and it gave me more than just tears in the eyes. Enjoy Randy Pausch giving his Last Lecture:

4368781

Feb 1 12:51:32 gromit kernel: Cannot read proc file system: 9 – Bad file descriptor.
Feb 1 12:52:03 gromit last message repeated 4368781 times

WTF?!?

finally, suspend / resume works!

Yeah I know, most of you out there think I am crazy to have used my laptop without working suspend to ram or disk. Well in my case the combination of my graphicscard and a widscreen resolution forced me to use the fglrx driver from ati (not even vesa was an option). Fortunately, the newopen source radeonhd driver works like a charm :)

I deactivated the fglrx driver and am now radeonhd only … yeah that will keep me from gaming … not a big issue currently anyway …

Here are the instructions to install from git.

Happy holidays!

What is it with me and girls …

maybe luck and persistence brought us together … maybe it was destiny … whatever it was … it feels good :)