[JBoss Portal] - How to configurate the GateIn3.4 & JBossAS7 SSO login
by halbert
halbert [https://community.jboss.org/people/halbert] created the discussion
"How to configurate the GateIn3.4 & JBossAS7 SSO login"
To view the discussion, visit: https://community.jboss.org/message/759326#759326
--------------------------------------------------------------
There is some document which guide me to configure the GateIn3.2 & JBossAS 6 , but the document is not fit for JBoss7 & GateIn3.4. I search my document and I have configurated the standalone.xml as following
1) change standalone.xml
| | <security-domain name="gatein-domain" cache-type="default"> |
| | <authentication> |
| | <login-module code="org.gatein.wci.security.WCILoginModule" flag="optional"> |
| | <module-option name="portalContainerName" value="portal"/> |
| | <module-option name="realmName" value="gatein-domain"/> |
| | </login-module> |
| | <login-module code="org.exoplatform.services.security.jaas.SharedStateLoginModule" flag="required"> |
| | <module-option name="portalContainerName" value="portal"/> |
| | <module-option name="realmName" value="gatein-domain"/> |
| | </login-module> |
| | <login-module code="org.gatein.sso.agent.login.SSOLoginModule" flag="required"> |
| | <module-option name="portalContainerName" value="portal"/> |
| | <module-option name="realmName" value="gatein-domain"/> |
| | </login-module> |
| | <login-module code="org.exoplatform.services.security.j2ee.JbossLoginModule" flag="required"> |
| | <module-option name="portalContainerName" value="portal"/> |
| | <module-option name="realmName" value="gatein-domain"/> |
| | </login-module> | | | | | | |
| | </authentication> |
| | </security-domain> |
2) copy cas-client-core-3.1.9.jar,sso-auth-callback-1.1.2-Beta02.jar,sso-agent-1.1.2-Beta02.jar to E:\GateIn-3.4-jbossas7\gatein\deployments\gatein.ear\lib
3) configurate the client portal.war and web.war as http://docs.jboss.com/gatein/portal/3.4.0.M01/reference-guide/en-US/html_... http://docs.jboss.com/gatein/portal/3.4.0.M01/reference-guide/en-US/html_... guided.
4) start the JBoss7 and login with CAS server.
5) get exception
09:06:45,457 ERROR [org.gatein.sso.agent.login.SSOLoginModule] (http--127.0.0.1-8080-11) ---------------------------------------------------------
09:06:45,457 ERROR [org.gatein.sso.agent.login.SSOLoginModule] (http--127.0.0.1-8080-11) SSOLogin Failed. Credential Not Found!!
09:06:45,457 ERROR [org.gatein.sso.agent.login.SSOLoginModule] (http--127.0.0.1-8080-11) ---------------------------------------------------------
09:06:45,477 ERROR [org.jboss.security.authentication.JBossCachedAuthenticationManager] (http--127.0.0.1-8080-11) Login failure: javax.security.auth.login.LoginException: Login failed for demo
at org.exoplatform.services.security.jaas.DefaultLoginModule.login(DefaultLoginModule.java:136) [exo.core.component.security.core-2.4.6-GA.jar:2.4.6-GA]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_06]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_06]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_06]
at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_06]
at javax.security.auth.login.LoginContext.invoke(LoginContext.java:784) [rt.jar:1.7.0_06]
at javax.security.auth.login.LoginContext.access$000(LoginContext.java:203) [rt.jar:1.7.0_06]
at javax.security.auth.login.LoginContext$4.run(LoginContext.java:698) [rt.jar:1.7.0_06]
at javax.security.auth.login.LoginContext$4.run(LoginContext.java:696) [rt.jar:1.7.0_06]
at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.7.0_06]
at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:695) [rt.jar:1.7.0_06]
at javax.security.auth.login.LoginContext.login(LoginContext.java:594) [rt.jar:1.7.0_06]
at org.jboss.security.authentication.JBossCachedAuthenticationManager.defaultLogin(JBossCachedAuthenticationManager.java:449) [picketbox-infinispan-4.0.6.final.jar:4.0.6.final]
at org.jboss.security.authentication.JBossCachedAuthenticationManager.proceedWithJaasLogin(JBossCachedAuthenticationManager.java:383) [picketbox-infinispan-4.0.6.final.jar:4.0.6.final]
at org.jboss.security.authentication.JBossCachedAuthenticationManager.authenticate(JBossCachedAuthenticationManager.java:371) [picketbox-infinispan-4.0.6.final.jar:4.0.6.final]
at org.jboss.security.authentication.JBossCachedAuthenticationManager.isValid(JBossCachedAuthenticationManager.java:160) [picketbox-infinispan-4.0.6.final.jar:4.0.6.final]
at org.jboss.as.web.security.JBossWebRealm.authenticate(JBossWebRealm.java:215) [jboss-as-web-7.1.0.Final.jar:7.1.0.Final]
at org.apache.catalina.authenticator.AuthenticatorBase.login(AuthenticatorBase.java:324) [jbossweb-7.0.10.Final.jar:]
at org.apache.catalina.connector.Request.login(Request.java:3252) [jbossweb-7.0.10.Final.jar:]
at org.apache.catalina.connector.RequestFacade.login(RequestFacade.java:1082) [jbossweb-7.0.10.Final.jar:]
at javax.servlet.http.HttpServletRequestWrapper.login(HttpServletRequestWrapper.java:323) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
at org.gatein.wci.jboss.JB7ServletContainerContext.login(JB7ServletContainerContext.java:159) [wci-jboss7-2.2.0-Beta02.jar:2.2.0-Beta02]
at org.gatein.wci.impl.DefaultServletContainer.login(DefaultServletContainer.java:109) [wci-wci-2.2.0-Beta02.jar:2.2.0-Beta02]
at org.exoplatform.web.login.InitiateLoginServlet.doGet(InitiateLoginServlet.java:111) [exo.portal.component.web.security-3.4.0.M01.jar:3.4.0.M01]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
at org.exoplatform.container.web.AbstractHttpServlet.onService(AbstractHttpServlet.java:183) [exo.kernel.container-2.3.6-GA-JBAS7.jar:2.3.6-GA-JBAS7]
at org.exoplatform.container.web.AbstractHttpServlet.service(AbstractHttpServlet.java:132) [exo.kernel.container-2.3.6-GA-JBAS7.jar:2.3.6-GA-JBAS7]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.10.Final.jar:]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.10.Final.jar:]
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:734) [jbossweb-7.0.10.Final.jar:]
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:541) [jbossweb-7.0.10.Final.jar:]
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:479) [jbossweb-7.0.10.Final.jar:]
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:407) [jbossweb-7.0.10.Final.jar:]
at org.apache.catalina.authenticator.FormAuthenticator.forwardToLoginPage(FormAuthenticator.java:362) [jbossweb-7.0.10.Final.jar:]
at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:265) [jbossweb-7.0.10.Final.jar:]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:455) [jbossweb-7.0.10.Final.jar:]
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:154) [jboss-as-web-7.1.0.Final.jar:7.1.0.Final]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.10.Final.jar:]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.10.Final.jar:]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.10.Final.jar:]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.10.Final.jar:]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.10.Final.jar:]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.10.Final.jar:]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.10.Final.jar:]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_06]
09:06:45,507 TRACE [org.jboss.security.authentication.JBossCachedAuthenticationManager] (http--127.0.0.1-8080-11) End isValid, false
09:06:45,507 TRACE [org.jboss.as.web.security] (http--127.0.0.1-8080-11) End invoke, caller=null
09:06:45,507 TRACE [org.jboss.security.SecurityRolesAssociation] (http--127.0.0.1-8080-11) Setting threadlocal:null
09:06:45,517 TRACE [org.jboss.as.web.security] (http--127.0.0.1-8080-11) Begin invoke, caller=null
09:06:45,517 TRACE [org.jboss.security.authentication.JBossCachedAuthenticationManager] (http--127.0.0.1-8080-11) Begin isValid, principal:demo, cache entry: null
09:06:45,517 TRACE [org.jboss.security.authentication.JBossCachedAuthenticationManager] (http--127.0.0.1-8080-11) defaultLogin, principal=demo
09:06:45,517 TRACE [org.jboss.security.auth.login.XMLLoginConfigImpl] (http--127.0.0.1-8080-11) Begin getAppConfigurationEntry(gatein-domain), size=5
09:06:45,517 TRACE [org.jboss.security.auth.login.XMLLoginConfigImpl] (http--127.0.0.1-8080-11) End getAppConfigurationEntry(gatein-domain), authInfo=AppConfigurationEntry[]:
[0]
LoginModule Class: org.gatein.wci.security.WCILoginModule
ControlFlag: LoginModuleControlFlag: optional
Options:
name=realmName, value=gatein-domain
name=portalContainerName, value=portal
[1]
LoginModule Class: org.gatein.sso.agent.login.SSOLoginModule
ControlFlag: LoginModuleControlFlag: required
Options:
name=realmName, value=gatein-domain
name=portalContainerName, value=portal
[2]
LoginModule Class: org.exoplatform.services.security.jaas.SharedStateLoginModule
ControlFlag: LoginModuleControlFlag: required
Options:
name=realmName, value=gatein-domain
name=portalContainerName, value=portal
[3]
LoginModule Class: org.exoplatform.services.security.j2ee.JbossLoginModule
ControlFlag: LoginModuleControlFlag: required
Options:
name=realmName, value=gatein-domain
name=portalContainerName, value=portal
09:06:45,568 ERROR [org.jboss.security.authentication.JBossCachedAuthenticationManager] (http--127.0.0.1-8080-11) Login failure: javax.security.auth.login.LoginException: Login failed for demo
at org.exoplatform.services.security.jaas.SharedStateLoginModule.login(SharedStateLoginModule.java:82) [exo.core.component.security.core-2.4.6-GA.jar:2.4.6-GA]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_06]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_06]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_06]
at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_06]
at javax.security.auth.login.LoginContext.invoke(LoginContext.java:784) [rt.jar:1.7.0_06]
at javax.security.auth.login.LoginContext.access$000(LoginContext.java:203) [rt.jar:1.7.0_06]
at javax.security.auth.login.LoginContext$4.run(LoginContext.java:698) [rt.jar:1.7.0_06]
at javax.security.auth.login.LoginContext$4.run(LoginContext.java:696) [rt.jar:1.7.0_06]
at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.7.0_06]
at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:695) [rt.jar:1.7.0_06]
at javax.security.auth.login.LoginContext.login(LoginContext.java:594) [rt.jar:1.7.0_06]
at org.jboss.security.authentication.JBossCachedAuthenticationManager.defaultLogin(JBossCachedAuthenticationManager.java:449) [picketbox-infinispan-4.0.6.final.jar:4.0.6.final]
at org.jboss.security.authentication.JBossCachedAuthenticationManager.proceedWithJaasLogin(JBossCachedAuthenticationManager.java:383) [picketbox-infinispan-4.0.6.final.jar:4.0.6.final]
at org.jboss.security.authentication.JBossCachedAuthenticationManager.authenticate(JBossCachedAuthenticationManager.java:371) [picketbox-infinispan-4.0.6.final.jar:4.0.6.final]
at org.jboss.security.authentication.JBossCachedAuthenticationManager.isValid(JBossCachedAuthenticationManager.java:160) [picketbox-infinispan-4.0.6.final.jar:4.0.6.final]
at org.jboss.as.web.security.JBossWebRealm.authenticate(JBossWebRealm.java:215) [jboss-as-web-7.1.0.Final.jar:7.1.0.Final]
at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:280) [jbossweb-7.0.10.Final.jar:]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:381) [jbossweb-7.0.10.Final.jar:]
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:154) [jboss-as-web-7.1.0.Final.jar:7.1.0.Final]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.10.Final.jar:]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.10.Final.jar:]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.10.Final.jar:]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.10.Final.jar:]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.10.Final.jar:]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.10.Final.jar:]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.10.Final.jar:]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_06]
Caused by: javax.security.auth.login.LoginException: Login failed for demo
at org.exoplatform.services.organization.auth.OrganizationAuthenticatorImpl.validateUser(OrganizationAuthenticatorImpl.java:155) [exo.core.component.organization.api-2.4.6-GA.jar:2.4.6-GA]
at org.exoplatform.services.security.jaas.SharedStateLoginModule.login(SharedStateLoginModule.java:70) [exo.core.component.security.core-2.4.6-GA.jar:2.4.6-GA]
... 27 more
09:06:45,599 TRACE [org.jboss.security.authentication.JBossCachedAuthenticationManager] (http--127.0.0.1-8080-11) End isValid, false
09:06:45,739 TRACE [org.jboss.as.web.security] (http--127.0.0.1-8080-11) End invoke, caller=null
09:06:45,739 TRACE [org.jboss.security.SecurityRolesAssociation] (http--127.0.0.1-8080-11) Setting threadlocal:null
09:06:45,755 TRACE [org.jboss.as.web.security] (http--127.0.0.1-8080-11) Begin invoke, caller=null
09:06:45,755 TRACE [org.jboss.as.web.security] (http--127.0.0.1-8080-11) End invoke, caller=null
09:06:45,755 TRACE [org.jboss.security.SecurityRolesAssociation] (http--127.0.0.1-8080-11) Setting threadlocal:null
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/759326#759326]
Start a new discussion in JBoss Portal at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 2 months
[JBoss Web Services] - How to set eclipse/maven dependencies to make jbossws work?
by Matthias M.
Matthias M. [https://community.jboss.org/people/virtuellesnugat] created the discussion
"How to set eclipse/maven dependencies to make jbossws work?"
To view the discussion, visit: https://community.jboss.org/message/759251#759251
--------------------------------------------------------------
Hi,
I'm trying to use the contents of org.jboss.ws.* (e. g. "@WebContext"), but I'm not able to use the contents in the classpath.
I already did:
* install the CXF relatead package on my server
* run the junit tests (2 failures)
Now when I try to add a dependency to the pom.xml, there is no package available like 'org.jboss.ws'. Furthermore no workaround worked for me.
I even tried to manipulate the archive generation of the war file in the maven configuration like:
{code:xml}
<archive>
<manifestEntries>
<Dependencies>org.jboss.ws.api services export</Dependencies>
</manifestEntries>
</archive>
{code:xml}
I hoped using this workaround, I could simply use eclipse's classpath to import and use the .jar directly. But everytime (even if I only do an import) I get an exception during compilation like:
"java.lang.IllegalArgumentException: The argument does not represent an annotation type"
I'm searching for a solution, but the google- and stackoverflow-results won't help.
Is this because of the modular approach of as7.1 or did I simply miss a trivial step to do?
I use eclipse, jboss as 7.1.1, jbossws cxf 4.0.2, maven 3.0.2. Because of maven I feel rather restricted than helped out. But that's because I'm not used to it.
If I forgot to mention something important, please let me know.
I bet there are many people saying this is a stupid question, but I would be thankful for an answer anyway ;)
Greetings!
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/759251#759251]
Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 2 months
[JBoss Messaging] - How to list or monitor messages in a Queue which is already under use
by Aneesh Sebastian
Aneesh Sebastian [https://community.jboss.org/people/aneeshsebastian] created the discussion
"How to list or monitor messages in a Queue which is already under use"
To view the discussion, visit: https://community.jboss.org/message/720125#720125
--------------------------------------------------------------
I have a requirement to monitor a JBoss messaging queue, where users should be able to delete posted messages dynamically. The application has a MDPOJO registered and is up and running at server start up.
My requirement is, users should be able to delete a posted message any time he wishes. I tried below proto codes :
*Option1*
public void listAllJMS_Messages()
{
try {
ObjectName objectName=new ObjectName("jboss.messaging.destination:name=XXX,service=Queue");
List ls = (List) server.invoke(objectName, "listMessages" , null, null);
List<javax.jms.Message> messages=(List<javax.jms.Message>)server.invoke(objectName, "listAllMessages" , null, null);
int count=0;
for(javax.jms.Message msg : messages) {
System.out.println((++count)+"t"+msg.getJMSMessageID());
if(msg.getJMSType() != null && msg.getJMSType().equalsIgnoreCase("Text")) {
TextMessage text = (TextMessage)msg;
System.out.println(text.getText());
}
}
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
// System.out.println((++count)+"t"+msg.getText());
}
*Option2*
public void listMsg() {
String destinationName = "queue/XXX";
Context ic = null;
ConnectionFactory cf = null;
Connection connection = null;
try {
ic = getInitialContext();
cf = (ConnectionFactory)ic.lookup("/ConnectionFactory");
Queue queue = (Queue)ic.lookup(destinationName);
connection = cf.createConnection();
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
QueueBrowser qbrowser = session.createBrowser(queue);
Enumeration<?> qamsgs = qbrowser.getEnumeration();
while (qamsgs.hasMoreElements()){
Message msg = (Message)qamsgs.nextElement();
}
connection.start();
}
catch(Exception e)
{
System.out.println(e);
}
finally
{
if(ic != null)
{
try
{
ic.close();
}
catch(Exception e1)
{
System.out.println(e1);
}
}
}
}
In both the options,messages are getting listed in case of no message consumers at present.If have a live message consumer MDB, then list is returned as null.
I defintely need MDB consumer up and running.But still need to monitor messages.I should be able to do below :
1. List messages]
2. Delete a particular message
3. Change priority
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/720125#720125]
Start a new discussion in JBoss Messaging at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 2 months
[jBPM] - Assign task to groups at runtime
by Alessandro Dionisi
Alessandro Dionisi [https://community.jboss.org/people/cecchisandrone] created the discussion
"Assign task to groups at runtime"
To view the discussion, visit: https://community.jboss.org/message/759207#759207
--------------------------------------------------------------
Hi all,
Anyone knows how to reassign a task to group when the task is in states Ready, Reserved or InProgress?
In our scenario this can happen when a user has a reserved task but the business administrator at some point can change the assignment to a group.
I tried with the following methods:
* *delegate:* produces the following error: Error java.lang.RuntimeException: Command OperationRequest faild due to org.jbpm.task.Group cannot be cast to org.jbpm.task.User. Please contact task server administrator.
* *nominate and forward*: produces: unexpected end of subtree [select new org.jbpm.task.query.TaskSummary( t.id, t.taskData.processInstanceId, name.text, subject.text, description.text, t.taskData.status, t.priority, t.taskData.skipable, actualOwner, createdBy, t.taskData.createdOn, t.taskData.activationTime, t.taskData.expirationTime, t.taskData.processId, t.taskData.processSessionId) from org.jbpm.task.Task t left join t.taskData.createdBy as createdBy left join t.taskData.actualOwner as actualOwner left join t.subjects as subject left join t.descriptions as description left join t.names as name, org.jbpm.task.OrganizationalEntity potentialOwners where t.archived = 0 and ( potentialOwners.id = :userId or potentialOwners.id in () ) and potentialOwners in elements ( t.peopleAssignments.potentialOwners ) and ( name.language = :language or t.names.size = 0 ) and ( subject.language = :language or t.subjects.size = 0 ) and ( description.language = :language or t.descriptions.size = 0 ) and t.taskData.status in ('Created', 'Ready', 'Reserved', 'InProgress', 'Suspended') and t.taskData.expirationTime is null]
Do you have some advices?
P.S. I'm using JBPM 5.4.0-SNAPSHOT.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/759207#759207]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 2 months