[ 
https://issues.apache.org/jira/browse/KARAF-1368?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13254513#comment-13254513
 ] 

Freeman Fang commented on KARAF-1368:
-------------------------------------

Hi JB,

Do you mean remove all jaas bundle from startup.properties and put them into a 
feature?
If so, -1. Given the very basic role jaas bundle plays here, a lot of other 
karaf functionality depend on it, such as admin, shell, management, features, 
etc. I believe we need the jaas for JMX/SSH/Webconsole aslo. startup.properties 
is the place to put some very basic bundles, which can do self-boot for 
container, if we remove jaas bundles from startup.properties, we also need 
remove almost all other karaf bundles from the startup.properties, which I 
think not doable, think about without features related bundles ready at very 
early stage, who take responsibility to launch the features from features.xml?

In summary, the jaas related bundles isn't be optional, it's very fundamental 
thus must be available at very early stage.
Freeman
                
> 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: Jean-Baptiste Onofré
>            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


Reply via email to