users@glassfish.java.net

Re: JAAS jdbcRealm error

From: <glassfish_at_javadesktop.org>
Date: Sun, 30 Sep 2007 20:32:24 PDT

As promised here is the SQL script I've been using.
Note: I am storing MD5 digests of the passwords. That's why the "bootstrapped" Administrator has a funny looking password value

create table USERTABLE(
        USERID varchar(32) NOT NULL CONSTRAINT USER_PK PRIMARY KEY ,
        PASSWORD varchar(32) NOT NULL
        );
create table GROUPTABLE(
        USERID varchar(32) NOT NULL,
        GROUPID varchar(32) NOT NULL,
        CONSTRAINT GROUP_FK PRIMARY KEY(USERID, GROUPID),
        CONSTRAINT USER_FK FOREIGN KEY(USERID) REFERENCES USERTABLE(USERID)
            ON DELETE CASCADE ON UPDATE RESTRICT
    );
create table USERINFOTABLE(
            USERID varchar(32) NOT NULL,
            FIRSTNAME varchar(32),
            LASTNAME varchar(32),
            EMAIL varchar(100),
            CONSTRAINT USERINFO_FK FOREIGN KEY(USERID) REFERENCES USERTABLE(USERID)
            ON DELETE CASCADE ON UPDATE RESTRICT
);
insert into USERTABLE(USERID,PASSWORD)
    values ('admin', '21232f297a57a5a743894a0e4a801fc3');
insert into GROUPTABLE(USERID,GROUPID) values ('admin', 'USERS');
insert into GROUPTABLE(USERID,GROUPID) values ('admin', 'ADMINISTRATORS');
insert into USERINFOTABLE(USERID,FIRSTNAME,LASTNAME,EMAIL) values ('admin', 'delete or edit me', 'password is admin', '');
[Message sent by forum member 'bnevins' (bnevins)]

http://forums.java.net/jive/thread.jspa?messageID=237764