0
votes

Steps tha i have performed.

  1. Login into AEM as a admin user
  2. Create new user example “localadmin”
  3. Assign the “localadmin” user to administrators group
  4. Go to the system/console/configMgr/ Search for “Apache Sling Web Console Security Provider” configuration
  5. Add the “localadmin” user in “User Names”
  6. Login with localadmin user go to the system/console/configMgr/
  7. Search for the “Apache Sling Jcr Installer”
  8. Delete the configuration. Wait for some time you will be automatically logged out from the Felix console.
  9. Login back with admin user and verify the “Apache Sling Web Console Security Provider” configuration. The user gets removed from the configuration.

    Is this is the correct behavior.?

    And here raises a big question if I delete the “admin” username from the “Apache Sling Web Console Security Provider” configuration, how to access Felix console and also how to restore back the default or admin user to the configuration. enter image description here enter image description here enter image description here

1

1 Answers

0
votes

Its absolutely the expected behavior which is bound to configurations, here is what happens -

  • When you added a user to “Apache Sling Web Console Security Provider”, it saved your config changes under /apps/system/config/org.apache.sling.extensions.webconsolesecurityprovider.internal.SlingWebConsoleSecurityProvider.config
  • The above behavior is driven by the settings in “Apache Sling Jcr Installer”, look at the property New Config Path which has value system/config, thats why your config changes get saved to /apps/system/config
  • When you deleted the configurations for the “Apache Sling Jcr Installer” it reverted back to Sling Behavior (earlier it was AEM specific settings) in which your New Config Path now points to sling/install
  • With the above change in effect, “Apache Sling Web Console Security Provider” no longer picks the configuration changes you made and picks up the config from sling/install (i believe this is more of sling classpath location to pick properties resources but then not sure where physically you will find this property file)

To answer your question on how to revert back, there is no automatic way to do this if you delete the configuration. You will have to manually set the values to the previous ones.

That said the correct approach to override these properties is to provide your configurations values as sling:OsgiConfig which will override the default properties and if your remove your config the system will revert back to the default ones (i believe so, haven't verified this myself)