You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Jean-Baptiste Onofré (Jira)" <ji...@apache.org> on 2020/10/08 13:22:00 UTC

[jira] [Assigned] (KARAF-6708) Replicating default PropertiesLoginModule configuration does not work on Windows

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

Jean-Baptiste Onofré reassigned KARAF-6708:
-------------------------------------------

    Assignee:     (was: Jean-Baptiste Onofré)

> Replicating default PropertiesLoginModule configuration does not work on Windows
> --------------------------------------------------------------------------------
>
>                 Key: KARAF-6708
>                 URL: https://issues.apache.org/jira/browse/KARAF-6708
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf
>    Affects Versions: 4.1.4
>         Environment: OS Name: Microsoft Windows 10 Enterprise
> Version: 10.0.18363 Build 18363
> java version "1.8.0_201"
> Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
> Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)
>            Reporter: Robert Schulte
>            Priority: Major
>         Attachments: BackingEngineFactoryDebugger.jpg, custom-realm.xml
>
>
> h2. Steps to Reproduce
>  * Start Karaf 4.1.4 on Windows
>  * Put [^custom-realm.xml] in the hot deployment directory. This is more or less the minimal example for PropertiesLoginModule that is documented in the [Manual|https://karaf.apache.org/manual/latest/#_available_realm_and_login_modules]
>  * In the Karaf shell, use *jaas:realm-manage --index 6* followed by *jaas:user-list* to obtain the list of users.
>  * compare the output to the results for the default PropertiesLoginModule (use *jaas:realm-manage --index 1* followed by *jaas:user-list*)
> h2. Expected Behavior
> The outputs should match
> h2. Actual Results
> The replicated PropertiesLoginModule configuration returns an empty listing. This seems to be the normal result, when the users-file is not found.
> I get this output:
> {noformat}
> karaf@root()> env karaf.etc
> String          karaf.etc       C:\r1\t1\n1\2\apache-karaf-4.1.4\etc
> 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     | my-realm   | org.apache.karaf.jaas.modules.properties.PropertiesLoginModule
> karaf@root()> jaas:realm-manage --index 6
> karaf@root()> jaas:user-list
> User Name | Group | Role
> ----------+-------+-----
> karaf@root()> jaas:realm-manage --index 1 --force
> karaf@root()> jaas:user-list
> User Name | Group      | Role
> ----------+------------+--------------
> karaf     | admingroup | admin
> karaf     | admingroup | manager
> karaf     | admingroup | viewer
> karaf     | admingroup | systembundles
> karaf     | admingroup | ssh
> {noformat}
> h2. Additional Information
> The problematic part is the {{users}} configuration in [^custom-realm.xml]
> Compare
> {noformat}
> karaf@root()> env karaf.etc
> String          karaf.etc       C:\r1\t1\n1\2\apache-karaf-4.1.4\etc
> {noformat}
> to the values obtained when debugging PropertiesBackingEngineFactory:
>  !BackingEngineFactoryDebugger.jpg!
> This issue seems to have existed in the past (KARAF-2226), but the described workaround does not exist anymore and was deleted from the documentation (KARAF-3162)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)