Login failed: Not Authorized

644 views
Skip to first unread message

swapni...@flowian.com

unread,
Oct 31, 2015, 12:08:29 PM10/31/15
to jBPM Development
           
        Hello I made following changes in standalone.xml and standalone-full.xml in jboss configuration folder for JBoss Wildfly - database login module.
       
        <security-domain name="other" cache-type="default">
                   <authentication> 
                        <login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule" flag="required"> 
                            <module-option name="dsJndiName" value="java:jboss/datasources/jbpmDS"/> 
                            <module-option name="principalsQuery" value="select PASSWORD from PRINCIPALS where PRINCIPALID=?"/> 
                            <module-option name="rolesQuery" value="select ROLE, ROLEGROUP from ROLES where PRINCIPALID=?"/> 
                        </login-module> 
                    </authentication> 
        </security-domain> 
       
        I have table with names PRINCIPALS which contain the PRINCIPALID,PASSWORD column and record is swaps swaps.
        I have another table with names ROLEGROUP which contain the PRINCIPALID,ROLE,ROLEGROUP column and record is swaps admin admin
       
        I made logger trace using following configuration in standalone.xml and standalone-full.xml file
       
        <logger category="org.jboss.security">
                <level name="TRACE"/>
        </logger>
       
        I got following log trace when I tried to login in jbpm console using user name swaps and password swaps
       
       
2015-10-31 21:33:56,644 TRACE [org.jboss.security] (default task-1) PBOX000200: Begin isValid, principal: swaps, cache entry: null
2015-10-31 21:33:56,645 TRACE [org.jboss.security] (default task-1) PBOX000209: defaultLogin, principal: swaps
2015-10-31 21:33:56,668 TRACE [org.jboss.security] (default task-1) PBOX000221: Begin getAppConfigurationEntry(other), size: 3
2015-10-31 21:33:56,696 TRACE [org.jboss.security] (default task-1) PBOX000224: End getAppConfigurationEntry(other), AuthInfo: AppConfigurationEntry[]:
[0]
LoginModule Class: org.jboss.security.auth.spi.DatabaseServerLoginModule
ControlFlag: LoginModuleControlFlag: required
Options:
name=principalsQuery, value=select PASSWORD from PRINCIPALS where PRINCIPALID=?
name=dsJndiName, value=java:jboss/datasources/jbpmDS
name=rolesQuery, value=select ROLE, ROLEGROUP from ROLES where PRINCIPALID=?

