This topic has 13 replies, 3 voices, and was last updated 7 years, 1 month ago by [email protected].
-
AuthorPosts
-
May 25, 2015 at 3:22 pm #4234
k.satou
ParticipantHi, 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, 2 months ago by
k.satou.
May 27, 2015 at 4:24 pm #4254Peter Major
ModeratorYou should probably not use the Database (Early Access) Data Store implementation, it’s not really tested/feature complete.
May 27, 2015 at 6:32 pm #4265k.satou
ParticipantThank you Peter.
Do you know when the development is finished?May 27, 2015 at 7:10 pm #4266Peter Major
ModeratorIt’s early access for the past 5+ years, that should be a giveaway. :)
May 27, 2015 at 7:23 pm #4267k.satou
ParticipantOK, Peter Thank you.:-)
I consider using LDAP Data Store.
I’m looking forward to using RDB’s Store!June 26, 2015 at 1:33 pm #4558[email protected]
ParticipantHi 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.June 26, 2015 at 5:43 pm #4559k.satou
ParticipantHi, vuvandung.
I refer to this Japanese site. http://memoyasu.blogspot.jp/2012/11/openam100-mysql.html1. 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 changedmysql> 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_users10. 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.
June 26, 2015 at 8:07 pm #4560[email protected]
ParticipantOh 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
DungJune 29, 2015 at 6:34 am #4570[email protected]
Participanthi 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
ThanksJune 29, 2015 at 10:43 am #4579[email protected]
ParticipantHi K.satou
i used soapUI tool to test registerAPI – 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
July 1, 2015 at 8:21 am #4618[email protected]
ParticipantHi K.satou
Please help me about APi Resr openAM to check exists Email in datastore, or get all attribute of user
ThanksJuly 1, 2015 at 6:20 pm #4622k.satou
ParticipantHi,Dung
“message”: “com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column ‘username’ in ‘field list’”
Please check username is defined in the MySQL table.
Regerds.July 1, 2015 at 6:51 pm #4624[email protected]
Participanthi 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
DungJuly 1, 2015 at 7:00 pm #4625[email protected]
Participanthi K.Satou
If you can help my skype ID: bboypukiu
Thanks you so much .
Dung -
This topic was modified 7 years, 2 months ago by
-
AuthorPosts
You must be logged in to reply to this topic.