Automate User Account Creation
It will be possible for you to automatically create user accounts in a number of ways:
1) Via jdbc / SQL
In the internal Nesstar-database, there is a table called "UserEJB".
This table contains information about users
(user-ID, name, password*, comment and a couple of date-fields)
The roles (admin/publisher/authorisedUser, etc) live in another table; "RoleEJB".
Since there is a N:M-relationship between users and possible roles, the
two tables are tied together in a third table "Userrole".
So - basically you can create insert-statements that inserts new users
in the "UserEJB"-table, and the "Userrole"-table simultaneously. Out of
the box there aren't many roles to choose from, so this is straightforward.
Using this method you could develop your own solution altogether; the
only thing you need is the port/login-credentials to MySQL in order to
create the JDBC-connection.
If you run Nesstar with embedded MySQL, this will only respond to calls
on "localhost"; networking is disabled for security reasons. Unless you
want to change that, the user-generating code must actually run on the
Nesstar-box. If you create a webapp (or even a simple set of jsp-pages
to create the users), they could run inside Nesstar (which uses JBoss
which in turn uses Tomcat).
2) Via a URL
Creation of users may actually be expressed as a URL. Nesstar is a
RESTful WS in a sense that objects may be accessed and manipulated via
The following URL will create a user named "ornulf" with password
"ornulfspassword" and the role "publisher" on our test-server:
http://126.96.36.199/obj/aUserHome/UserHome?http%3A%2F%2Fwww.nesstar.org%2Frdf%2Fmethod=http%3A%2F%2Fwww.nesstar.org%2Frdf%2Facu%2FUserHome%2Fcreate&language=no&http%3A%2F%2Fwww.nesstar.org%2Frdf%2Facu%2FUserHome%2Fcreate%23comment =Auto- generated+user&http%3A%2F%2Fwww.nesstar.org%2Frdf%2Facu%2FUserHome%2Fcreate%23id=ornulf&http%3A%2F%2Fwww.nesstar.org%2Frdf%2Facu%2FUserHome%2Fcreate%23label=%C3%98rnulf+Risnes&http%3A%2F%2Fwww.nesstar.org%2Frdf%2Facu%2FUserHome%2Fcreate%23password=ornulfspassword&http%3A%2F%2Fwww.nesstar.org%2Frdf%2Facu%2FUserHome%2Fcreate%23purposeid=&http%3A%2F%2Fwww.nesstar.org%2Frdf%2Facu%2FUserHome%2Fcreate%23roleid=publisher
Now - calling such a URL will of course trigger a login-challenge in
most setups, so it can be hard to do out of the box, as the
createUser-action requires high privileges.
But - since you have plugins in the Nesstar-security setup, you /could/
probably let calls from specific addresses pass the creatUser-auth.
3) Via the Java-based Nesstar-API.
Using this method, you would also have to log in, but you can do it programmatically.
We can supply code-samples if you want, but basically coding this in
Java would require the following steps (very simplified, and probably
not entirely correct - but not far from the truth):
//Init Server nesstar.api.Server server = new Server("http://myserver.net/");
//Log in programmatically server.login("adminuser", "adminpassword");
//Obtain UserHome where users are created UserHome userHome = server.getUserHome();
//Create a new user userHome.create("aUserComment", "aUserId", "aUserName", "aUserPassword", "authorisedUser")
This code can be called remotely, because the Nesstar API runs over http.
Let us know what method suits you best, and we'll help where it's needed.
In Nesstar 4, the User-id is logged in the regular weblogs, e.g.
"localhost_access2008-11-04.log", so you will be able to identify all a
*) Currently unencrypted. We're working on a solution for this.