Hi Christophe,

The purpose is to create your own realm ?

Where did you put your blueprint ? in the deploy folder ?
I think you will have to package in a bundle to set the right Import/Export package (especially org.apache.karaf.jaas.config package).

I confirm that <type-converters/> work as we use it in the default Karaf jaas configuration.

By the way, it's better to set rank="1" attribute on the <jaas:config/> element to "force" the usage on your module first (even if it's for your realm).

Regards
JB

On 01/29/2014 03:09 PM, cbiava wrote:
Hello,
I'd like to change the access conf to ssh console.
Thus, I did as advised in the user guide :
<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0";
            xmlns:jaas="http://karaf.apache.org/xmlns/jaas/v1.0.0";

xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0";>


     <ext:property-placeholder placeholder-prefix="$["
placeholder-suffix="]"/>

     <type-converters>
         <bean
class="org.apache.karaf.jaas.modules.properties.PropertiesConverter"/>
     </type-converters>

     <jaas:config name="myrealm">
         <jaas:module
className="org.apache.karaf.jaas.modules.properties.PropertiesLoginModule"
                      flags="required">
             users = $[karaf.base]/etc/users.properties
         </jaas:module>
     </jaas:config>

     <service interface="org.apache.karaf.jaas.modules.BackingEngineFactory">
         <bean
class="org.apache.karaf.jaas.modules.properties.PropertiesBackingEngineFactory"/>
     </service>

</blueprint>

But I have the following error :
org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to
validate xml

Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid
content was found starting with element 'type-converters'. One of
'{"http://www.osgi.org/xmlns/blueprint/v1.0.0":service,
"http://www.osgi.org/xmlns/blueprint/v1.0.0":reference-list,
"http://www.osgi.org/xmlns/blueprint/v1.0.0":bean,
"http://www.osgi.org/xmlns/blueprint/v1.0.0":reference,
WC[##other:"http://www.osgi.org/xmlns/blueprint/v1.0.0"]}' is expected.

Any idea ?

Thanks in advance.

Christophe




--
View this message in context: 
http://karaf.922171.n3.nabble.com/Jaas-realm-problem-tp4031391.html
Sent from the Karaf - User mailing list archive at Nabble.com.


--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com

Reply via email to