[rules-users] Workbench JAAS Authenticated , But NOT Authorized

2014-07-06 Thread 706826
Hi,

 

I am configuring DB based JAAS Authentication for Kie-Drools-Workbench
6.1.0. Server log (Pasted Below) shows user is authenticated and roles are
assigned to the user. But KIE login form says “Login failed: Not Authorized
“.

 

I have also added roles in Organizational Unit, Repository and Projects
using kie-config-cli. But still getting the same error.

 

Kindly let me know what wrong am I doing.

 

Standalone.xml

security-domain name=drools-guvnor cache-type=default

authentication

login-module
code=org.jboss.security.auth.spi.DatabaseServerLoginModule
flag=required

module-option name=dsJndiName
value=java:jboss/datasources/jdbc/jbpmStagingRWDS/

module-option name=principalsQuery
value=select PASSWORD from principals where PRINCIPALID=?/

module-option name=rolesQuery value=select
ROLE,ROLEGROUP from roles WHERE principalid=?/

module-option name=hashAlgorithm
value=MD5/

module-option name=hashEncoding
value=base64/

module-option name=hashCharset
value=UTF-8/

module-option name=password-stacking
value=useFirstPass/

/login-module

/authentication

/security-domain

 

Kie-drools-wb.War / WEB_INF/jboss-web.xml|

security-domaindrools-guvnor/security-domain

 

Server Logs

13:55:22,408 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule]
(http--127.0.0.1-8080-2) initialize

13:55:22,410 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule]
(http--127.0.0.1-8080-2) Security domain: other

13:55:22,412 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule]
(http--127.0.0.1-8080-2) Password hashing activated: algorithm = MD5,
encoding = base64, charset = UTF-8, callback = null, storeCallback = null

13:55:22,415 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule]
(http--127.0.0.1-8080-2) DatabaseServerLoginModule,
dsJndiName=java:jboss/datasources/jdbc/jbpmStagingRWDS

13:55:22,419 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule]
(http--127.0.0.1-8080-2) principalsQuery=select PASSWORD from principals
where PRINCIPALID=?

13:55:22,422 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule]
(http--127.0.0.1-8080-2) rolesQuery=select ROLE,ROLEGROUP from roles WHERE
principalid=?

13:55:22,424 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule]
(http--127.0.0.1-8080-2) suspendResume=true

13:55:22,426 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule]
(http--127.0.0.1-8080-2) login

13:55:22,428 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule]
(http--127.0.0.1-8080-2) suspendAnyTransaction

13:55:22,489 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule]
(http--127.0.0.1-8080-2) Excuting query: select PASSWORD from principals
where PRINCIPALID=?, with username: iit

13:55:22,495 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule]
(http--127.0.0.1-8080-2) Obtained user password

13:55:22,497 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule]
(http--127.0.0.1-8080-2) resumeAnyTransaction

13:55:22,499 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule]
(http--127.0.0.1-8080-2) User 'iit' authenticated, loginOk=true

13:55:22,501 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule]
(http--127.0.0.1-8080-2) commit, loginOk=true

13:55:22,503 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule]
(http--127.0.0.1-8080-2) getRoleSets using rolesQuery: select ROLE,ROLEGROUP
from roles WHERE principalid=?, username: iit

13:55:22,507 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule]
(http--127.0.0.1-8080-2) suspendAnyTransaction

13:55:22,509 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule]
(http--127.0.0.1-8080-2) Excuting query: select ROLE,ROLEGROUP from roles
WHERE principalid=?, with username: iit

13:55:22,514 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule]
(http--127.0.0.1-8080-2) Assign user to role admin

13:55:22,516 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule]
(http--127.0.0.1-8080-2) Assign user to role analyst

13:55:22,518 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule]
(http--127.0.0.1-8080-2) Assign user to role developer

13:55:22,521 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule]
(http--127.0.0.1-8080-2) Assign user to role manager

13:55:22,523 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule]
(http--127.0.0.1-8080-2) Assign user to role user

