This topic has 13 replies, 3 voices, and was last updated 7 years, 5 months ago by [email protected].

  • Author
  • #4234

    Hi, All.
    I was successful in set up UserStore of RDB(PostgreSQL), confirmed that Users can be registed by Admin Console.Of course I know “Early Access”.
    Then I try to control users by REST API, but several issues arise.
    My results using REST API + RDB were as follows.

      – User search

    eg. curl -v -H “iplanetDirectoryPro: ***”

      ・User already exist


      ・User not exist


      – User Remove

    curl -v –request DELETE -H “iplanetDirectoryPro: ***”

      ・User already exist


      ・User not exit

    same result

      User Update

    curl -v –request PUT -H “iplanetDirectoryPro:***” -H “Accept: application/json” -H “Content-Type: application/json; charset=UTF-8” –data “{¥”telnumber¥”: ¥”0999999999¥”, ¥”onetimeAddress¥”: ¥”[email protected]¥”}”

      ・User already exist


      ・User not exist

    same result

    What are problems?

    • This topic was modified 7 years, 6 months ago by k.satou.
     Peter Major

    You should probably not use the Database (Early Access) Data Store implementation, it’s not really tested/feature complete.


    Thank you Peter.
    Do you know when the development is finished?

     Peter Major

    It’s early access for the past 5+ years, that should be a giveaway. :)


    OK, Peter Thank you.:-)

    I consider using LDAP Data Store.
    I’m looking forward to using RDB’s Store!


    Hi K.Satou and Peter Major
    I want to connect openAM with mysql from localhost ,
    and if i login openAM then user check from ‘opensso_usser’ table in mysql database
    and if i register openAM user then i want user insert into ‘opensso_usser’ table in mysql database

    . If K.satou have connect with postgres database i think you can help me with mysql database
    Please help me.


    Hi, vuvandung.
    I refer to this Japanese site.

    1. Start the MySQL Command Line Client, create the database for the user.

    mysql> create database user_db;

    2. Create the user “db_user” to access the database for the user.

    mysql> grant select,insert,delete,update,create,drop,file,
    -> alter,index on *.* to db_user identified by ‘password’;

    3. Create the table “auth_users” for storing user information to user_db database.

    mysql> use user_db;
    Database changed

    mysql> create table auth_users(uid varchar(50),cn varchar(50),inetuserstatus va
    rchar(20),userpassword varchar(50),ChangePassword varchar(50),mail varchar(50),s
    unIdentityMSISDNNumber varchar(50),sn varchar(50),manager varchar(50),preferredl
    ocale varchar(10),iplanet_am_user_password_reset_force_reset varchar(50),givenna
    me varchar(50),iplanet_am_user_alias_list varchar(50),iplanet_am_user_account_li
    fe varchar(50),telephonenumber varchar(50),employeenumber varchar(50),iplanet_am
    _user_auth_config varchar(50),postaladdress varchar(50),iplanet_am_user_password
    _resetoptions varchar(50),iplanet_am_user_password_reset_question_answer varchar
    (50),iplanet_am_user_success_url varchar(50),iplanet_am_user_failure_url varchar

    4. Copy the MySQL connector “mysql-connector-java-5.1.22-bin.jar” to the following directory OpenAM deployed. or set to class path.


    5. Restart the Glassfish.

    6. Login to OpenAM Management Console.

    7. “Access Control” -> “/(Top level realm)”->”Datastore”

    8. Press the “New” button. In “Step 1/2 Select the type of data store”, you set the following. After setting, you press the “Next”.

    Name: any data
    Type: database repository(Early Access)

    9. In “Step 2/2 the new data store in a database repository(Early Access)”, perform the MySQL settings. After setting you press the “End”.

    ・Password to connect to the database: ***
    ・JDBC driver URL: jdbc:mysql:
    ・User to connect to the database: db_user
    ・User table name of the database : auth_users

    10. In the “data store” tab, delete existing “embedded” the OpenDJ.

    11. “Subject”->”User” tab, press “New” button to create a user. Normally to ensure that the user is created.



    Oh my god!
    Hi K.satou ,
    thank you very very much for your help with this, I have followed your instructions and success.
    again thank you


    hi K.satou
    I have problem
    i use my registry openAm and clicking on the registration link of openam send mail, and I entered to fied form and click send but can not create users.
    previously when not connected to the register mysql still works
    Can you help me


    Hi K.satou
    i used soapUI tool to test register

    API – REST
    –request POST
    –header “Content-Type: application/json”
    “email”: “[email protected]”,
    “tokenId”: “yA26LZ6SxFEgNuF86/SIXfimGlg=”,
    “confirmationId”: “f4x0Dh6iZCXtX8nhiSb3xahNxrg=”,
    “username”: “newuser”,
    “userpassword”: “password”
    and have error
    “code”: 404,
    “reason”: “Not Found”,
    “message”: “com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column ‘username’ in ‘field list'”

    . and user link from openam send to mail , also not register

    Please help me


    Hi K.satou
    Please help me about APi Resr openAM to check exists Email in datastore, or get all attribute of user



    “message”: “com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column ‘username’ in ‘field list’”

    Please check username is defined in the MySQL table.


    hi k.satou
    You can help me , i need APi REst check Email exists in mysql .
    and i have many problem , i know need read ebook, but now i have little time .
    I have problem :
    1: I need code client (website or application ) call button facebook login and save to database
    2: APi check email of user register . if Email exist in database then do not register .
    3: i don’t understant , in OpenAM , i used APi register with just one Email but register many account.
    Can you give me your skype ?
    Thanks for your help


    hi K.Satou
    If you can help my skype ID: bboypukiu
    Thanks you so much .

Viewing 14 posts - 1 through 14 (of 14 total)

You must be logged in to reply to this topic.

©2022 ForgeRock - we provide an identity and access platform to secure every online relationship for the enterprise market, educational sector and even entire countries. Click to view our privacy policy and terms of use.

Log in with your credentials

Forgot your details?