Details
-
Bug
-
Resolution: Done
-
Major
-
None
-
jboss-fuse-6.2.1
-
None
-
%
-
Description
I have following blueprint.xml for creating a JAAS PropertyLoginModule:
<?xml version="1.0" encoding="UTF-8"?> <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaas="http://karaf.apache.org/xmlns/jaas/v1.0.0" xsi:schemaLocation=" http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd"> <ext:property-placeholder placeholder-prefix="$[" placeholder-suffix="]"/> <jaas:config name="test" rank="1"> <jaas:module className="org.apache.karaf.jaas.modules.properties.PropertiesLoginModule" flags="required"> users = $[karaf.home]/etc/testuser.properties </jaas:module> </jaas:config> </blueprint>
It works fine on Linux but not on Windows.
It looks like that the problem was in Karaf PropertyLoginModule rather than blueprint extension namespace implementation. The $[karaf.hom] property placeholder returns correct value for me on Windows:
C:\\jboss\\fuse\\6.2.1\\jboss-fuse-6.2.1.redhat-084
However, when the org.apache.karaf.jaas.modules.properties.PropertiesLoginModule tries to read the file using the "usersFile" path, it tried to read on following value instead:
C:\jboss\fuse\6.2.1\jboss-fuse-6.2.1.redhat-084/etc/testuser.properties
Obviously it won't work on Windows.