Spring Security, OpenID, Wicket Demo

I completed the setup of a small application that use Spring Security to perform an OpenID authentication. The application integrates also SpringSecurity and Wicket Security. Follows some details.

The demo conatains two different solutions, one uses the spring namespace, the other configures explicilty Spring security filters and providers.

The main issue to solve is how store the OpenID attributes returned from the OpenID provider to the Sprin UserDetails object.

Spring Security Name Space OpenID Setup

Through the element <openid-login/> Spring  auto-configures an OpenIDAuthenticationFilter and an OpenIDAuthenticationProvider. The element <attribute-exchange/> contains all the  OpenId attribute element to ask to the provider.

<security:http>
 <security:anonymous enabled="false" />
 <security:logout />
 <security:openid -login authentication-success-handler-ref="authenticationSuccessHandler" login-page="/login" authentication-failure-url="/?login_error=true" >
 <security:attribute -exchange>
 <security:openid -attribute name="email" type="http://schema.openid.net/contact/email" required="true" />
 <security:openid -attribute name="firstName" type="http://axschema.org/namePerson/first" required="true" />
 <security:openid -attribute name="lastName" type="http://axschema.org/namePerson/last" required="true" />
 <security:openid -attribute name="language" type="http://axschema.org/pref/language" required="true" />
 </security:attribute>
 </security:openid>
 <security:remember -me key="alessandro-vincelli-openid" />
</security:http>

To be continue…

DEMO: http://demo.alessandro.vincelli.name/openid/

Source: http://youeat.googlecode.com/svn/spring-security-open-id

Write ISO to USB stick

Its actualy pretty easy to do this in the terminal:

Code:

$ diskutil list

and it returns something like
Code:

/dev/disk0
#:                       TYPE NAME                    SIZE       IDENTIFIER
0:      GUID_partition_scheme                        *1.0 TB     disk0
1:                        EFI                         209.7 MB   disk0s1
2:                  Apple_HFS Macintosh HD            999.9 GB   disk0s2
/dev/disk1
#:                       TYPE NAME                    SIZE       IDENTIFIER
0:     FDisk_partition_scheme                        *4.1 GB     disk1
1:                 DOS_FAT_32 GENTOO LIVE             4.1 GB     disk1s1

Now unmount the disk using diskutil replace the disk number with the id of your usb stick

Code:

$ diskutil unmountDisk /dev/disk1

And use DD to write again replace the disk number
Code:

dd if={ISO_IMAGE_HERE_} of=/dev/disk1 bs=1m

Replace if={} with the path to your iso image

Disabling startup of a service in Ubuntu

Sometimes is not easy to solve easy problems.
Today, after some research, I found how disable service in Ubuntu… It’s better to fix that, instead to lose more time in a near future.
To disable a service in Ubuntu it’s necessary remove the symlinks from all the runlevel-specific directories, /etc/rc*.d. The command to do that is update-rc.d.
Esample:
ubuntu# update-rc.d -f openvpn remove

reference