Tagged: #OpenAM
This topic has 10 replies, 4 voices, and was last updated 3 years, 2 months ago by [email protected].
-
AuthorPosts
-
June 26, 2015 at 1:11 pm #4557
[email protected]
ParticipantHi all,
Currently I am working with openaM, I am having difficulty in linking between openAM and mysql.
I want to sign in with openAM by user in table database mysql
and when register on openAM the user’s information is added in the User table mysql.
Please help me.
ThankJune 26, 2015 at 8:08 pm #4561[email protected]
ParticipantK.satou help
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 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.
June 26, 2015 at 10:10 pm #4562Rogerio Rondini
ParticipantHi..
So, Would be useful you take a look at the OpenAM debug files. You can check in the files Configuration, Authentication, IdRepo, etcc… and post here.
At.
Rogerio RondiniJune 27, 2015 at 3:46 pm #4564[email protected]
Participanthi Rogerio Rondini
Thank for your help .
DungJune 29, 2015 at 9:32 am #4574ltta1505
ParticipantHi Dung,
Could you please help me to check if the steps above work correctly or not? I’m also finding a way to link OpenAM with existent MySQL database. I’m really grateful if you help me this.
Thanks
June 29, 2015 at 9:56 am #4575[email protected]
Participanthi ltta1505
I’ve tried, and successfully connected
Thanks
DungJune 29, 2015 at 10:15 am #4577ltta1505
ParticipantHi Dung,
I’m still confused from step 4th. Do you have any documents or tutorials which help to clarify these steps? Thanks in advance!
June 29, 2015 at 10:17 am #4578ltta1505
ParticipantHi Dung,
One more thing: could you please give me tutorials which hep to setup a OpenAM sample project working with MySQL database (for Authentication and Authorization purpose)?
Thanks!
June 29, 2015 at 10:48 am #4580[email protected]
Participanthi ltta1505
you can connect openam and mysql with step by step 1..11
if you can help , you add skype : bboypukiu
i hope help you
.
i have connected success mysql with openam , and i can login if user in mysql table
and create user in openam admin console
but i don’t create user from link register of openam , i try fix itsDecember 8, 2016 at 2:37 pm #14726[email protected]
ParticipantHello [email protected],
i have configured, as per you suggestion, after remove In the “data store” tab, delete existing “embedded” the OpenDJ.
I open openam(13.0) console click subject its throw exception, AMUncaughtException
url ==> openam.test.mobi:8080/openam/base/AMUncaughtException
error mag ==> An error occurred while processing this request. Contact your administrator.
what i did:
1. create database,
2. grant privillage,
3. create table,
4. copy mysql-connect.jar to /tomcat/webapps/openam/WEB-INF/lib,
5. restart the tomcat
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: mysql
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”.
Connection Type: Connection is retrieved via programmatic connection
Database DataSource Name: java:comp/env/jdbc/user_db
JDBC Driver URL: jdbc:mysql://127.0.0.1:3306/user_db
Password for Connecting to Database: xxxx
Database User Table Name: auth_users10. In the “data store” tab, delete existing “embedded” the OpenDJ.
goto, openam console, click subject its throw exception
Suggest me, How to can fix this issue.
December 9, 2016 at 7:20 am #14748[email protected]
ParticipantI have fixed AMUncaughtException, i missed to add some tables columns that is what this occur, i fixed this issue, But, after
goto -> “Subject”->”User” tab, press “New” button and configured user details, than, click create a user, it throw error.
follow this link i post a question to forum https://forgerock.org/topic/datasource-change-issue/
December 9, 2016 at 3:08 pm #14762[email protected]
ParticipantSorry, Now i have fixed this issue, i have some miss configured in opanam mysql datasource. Now, its works fine.
-
AuthorPosts
You must be logged in to reply to this topic.