13:55:22,525 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule]
(http--127.0.0.1-8080-2) resumeAnyTransaction

13:55:22,527 TRACE
[org.jboss.security.authentication.JBossCachedAuthenticationManager]
(http--127.0.0.1-8080-2) defaultLogin,

Re: [rules-users] Kie namespace

2014-07-06 Thread Sumit Dhaniya
Thanks Mark,
It's still throwing
No setter found for property 'kBaseName' in class
'org.kie.spring.factorybeans.KSessionFactoryBean'.


On Sun, Jul 6, 2014 at 4:23 AM, Mark Proctor [via Drools] 
ml-node+s46999n4030240...@n3.nabble.com wrote:

 It’s in the jar:

 https://github.com/droolsjbpm/droolsjbpm-integration/blob/master/kie-spring/src/main/resources/org/kie/spring/kie-spring-6.0.0.xsd


 On 4 Jul 2014, at 22:23, Sumit Dhaniya [hidden email]
 http://user/SendEmail.jtp?type=nodenode=4030240i=0 wrote:

  I'm trying to configure drools in my spring application but I'm
 struggling to
  find even schema location for drools. I tried
  http://drools.org/schema/kie-spring.xsd but it throws error :-
 
  Referenced file contains errors (http://drools.org/schema/kie-spring.xsd).

 
  What I need to get it working. Is there any good documentation for
  spring-integration and performance measures which should be taken.
 
 
 
  --
  View this message in context:
 http://drools.46999.n3.nabble.com/Kie-namespace-tp4030236.html
  Sent from the Drools: User forum mailing list archive at Nabble.com.
  ___
  rules-users mailing list
  [hidden email] http://user/SendEmail.jtp?type=nodenode=4030240i=1
  https://lists.jboss.org/mailman/listinfo/rules-users


 ___
 rules-users mailing list
 [hidden email] http://user/SendEmail.jtp?type=nodenode=4030240i=2
 https://lists.jboss.org/mailman/listinfo/rules-users


 --
  If you reply to this email, your message will be added to the discussion
 below:
 http://drools.46999.n3.nabble.com/Kie-namespace-tp4030236p4030240.html
  To unsubscribe from Kie namespace, click here
 http://drools.46999.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=4030236code=c3VtaXRkaGFuaXlhQGdtYWlsLmNvbXw0MDMwMjM2fDEzODgxODEzMTM=
 .
 NAML
 http://drools.46999.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml





--
View this message in context: 
http://drools.46999.n3.nabble.com/Kie-namespace-tp4030236p4030242.html
Sent from the Drools: User forum mailing list archive at Nabble.com.___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

[rules-users] Kie Spring integration

2014-07-06 Thread Sumit Dhaniya
Hi,

I'm trying to inject KieBase objects declared in my
kmodule.xml file which is in a jar imported by using maven dependencies in
my project but it doesn't work. Below are few things I tried :-

1.) @KBase(name=defaultKieBase)
@KReleaseId(artifactId=com.demo, groupId=FirstDemo,
version=1.0)
private KieBase kbase;

2.)KieServices.Factory.get().newKieContainer(KieServices.Factory.get().newReleaseId(com.demo,FirstDemo,1.0))

nothing works until I import drl files in my project and write own
kmodule.xml file. FirstDemo Project is imported correctly using maven I can
see it in my dependencies also.

Is there anything I'm doing wrong?

I'm using spring-tc server and trying this in spring project and I've
imported spring-kie and kie-ci and related dependencies in my project.




--
View this message in context: 
http://drools.46999.n3.nabble.com/Kie-Spring-integration-tp4030243.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Kie namespace

2014-07-06 Thread Mark Proctor
If you think it’s a bug, you’ll need to write a unit test, and submit as a pull 
request. 
https://github.com/vinodkiran/droolsjbpm-integration/blob/kmodule-spring/kie-spring/src/test/java/org/kie/spring/tests/KieSpringKModuleTest.java
https://github.com/vinodkiran/droolsjbpm-integration/blob/kmodule-spring/kie-spring/src/test/resources/META-INF/kmodule-spring.xml

http://docs.jboss.org/drools/release/5.6.0.Final/droolsjbpm-introduction-docs/html/gettingstarted.html

mark

On 6 Jul 2014, at 09:44, Sumit Dhaniya sumitdhan...@gmail.com wrote:

 Thanks Mark,
 It's still throwing 
 No setter found for property 'kBaseName' in class 
 'org.kie.spring.factorybeans.KSessionFactoryBean'.
 
 
 On Sun, Jul 6, 2014 at 4:23 AM, Mark Proctor [via Drools] [hidden email] 
 wrote:
 It’s in the jar: 
 https://github.com/droolsjbpm/droolsjbpm-integration/blob/master/kie-spring/src/main/resources/org/kie/spring/kie-spring-6.0.0.xsd
 
 
 On 4 Jul 2014, at 22:23, Sumit Dhaniya [hidden email] wrote: 
 
  I'm trying to configure drools in my spring application but I'm struggling 
  to 
  find even schema location for drools. I tried 
  http://drools.org/schema/kie-spring.xsd but it throws error :- 
  
  Referenced file contains errors (http://drools.org/schema/kie-spring.xsd). 
  
  What I need to get it working. Is there any good documentation for 
  spring-integration and performance measures which should be taken. 
  
  
  
  -- 
  View this message in context: 
  http://drools.46999.n3.nabble.com/Kie-namespace-tp4030236.html
  Sent from the Drools: User forum mailing list archive at Nabble.com. 
  ___ 
  rules-users mailing list 
  [hidden email] 
  https://lists.jboss.org/mailman/listinfo/rules-users
 
 
 ___ 
 rules-users mailing list 
 [hidden email] 
 https://lists.jboss.org/mailman/listinfo/rules-users
 
 
 If you reply to this email, your message will be added to the discussion 
 below:
 http://drools.46999.n3.nabble.com/Kie-namespace-tp4030236p4030240.html
 To unsubscribe from Kie namespace, click here.
 NAML
 
 
 View this message in context: Re: [rules-users] Kie namespace
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Re: [rules-users] Kie namespace

2014-07-06 Thread vinodkiran
We had users report this error while using Eclipse.

I am assuming that this is an error reported by the IDE. Previously, I had
debugged this issue with another user and realized that the code works just
fine (despite the complaints by the IDE). This is due to certain IDE
settings.

http://lists.jboss.org/pipermail/rules-users/2014-April/035764.html (look at
the other related messages)

-Vinod



--
View this message in context: 
http://drools.46999.n3.nabble.com/Kie-namespace-tp4030236p4030245.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Kie Spring integration

2014-07-06 Thread vinodkiran
If you are using kie-spring, you need a spring XML and not a kmodule.xml

https://github.com/droolsjbpm/droolsjbpm-integration/blob/master/kie-spring/src/test/resources/org/kie/spring/beans-internal2.xml


if you are using kie-spring-annotations, please look at 

https://github.com/droolsjbpm/droolsjbpm-integration/blob/master/kie-spring/src/test/java/org/kie/spring/beans/annotations/NamedKieBean.java


-Vinod



--
View this message in context: 
http://drools.46999.n3.nabble.com/Kie-Spring-integration-tp4030243p4030246.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Kie namespace

2014-07-06 Thread sumit dhaniya
Yes code works just fine, no error is thrown while running the project.


On Sun, Jul 6, 2014 at 8:01 PM, vinodkiran vinodki...@usa.net wrote:

 We had users report this error while using Eclipse.

 I am assuming that this is an error reported by the IDE. Previously, I had
 debugged this issue with another user and realized that the code works just
 fine (despite the complaints by the IDE). This is due to certain IDE
 settings.

 http://lists.jboss.org/pipermail/rules-users/2014-April/035764.html (look
 at
 the other related messages)

 -Vinod



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Kie-namespace-tp4030236p4030245.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Re: [rules-users] Kie Spring integration

