Ciprian,
Thank you. I found the following supporting documentation and was able to 
create a new realms.
  https://karaf.apache.org/manual/latest/#_available_realm_and_login_modules

Paul Spencer

 
On 2024/01/31 15:15:32 Ciprian Ciubotariu wrote:
> I had solved this by deploying a blueprint bundle on the lines of:
> 
> <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"; 
>            xmlns:jaas="http://karaf.apache.org/xmlns/jaas/v1.0.0";>
>     <jaas:config name="myrealm">
>         <jaas:module 
> className="org.apache.karaf.jaas.modules.properties.PropertiesLoginModule"
>                      flags="required" />
>     </jaas:config>
> </blueprint>
> 
> (I had my own custom JAAS class, but for this snippet I put the 
> PropertiesLoginModule instead.
> 
> Ciprian
> 
> On Tuesday, 30 January 2024 22:21:52 EET Paul Spencer wrote:
> > Karaf 4.4.5
> > JVM  OpenJDK 64-Bit Server VM version 11.0.2+9
> > 
> > A realm created via jaas:realm-add is not listed after karaf restart.  This 
> > may be related to KARAF-7602.
> > 
> > - Create the realm using the following commands:
> > 
> > jaas:realm-add myrealm 
> > org.apache.karaf.jaas.modules.properties.PropertiesLoginModule users 
> > "etc/bugdataRestUser.properties"
> > jaas:realm-manage --realm myrealm --module 
> > org.apache.karaf.jaas.modules.properties.PropertiesLoginModule
> > jaas:update
> > 
> > -  The command jaas:realm-list will include the realm myrealm
> > 
> > karaf@root()> jaas:realm-list
> > Index │ Realm Name │ Login Module Class Name
> > ──────┼────────────┼───────────────────────────────────────────────────────────────
> > 1     │ karaf      │ 
> > org.apache.karaf.jaas.modules.properties.PropertiesLoginModule
> > 2     │ karaf      │ 
> > org.apache.karaf.jaas.modules.publickey.PublickeyLoginModule
> > 3     │ karaf      │ 
> > org.apache.karaf.jaas.modules.audit.FileAuditLoginModule
> > 4     │ karaf      │ org.apache.karaf.jaas.modules.audit.LogAuditLoginModule
> > 5     │ karaf      │ 
> > org.apache.karaf.jaas.modules.audit.EventAdminAuditLoginModule
> > 6     │ myrealm    │ 
> > org.apache.karaf.jaas.modules.properties.PropertiesLoginModule
> > 
> > - Restart the karaf instance
> > The new realm is not listed by the command jaas:realm-list
> > 
> > karaf@root()> jaas:realm-list
> > Index │ Realm Name │ Login Module Class Name
> > ──────┼────────────┼───────────────────────────────────────────────────────────────
> > 1     │ karaf      │ 
> > org.apache.karaf.jaas.modules.properties.PropertiesLoginModule
> > 2     │ karaf      │ 
> > org.apache.karaf.jaas.modules.publickey.PublickeyLoginModule
> > 3     │ karaf      │ 
> > org.apache.karaf.jaas.modules.audit.FileAuditLoginModule
> > 4     │ karaf      │ org.apache.karaf.jaas.modules.audit.LogAuditLoginModule
> > 5     │ karaf      │ 
> > org.apache.karaf.jaas.modules.audit.EventAdminAuditLoginModule
> > karaf@root()>   
> > 
> > Is this bug?
> > 
> > Paul Spencer                                                                
> >                                                                             
> >                                                                             
> >                      
> > 
> 
> 

Reply via email to