The cyrus imap server in version 2.2 has a weired behavior: By default an admin user is not allowed to delete mailboxes he created. The good news is, he is allowed to give himself the right to do so. Read More
Virtualization for VPN on Shared Systems
If you are using a machine being shared between several persons it is not advisable to open a VPN connection, because the tunnel would be accessible for all users of the computer. This is often the case in environments with thin clients. Instead of using a notebook or some other dedicated system, there is another possibility. Stephan Windmüller pointed me at the following solution. Simply install a virtualizer like VirtualBox with an operating system emulating its own network hardware. You can use a VPN tunnel from inside the virtualized OS without sharing the connection with other users on the host machine.
Remote debugging with Java Virtual Machine
In order to remote debug a JVM export the following java options:
export JAVA_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,address=8888,server=y,suspend=n -XX:MaxPermSize=1024m"
I got this information from this site http://ztiromoritz.wordpress.com/2009/08/03/java-remote-debugging/.
After exporting these java options in the shell where you start the jvm you like to debug, you can use your favorite IDE to connect to port 8888 at localhost in order to start debugging.
Multiple one phase resources in jBoss-5.1.0.GA
In jBoss-5.0.1.GA there was the configuration file ${JBOSS_HOME}/${SERVER_CONFIG}/conf/jbossjta-properties.xml
. In order to enable distributed transactions for multiple local resources (non-XA) the following option had to be inserted into this file:
In jBoss-5.1.0.GA this config file has been replaced by ${JBOSS_HOME}/${SERVER_CONFIG}/conf/jbossts-properties.xml
. So you have to add the same line into the xml-element with name properties and attributes depends with value “arjuna” and name with value “jta”:
<!-- ... -->
Preventing a bad color representation in acroread for LaTeX documents
Using pdftex to generate a PDF document from LaTeX source shows up to look ugly in acroread due to color model and transparency settings. The following LaTeX commando hacks this behavior:
\pdfpageattr {/Group << /S /Transparency /I true /CS /DeviceRGB>>}
Using JAAS login modules from jBoss in Tomcat
A jboss login module (like the LdapExtLoginModule
in jbosssx.jar shipped with jboss-5.0.1.GA) returns a
Group
array with one SimpleGroup
named “Roles” as its role set.
The parent class AbstractServerLoginModule
combines this with the Principal
object representing the user. So the set of principals consists of two entries acting as the
user and his roles. These are added to the principals of the Subject
instance, which
has been given to the login module when LoginModule#initialize(Subject, javax.security.auth.callback.CallbackHandler, java.util.Map, java.util.Map)
is called.
Standalone Tomcat with jBoss plus authentication against LDAP
There is a 2nd edition of this post: Standalone Tomcat with jBoss (2nd Edition)!
This tutorial desribes, how to install and configure a standalone Tomcat, so that a deployed webapp can authenticate against LDAP and connect to a jBoss passing the credentials in every call of an EJB via remote interface , so that the business application can authenticate against the same LDAP, too. The configuration of the jBoss seems to be a more common and better documented task and will be covered in another tutorial, which I will link here later, as soon as I have written it.
WARNING: Please don’t use this solution in a productive system, but for testing purpose only. The custom LdapExtLoginModule presented here exposes the credentials of all online users to all classes using the same class loader! I will add a blog post, as I find a solution for production systems.
Read More