You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Jamie goodyear (JIRA)" <ji...@apache.org> on 2012/05/03 14:36:49 UTC

[jira] [Closed] (KARAF-1368) Make it easy to enable Karaf PropertiesLoginModule via an optional feature

     [ https://issues.apache.org/jira/browse/KARAF-1368?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jamie goodyear closed KARAF-1368.
---------------------------------

    
> Make it easy to enable Karaf PropertiesLoginModule via an optional feature
> --------------------------------------------------------------------------
>
>                 Key: KARAF-1368
>                 URL: https://issues.apache.org/jira/browse/KARAF-1368
>             Project: Karaf
>          Issue Type: Improvement
>          Components: karaf-feature
>            Reporter: Sergey Beryozkin
>            Assignee: Freeman Fang
>            Priority: Minor
>              Labels: jaas
>             Fix For: 2.2.7, 2.3.0
>
>
> Typically it is recommended to deploy the following Blueprint context in order to enable a JAAS PropertiesLoginModule shipped with Karaf:
> {code:xml}
> <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">
>     <!-- Bean to allow the $[karaf.base] property to be correctly resolved -->
>     <ext:property-placeholder placeholder-prefix="$[" placeholder-suffix="]"/>
>     <jaas:config name="karaf">
>         <jaas:module className="org.apache.karaf.jaas.modules.properties.PropertiesLoginModule"
>                      flags="required">
>            users=$[karaf.base]/etc/users.properties
>         </jaas:module>
>     </jaas:config>
> </blueprint>
> {code}
> and here is a typical pom.xml:
> {code:xml}
> <project xmlns="http://maven.apache.org/POM/4.0.0"
>    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
>    <modelVersion>4.0.0</modelVersion>
>    <artifactId>my-service-jaas</artifactId>
>    <name>Service JAAS</name>
>    <packaging>bundle</packaging>
>    <url>http://maven.apache.org</url>
>    <dependencies>
>     <dependency>
>       <groupId>org.apache.karaf.jaas</groupId>
>       <artifactId>org.apache.karaf.jaas.config</artifactId>
>       <version>2.1.2</version>
>     </dependency>
>    </dependencies>
>    <build>
>       <plugins>
>         <plugin>
> <groupId>org.apache.felix</groupId>
> <artifactId>maven-bundle-plugin</artifactId>
> <configuration>
> <instructions>
> <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
> <Import-Package>
> javax.net.ssl,
>                    javax.security.auth.login,
>                    org.osgi.service.blueprint,
>                    org.apache.karaf.jaas.config,
>                    org.apache.karaf.jaas.boot,
>                 </Import-Package>
>                 <DynamicImport-Package>*</DynamicImport-Package>
> </instructions>
> </configuration>
> </plugin>
>     </plugins>
>   </build>
>    
> </project>
> {code}
> Such a bundle is generic and will work with any service depending on PropertiesLoginModule.
> It would be nice if Karaf itself shipped such a bundle and offered an optional feature, tentatively named 'karaf-jaas-login-properties' (or similar) so that whenever a user want to work with PropertiesLoginModule all he/she needs to do is to modify etc/user.properties and do 'features:install karaf-jaas-login-properties'.
> Note it is not a new enhancement request but simply a wish to get the default properties login module easily enabled when needed  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira