unable to configure realms

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

unable to configure realms

shubham_dev
This post has NOT been accepted by the mailing list yet.
Hello,

I am new to Apache shiro.I was trying to configure realms through shiro.ini file below

[main]
securityManager.sessionManager.globalSessionTimeout = 1800000
jdbcRealm = org.apache.shiro.realm.jdbc.JdbcRealm

# configuring data source
datasource = com.tutorial.SecurityRealms
datasource.driverClass = org.postgresql.Driver
datasource.jdbcUrl = jdbc:postgresql://localhost:5432/mySchema
datasource.username = vnet
datasource.password = vnet

# attachig datasource to jdbc Realm
jdbcRealm.dataSource = $datasource


# setting the realm to security manager
securityManager.realms = $jdbcRealm


# -----------------------------------------------------------------------------
# Users and their (optional) assigned roles
# username = password, role1, role2, ..., roleN
# -----------------------------------------------------------------------------

[users]
root = secret, admin
guest = guest, guest
presidentskroob = 12345, president
darkhelmet = ludicrousspeed, darklord, schwartz
#lonestarr = vespa, goodguy, schwartz

# -----------------------------------------------------------------------------
# Roles with assigned permissions
# roleName = perm1, perm2, ..., permN
# -----------------------------------------------------------------------------
[roles]
admin = *
schwartz = lightsaber:*
goodguy = winnebago:drive:eagle5

But It is not picking my realms .
I am getting following exception
java.lang.IllegalStateException: Configuration error:  No realms have been configured!  One or more realms must be present to execute an authentication attempt.

shiro.ini is present in classpath.Then I try to configure realm with your sample quick start application with same shiro.ini file but it is not picking realm there also there it is picking by default IniRealm

Can you help me please . Am I missing something or doing something wrong?

Regards
Shubham
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: unable to configure realms

armandoxxx
Check here   if you have configured it all

or first couple of links on search query

search query

regards

Armando
Loading...