7 Replies Latest reply on Mar 26, 2008 2:25 PM by pmn92

    JBOSS User API?

    johnboy

      I want to create a large group of users all at once from a table with the different roles and check another database to see if the users exist there, if not create them in the second database. To do this it seems like there should be an API that I can use to create/remove users in the JBOSS database.



      I see an API that tells me the users ID/roles when a user tries to access a portlet in the portal. But nothing I can use to create/delete/query users in the JBOSS portal.



      Does someone know of a API for this? What am I missing?



      If I am not asking this or looking at the problem wrong please let me know I assume someone has run into this before.




      Thanks.



        • 1. Re: JBOSS User API?

          I had to worked around the issue by remapping the table jbp_users and jbp_roles - so I worked directly with the database.

          There is probably a better way to do this, I am interested to find out.

          • 2. Re: JBOSS User API?
            theute

            Look at: *Module in http://docs.jboss.com/jbportal/v2.6.4/javadoc/org/jboss/portal/identity/package-summary.html

            And never access the tables directly, it could lead to data inconsistency.

            • 3. Re: JBOSS User API?
              johnboy

              Thanks this seems like a strong possibility. I am going to play around with it.

              I assume I have access to this package.

              Are there any legal issues in using this or is all LGPL covering it?
              Do you know are there any examples of using this package out there floating around?

              • 4. Re: JBOSS User API?
                theute

                Look at the core-identity portlets

                All JBoss Portal code is LGPL

                • 5. Re: JBOSS User API?

                  In my case the master copy of users will never be managed by jbp, so as long as users are kept in jbp database it's just another copy to synchronize with the master copy. Thanks for the advice to "never" do this but using yet another api means rewriting a tool that works already for years and before jbp (jbp is not the central piece)

                  • 6. Re: JBOSS User API?
                    theute

                    That's why you can write custom modules to adapt to your identity server and manage the users the way you want.

                    But again. it's not what this topic was about and it doesn't help the initial author of the topic.

                    • 7. Re: JBOSS User API?

                      I manage two types of environments (LDAP that take cares of distribution) and a MASTER/SLAVE copy that relies on file distribution and database conversion.
                      It is a deployment choice based on proven tools.
                      I understand that JBP offers custom modules but for me it is irrelevant : direct access to the database is the only alternative.