2014-07-06 Thread Sumit Dhaniya
Even if I create a spring integration file it doesn't directly injects the
objects i.e. if I use @Inject annotation it throws no qualifying bean
exception, but it works if I inject an application context bean and then
try to getBean using context.getBean(beanName) method.

Note:- bean name is same what I give in @KBase annotation.

Moreover if my drl or rdrl files are in a jar which I imported through
maven in my project it doesn't load the rules in that Kie Base it just
creates a new KieBase object with no rules.
But if I put my drl files directly into my resources folder than it works
just fine and all rules are fired.


On Sun, Jul 6, 2014 at 8:06 PM, vinodkiran [via Drools] 
ml-node+s46999n4030246...@n3.nabble.com wrote:

 If you are using kie-spring, you need a spring XML and not a kmodule.xml


 https://github.com/droolsjbpm/droolsjbpm-integration/blob/master/kie-spring/src/test/resources/org/kie/spring/beans-internal2.xml


 if you are using kie-spring-annotations, please look at


 https://github.com/droolsjbpm/droolsjbpm-integration/blob/master/kie-spring/src/test/java/org/kie/spring/beans/annotations/NamedKieBean.java


 -Vinod

 --
  If you reply to this email, your message will be added to the discussion
 below:

 http://drools.46999.n3.nabble.com/Kie-Spring-integration-tp4030243p4030246.html
  To unsubscribe from Kie Spring integration, click here
 http://drools.46999.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=4030243code=c3VtaXRkaGFuaXlhQGdtYWlsLmNvbXw0MDMwMjQzfDEzODgxODEzMTM=
 .
 NAML
 http://drools.46999.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml





--
View this message in context: 
http://drools.46999.n3.nabble.com/Kie-Spring-integration-tp4030243p4030248.html
Sent from the Drools: User forum mailing list archive at Nabble.com.___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Re: [rules-users] Kie Spring integration

2014-07-06 Thread vinodkiran
if you are using a spring XML with annotations please ensure that the
following declaration is available in the XML file

bean id=kiePostProcessor
class=org.kie.spring.annotations.KModuleAnnotationPostProcessor/

Sample:

https://github.com/droolsjbpm/droolsjbpm-integration/blob/master/kie-spring/src/test/resources/org/kie/spring/annotations/kie-spring-annotations.xml





--
View this message in context: 
http://drools.46999.n3.nabble.com/Kie-Spring-integration-tp4030243p4030249.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Kie Spring integration

2014-07-06 Thread sumit dhaniya
Sorry I didn't mentioned this earlier but when I deploy my project below
are few errors I get :-

INFO  ClasspathKieProject - Found kmodule:
jar:file:/C:/Users/Sumit%20Dhaniya/.m2/repository/com/demo/FirstDemo/1.0/FirstDemo-1.0.jar!/META-INF/kmodule.xml
ERROR ClasspathKieProject - Unable to load pom.properties
from/C:/Users/Sumit
Dhaniya/.m2/repository/com/demo/FirstDemo/1.0/FirstDemo-1.0.jar as jarPath
cannot be found
/Users/Sumit Dhaniya/.m2/repository/com/demo/FirstDemo/1.0/FirstDemo-1.0.jar
ERROR ClasspathKieProject - Unable to load pom.properties
from/C:/Users/Sumit
Dhaniya/.m2/repository/com/demo/FirstDemo/1.0/FirstDemo-1.0.jar
\Users\Sumit
Dhaniya\.m2\repository\com\demo\FirstDemo\1.0\FirstDemo-1.0.jar (The system
cannot find the path specified)
ERROR ClasspathKieProject - Unable to build index of kmodule.xml
url=jar:file:/C:/Users/Sumit%20Dhaniya/.m2/repository/com/demo/FirstDemo/1.0/FirstDemo-1.0.jar!/META-INF/kmodule.xml

Below is the conf. I did for drools in my conf. file :-