2015-10-31 21:33:56,702 TRACE [org.jboss.security] (default task-1) PBOX000236: Begin initialize method
2015-10-31 21:33:56,703 TRACE [org.jboss.security] (default task-1) PBOX000262: Module options [dsJndiName: java:jboss/datasources/jbpmDS, principalsQuery: select PASSWORD from PRINCIPALS where PRINCIPALID=?, rolesQuery: select ROLE, ROLEGROUP from ROLES where PRINCIPALID=?, suspendResume: true]
2015-10-31 21:33:56,703 TRACE [org.jboss.security] (default task-1) PBOX000240: Begin login method
2015-10-31 21:33:56,739 TRACE [org.jboss.security] (default task-1) PBOX000263: Executing query select PASSWORD from PRINCIPALS where PRINCIPALID=? with username swaps
2015-10-31 21:33:56,742 TRACE [org.jboss.security] (default task-1) PBOX000241: End login method, isValid: true
2015-10-31 21:33:56,743 TRACE [org.jboss.security] (default task-1) PBOX000242: Begin commit method, overall result: true
2015-10-31 21:33:56,743 TRACE [org.jboss.security] (default task-1) PBOX000263: Executing query select ROLE, ROLEGROUP from ROLES where PRINCIPALID=? with username swaps
2015-10-31 21:33:56,748 TRACE [org.jboss.security] (default task-1) PBOX000263: Executing query select ROLE, ROLEGROUP from ROLES where PRINCIPALID=? with username swaps
2015-10-31 21:33:56,786 TRACE [org.jboss.security] (default task-1) PBOX000210: defaultLogin, login context: javax.security.auth.login.LoginContext@64399aa2, subject: Subject(1514234376).principals=org.jboss.security.SimplePrincipal@2064777282(swaps)org.jboss.security.SimpleGroup@2055940482(admin(members:admin))org.jboss.security.SimpleGroup@2055940482(CallerPrincipal(members:swaps))
2015-10-31 21:33:56,787 TRACE [org.jboss.security] (default task-1) PBOX000207: updateCache, input subject: Subject(1514234376).principals=org.jboss.security.SimplePrincipal@2064777282(swaps)org.jboss.security.SimpleGroup@2055940482(admin(members:admin))org.jboss.security.SimpleGroup@2055940482(CallerPrincipal(members:swaps)), cached subject: Subject(416114978).principals=org.jboss.security.SimplePrincipal@2064777282(swaps)org.jboss.security.SimpleGroup@2055940482(admin(members:admin))org.jboss.security.SimpleGroup@2055940482(CallerPrincipal(members:swaps))
2015-10-31 21:33:56,788 TRACE [org.jboss.security] (default task-1) PBOX000208: Inserted cache info: org.jboss.security.authentication.JBossCachedAuthenticationManager$DomainInfo@2cc9bd6
2015-10-31 21:33:56,789 TRACE [org.jboss.security] (default task-1) PBOX000201: End isValid, result = true
2015-10-31 21:33:56,883 WARN  [ErraiMarshalling] (default task-1) static marshallers were not found.
2015-10-31 21:33:56,886 WARN  [ErraiMarshalling] (default task-1) using dynamic marshallers. dynamic marshallers are designed for development mode testing, and ideally should not be used in production. *
2015-10-31 21:33:57,001 TRACE [org.jboss.security] (EJB default - 3) PBOX000354: Setting security roles ThreadLocal: {}
2015-10-31 21:33:57,005 TRACE [org.jboss.security] (EJB default - 3) PBOX000354: Setting security roles ThreadLocal: null
2015-10-31 21:33:58,507 TRACE [org.jboss.security] (EJB default - 2) PBOX000354: Setting security roles ThreadLocal: {}
2015-10-31 21:33:58,523 TRACE [org.jboss.security] (EJB default - 2) PBOX000354: Setting security roles ThreadLocal: null
2015-10-31 21:33:58,724 INFO  [org.uberfire.backend.server.security.adapter.WeblogicGroupsAdapter] (default task-1) Unable to find weblogic.security.Security, disabling weblogic adapter
2015-10-31 21:33:58,733 INFO  [org.uberfire.backend.server.security.adapter.WebSphereGroupsAdapter] (default task-1) Unable to look up UserRegistry in JNDI under key 'UserRegistry', disabling websphere adapter
2015-10-31 21:33:58,757 TRACE [org.jboss.security] (default task-2) PBOX000200: Begin isValid, principal: swaps, cache entry: org.jboss.security.authentication.JBossCachedAuthenticationManager$DomainInfo@2cc9bd6
2015-10-31 21:33:58,757 TRACE [org.jboss.security] (default task-2) PBOX000204: Begin validateCache, domainInfo: org.jboss.security.authentication.JBossCachedAuthenticationManager$DomainInfo@2cc9bd6, credential class: class [C
2015-10-31 21:33:58,759 TRACE [org.jboss.security] (default task-2) PBOX000205: End validateCache, result = true
2015-10-31 21:33:58,759 TRACE [org.jboss.security] (default task-2) PBOX000201: End isValid, result = true
2015-10-31 21:33:58,785 TRACE [org.jboss.security] (default task-2) PBOX000354: Setting security roles ThreadLocal: null
2015-10-31 21:33:58,825 TRACE [org.jboss.security] (default task-3) PBOX000200: Begin isValid, principal: swaps, cache entry: org.jboss.security.authentication.JBossCachedAuthenticationManager$DomainInfo@2cc9bd6
2015-10-31 21:33:58,826 TRACE [org.jboss.security] (default task-3) PBOX000204: Begin validateCache, domainInfo: org.jboss.security.authentication.JBossCachedAuthenticationManager$DomainInfo@2cc9bd6, credential class: class [C
2015-10-31 21:33:58,826 TRACE [org.jboss.security] (default task-3) PBOX000205: End validateCache, result = true
2015-10-31 21:33:58,826 TRACE [org.jboss.security] (default task-3) PBOX000201: End isValid, result = true

and jbpm console says Login failed: Not Authorized ...?
can you solution on it..?
       
       
       
           

William Gonçalves

unread,
Jun 28, 2016, 8:38:37 AM6/28/16
to jBPM Development
Hello,

You have the solution to this problem? Login faied: Not Authorized??

My standalone is much like yours.

Tks,

William Gonçalves
Reply all
Reply to author
Forward
0 new messages