JDBC External User Store Example

rinaldo.wurglitsch@lycos.com's picture
Hallo, Can give someone an example what to enter in the screen "External User Store Configuration". This would be realy great because in the help are no examples and in the blog of Yumani this is not readable. Thx a lot in advance. I have tried this for an Oracle database. It works in general, but no idea what is expected in the SQL statements. Connection URL: jdbc:oracle:thin:@127.0.0.1:1521:orcl Connection user name: scott Connection password: tiger Driver name: oracle.jdbc.driver.OracleDriver -- SQL for retriving a given user's password select user_id from all_users -- SQL for listing users using "like": select username from all_users -- SQL for selecting a single user given the user name select username from all_users -- SQL for retrieving a user list: select distinct username from all_users -- SQL for retrieving a given user's role list: select granted_role from USER_ROLE_PRIVS -- SQL for retrieving users in a Role: select username from USER_ROLE_PRIVS -- SQL for listing the role list: select distinct granted_role from USER_ROLE_PRIVS
dimuthul's picture

Hi, Please find an example

Hi, Please find an example at http://wso2.org/library/news/blog-post Thank you, Dimuthu L
yumani's picture

SQL statements for JDBC user store

Sorry, There's some problem in http://wso2.org/library/news/blog-post. Its not directing to the story correctly. We'll fix it. Until then here are the SQL statements required. Use in the same order given. I hope you are using IS 2.0.1. // JDBC Store Properties (e.g for mysql) Connection URL* = jdbc:mysql://hostname:3306/um_database Connection user name = user_name Connection password = password Connection password repeat =password Driver name* = com.mysql.jdbc.Driver // User Information select password from users where username=? select username from users where username like ? select username from users where username=? select username from users // Role Information select rolename from userroles where username=? select username from userroles where rolename=? select rolename from userroles // User Attribute Information select * from userprofiles where username=? and profilename='default' select distinct profilename from userprofiles where username=? select * from userprofiles where username=? and profilename=?
library project main code
Learn Cloud
Learn
Cloud

The WSO2 Application Server is a reliable application server that can host your enterprise web applications. The WSO2 Application Server as a Service is offered in StratosLive, the WSO2 Platform as a Service. This article explains how a simple web application can be developed and deployed from Carbon Studio to the WSO2 Application Server...

Latest Webinar
Different groups within an organization need to monitor different Key Performance Indicators (KPIs) - An operations team will be interested in the response times of business services and loads of each service,..
Thursday, February 9th 2012, 09.00 AM (PST)

Thursday, February 9th 2012, 10.00 AM (GMT)