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

  • Author
    Posts
  • #4234
     k.satou
    Participant

    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: ***” http://openam.test.co.jp:8080/OpenAM-12.0.0/json/users/test

      ・User already exist

    {“username”:”aa”,”realm”:”/”,”uid”:[“aa”],”sunIdentityMSISDNNumber”:[],”manager”:[],”preferredlocale”:[],”givenname”:[“aa”],”iplanet-am-user-password-reset-question-answer”:[],”telephonenumber”:[“09000000000”],…..}

      ・User not exist

    {“username”:”test”,”realm”:”/”,”universalid”:[“id=aaa,ou=user,dc=openam,dc=forger
    ock,dc=org”]}

      – User Remove

    eg.
    curl -v –request DELETE -H “iplanetDirectoryPro: ***” http://openam.test.co.jp:8080/OpenAM-12.0.0/json/users/test

      ・User already exist

    {“success”:”true”}

      ・User not exit

    same result

      User Update

    eg.
    curl -v –request PUT -H “iplanetDirectoryPro:***” -H “Accept: application/json” -H “Content-Type: application/json; charset=UTF-8” http://openam.test.co.jp:8080/OpenAM-12.0.0/json/users/test –data “{¥”telnumber¥”: ¥”0999999999¥”, ¥”onetimeAddress¥”: ¥”[email protected]¥”}”

      ・User already exist

    {“username”:”test”,”realm”:”/”,”universalid”:[“id=test,ou=user,dc=openam,dc=forg
    erock,dc=org”]}

      ・User not exist

    same result

    What are problems?
    Regard.

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

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

    #4265
     k.satou
    Participant

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

    #4266
     Peter Major
    Moderator

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

    #4267
     k.satou
    Participant

    OK, Peter Thank you.:-)

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

    #4558

    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.

    #4559
     k.satou
    Participant

    Hi, vuvandung.
    I refer to this Japanese site. http://memoyasu.blogspot.jp/2012/11/openam100-mysql.html

    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
    (50));

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

    D:\glassfish\domains\domain1\applications\j2ee-modules\opensso\WEB-INF\lib

    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:127.0.0.1:3306/user_db
    ・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.

    Regards.

    #4560

    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
    Dung

    #4570

    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
    Thanks

    #4579

    Hi K.satou
    i used soapUI tool to test register

    API – REST
    –request POST
    –header “Content-Type: application/json”
    –data
    ‘{
    “email”: “[email protected]”,
    “tokenId”: “yA26LZ6SxFEgNuF86/SIXfimGlg=”,
    “confirmationId”: “f4x0Dh6iZCXtX8nhiSb3xahNxrg=”,
    “username”: “newuser”,
    “userpassword”: “password”
    }’
    https://openam.example.com:8443/openam/json/users?_action=anonymousCreate
    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

    #4618

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

    #4622
     k.satou
    Participant

    Hi,Dung

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

    Please check username is defined in the MySQL table.
    Regerds.

    #4624

    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
    Dung

    #4625

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

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?