Topic
  • 3 replies
  • Latest Post - ‏2013-10-10T13:40:03Z by kark
ievgenzhytnii
ievgenzhytnii
2 Posts

Pinned topic Liberty Profile -> register new user form

‏2013-10-09T14:04:37Z | liberty

Hi all.

I'm developing a web-app with security and need to implement next feature: when the ADMINISTRATORs log in - they should go to the custom jsp with the form where they create a new user - fill login, password, select a group (or create a new one) and submit. I'm using basicRegistry.

And after that - new user should be able to log in to the main application. Can u point me the direction where to read or provide a sample, if this is possible?

 

Thanks.

  • kark
    kark
    26 Posts

    Re: Liberty Profile -> register new user form

    ‏2013-10-10T12:48:56Z  

    Hi,

    You need to have the user/group information already configured in the repository (basicRegistry in this case)  using either the tool (WDT) or editing the server.xml. There are no separate APIs to configure this information in server.xml.

    Once you configure the user/group information and associate those users/groups to the roles to the application in the server.xml they can access the application.

    -- Ajay

  • ievgenzhytnii
    ievgenzhytnii
    2 Posts

    Re: Liberty Profile -> register new user form

    ‏2013-10-10T13:03:50Z  
    • kark
    • ‏2013-10-10T12:48:56Z

    Hi,

    You need to have the user/group information already configured in the repository (basicRegistry in this case)  using either the tool (WDT) or editing the server.xml. There are no separate APIs to configure this information in server.xml.

    Once you configure the user/group information and associate those users/groups to the roles to the application in the server.xml they can access the application.

    -- Ajay

    Thanks for the reply, this is clear. But main question was: can I dynamically add NEW users to server.xml during runtime? The flow is simple: users from role "Admins" have the jsp with form where they create new users: 2 fields - name and password. And button "Create". After filling fields - new user should be added to server.xml and I will log in with these new credentials. Is it possible to do w\o server restart? Or should I use custom registry (like porerty files)?

    Thanks.

  • kark
    kark
    26 Posts

    Re: Liberty Profile -> register new user form

    ‏2013-10-10T13:40:03Z  

    Thanks for the reply, this is clear. But main question was: can I dynamically add NEW users to server.xml during runtime? The flow is simple: users from role "Admins" have the jsp with form where they create new users: 2 fields - name and password. And button "Create". After filling fields - new user should be added to server.xml and I will log in with these new credentials. Is it possible to do w\o server restart? Or should I use custom registry (like porerty files)?

    Thanks.

    Any modifications to users/groups and roles to users/groups mapping in the server.xml will be picked up dynamically - w/o a server restart.

    However, as I mentioned they are no APIs to update the server.xml. But once you update the information (using WDT or manually or your own customized way) they will be picked up by the runtime w/o a server restart.

    --Ajay