Security JavaConfig fixes