Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 433541
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T20:11:04+00:00 2026-05-12T20:11:04+00:00

Here is the issue, The JAAS realm connects to the database fine, the user

  • 0

Here is the issue,

The JAAS realm connects to the database fine, the user name and password match, the session is authenticated. HOWEVER, none of the roles seem to be getting into the Principal. Tomcat’s isInUserRole returns false for every role, and tomcat security doesn’t see them either.

Here is the realm configuration in the Server.xml

<Realm  className="org.apache.catalina.realm.JAASRealm"
        appName="TomcatTimedLogin"
        userClassName="com.tagish.auth.TypedPrincipal"
        roleClassNames="org.ovasp.java.jaas.RolePrincipal" />

Here is the login.config

TomcatTimedLogin
{
    org.owasp.java.jaas.TomcatTimedLogin required
    useDS=true
    dsJNDI="jdbc/resourceName"
        dbDriver="com.microsoft.sqlserver.jdbc.SQLServerDriver" 
        dbURL="jdbc:sqlserver://server\\DBSERVER;databaseName=DBName"
        dbUser="username"
        dbPassword="password"
        debug=true 
        loginTable="loginTable" 
        clippingLevel="3" 
        interval="10"
        loginQuery="SELECT UserID,Password FROM Users WHERE LogonUserName=? AND RetirementDate is null"
        rolesQuery="SELECT Role.RoleDescription FROM User_Role,Role WHERE User_Role.UserID=? AND User_Role.RoleID=Role.RoleID";
};

And in catalina.properties I refer to the configuration like this

java.security.auth.login.config=file:///C:/config/login.config

When start the application I do get the following message in the Debug output, not sure why as all classes should be accessible by the server

SEVERE: Class org.ovasp.java.jaas.RolePrincipal not found! Class not added.

Any help would be appreciated. I have already read post after post and tutorial after tutorial, and those who do have this problem, don’t have solution posted.

Btw, I am using Tomcat 5.5, not my choice, legacy code, you know how it is! I also using the OWASP login module (OWASPJaasLoginModule.jar). This jar file is located in the server/lib directory.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T20:11:04+00:00Added an answer on May 12, 2026 at 8:11 pm

    Okay… I solved it myself… again, VERY STUPID! If this was my code I would be mad at myself, but it is not, and after 4 days of screwing around with this app, I am close to fed up. The problem was that the CLASS is not

    org.ovasp.java.jaas.RolePrincipal
    

    its

    org.owasp.java.jaas.RolePrincipal
    

    STUPID!!!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am having some weird issue here. I have a database table which has
So the issue here is when I create one animated projectile, everything is fine.
I have a strange issue here with my Django app. I implemented the user
The issue here is that when my user logs into my app, they always
after getting my answer here: Database issue, how to store changing data structure i
My issue here is quite simple : i'm trying to use the jQuery validate
Having an issue here that I have tried everything I can think of but
I have a rather annoying issue here I can't get my CheckBox CheckedChange event
I'm having a small issue here: <div id=navbar> <ul id=navtabs class=floatcontainer> <li <?php if
I have a curious issue here In my ejbCreate() method from where i insert

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.