kie:kmodule id=kmodule1
kie:kbase name=defaultKieBase default=true
eventProcessingMode=cloud equalsBehavior=identity
declarativeAgenda=disabled
scope=javax.enterprise.context.ApplicationScoped
packages=com.sophic.drool
kie:ksession name=defaultKieSession type=stateful
default=true clockType=realtime
scope=javax.enterprise.context.ApplicationScoped /
kie:ksession name=defaultStatelessKieSession type=stateless
default=true clockType=realtime
scope=javax.enterprise.context.ApplicationScoped /
/kie:kbase
/kie:kmodule
bean id=kiePostProcessor
class=org.kie.spring.KModuleBeanFactoryPostProcessor /


On Sun, Jul 6, 2014 at 9:39 PM, vinodkiran vinodki...@usa.net wrote:

 if you are using a spring XML with annotations please ensure that the
 following declaration is available in the XML file

 bean id=kiePostProcessor
 class=org.kie.spring.annotations.KModuleAnnotationPostProcessor/

 Sample:


 https://github.com/droolsjbpm/droolsjbpm-integration/blob/master/kie-spring/src/test/resources/org/kie/spring/annotations/kie-spring-annotations.xml





 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Kie-Spring-integration-tp4030243p4030249.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Re: [rules-users] Kie Spring integration

2014-07-06 Thread vinodkiran
try changing your kiePostProcessor from
org.kie.spring.KModuleBeanFactoryPostProcessor to the following and then
check if the @Inject works.

bean id=kiePostProcessor
class=org.kie.spring.annotations.KModuleAnnotationPostProcessor/



--
View this message in context: 
http://drools.46999.n3.nabble.com/Kie-Spring-integration-tp4030243p4030252.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Unable to build index of kmodule.xml from Kie project jar

2014-07-06 Thread Sumit Dhaniya
I'm trying to use the Kie jar in my spring project. It successfully
identifies the Kie jars in my project but give errors listed below :-

INFO  ClasspathKieProject - Found kmodule:
jar:file:/C:/Users/Sumit%20Dhaniya/.m2/repository/com/demo/FirstDemo/1.0/FirstDemo-1.0.jar!/META-INF/kmodule.xml
ERROR ClasspathKieProject - Unable to load pom.properties
from/C:/Users/Sumit
Dhaniya/.m2/repository/com/demo/FirstDemo/1.0/FirstDemo-1.0.jar as jarPath
cannot be found
/Users/Sumit Dhaniya/.m2/repository/com/demo/FirstDemo/1.0/FirstDemo-1.0.jar
ERROR ClasspathKieProject - Unable to load pom.properties
from/C:/Users/Sumit
Dhaniya/.m2/repository/com/demo/FirstDemo/1.0/FirstDemo-1.0.jar
\Users\Sumit Dhaniya\.m2\repository\com\demo\FirstDemo\1.0\FirstDemo-1.0.jar
(The system cannot find the path specified)
ERROR ClasspathKieProject - Unable to build index of kmodule.xml
url=jar:file:/C:/Users/Sumit%20Dhaniya/.m2/repository/com/demo/FirstDemo/1.0/FirstDemo-1.0.jar!/META-INF/kmodule.xml

Even if I define kie modules and sessions in my conf file I can't access the
drl and rdrl files in my Kie Project.

Though if I create my objects using
kieServices.getResources().newUrlResource(url); everything works fine.




--
View this message in context: 
http://drools.46999.n3.nabble.com/Unable-to-build-index-of-kmodule-xml-from-Kie-project-jar-tp4030253.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Repositories in Kie-Drools

2014-07-06 Thread Sumit Dhaniya
I want to use a repository hosted on cloud as repository in my kie ide.
I tried creating a new repo cloning an existing repo but after cloning kie
ide creates a new repo path at localhost and doesn't uses the cloud repo
path.
Can I achieve this or I'll have to find a way to sync two repositories one
linked to kie and another to cloud repo.



--
View this message in context: 
http://drools.46999.n3.nabble.com/Repositories-in-Kie-Drools-tp4030254.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users