Hi Paul It's not a bug, that's an expected behavior: the JAAS configuration created by the commands is stored "in memory". If you want to persist, you have to use blueprint jaas namespace (in the deploy folder for instance).
I plan to remove this "requirement" for Karaf 4.5.x using another storage layer that the shell commands can populate/read and also the security feature at bootstrap. Regards JB On Tue, Jan 30, 2024 at 9:21 PM Paul Spencer <[email protected]> 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
