[rules-users] Can we point to db repository url directly in ChangeSet.xml
Tihomir Surdilovic
tsurdilo at redhat.com
Tue Mar 22 22:22:38 EDT 2011
Found the Jira: https://issues.jboss.org/browse/SOA-2850
confirms what the code says :)
Tihomir
On 3/22/11 6:57 PM, Tihomir Surdilovic wrote:
> Since Drools 5.1 if you secure Guvnor, you need also authenticate to
> get resources from Guvnor. In your change-set.xml you can do something
> like this:
>
> <change-set xmlns='http://drools.org/drools-5.0/change-set'
> xmlns:xs='http://www.w3.org/2001/XMLSchema-instance'
> xs:schemaLocation='http://drools.org/drools-5.0/change-set
> drools-change-set-5.0.xsd' >
> <add>
> <resource
> source='http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/defaultPackage/LATEST'
> type='PKG' basicAuthentication="enabled" username="admin" password="admin"
> />
> </add>
> </change-set>
>
> For your JBoss ESB - specific question, take a look at quickstart
> example
> http://anonsvn.jboss.org/repos/labs/labs/jbossesb/trunk/product/samples/quickstarts/business_ruleservice_ruleAgent/,
> and specifically the properties file used:
>
> http://anonsvn.jboss.org/repos/labs/labs/jbossesb/trunk/product/samples/quickstarts/business_ruleservice_ruleAgent/ruleAgent/brmsdeployedrules-unfiltered.properties
>
> The properties file is read in by DroolsRuleAgentHelper.java (
> http://anonsvn.jboss.org/repos/labs/labs/jbossesb/trunk/product/services/jbrules/src/main/java/org/jboss/internal/soa/esb/services/rules/DroolsRuleAgentHelper.java
> ), so going along with that example, to add basic authentication and
> pass in username/password you should be able to have (not last three
> lines):
>
> newInstance=true
> #file=@quickstart.dir@/ruleAgent/package/org.jboss.soa.esb.services.rules.pkg
> #dir=/ruleAgent/package
> url=http://localhost:8080/drools-jbrms/org.drools.brms.JBRMS/package/org.jboss.soa.esb.services.rules/LATEST
> #localCacheDir=/ruleAgent/cache
> poll=30
> name=insuranceconfig
> enableBasicAuthentication=true
> username=admin
> password=admin
>
> Hope this helps.
>
> Tihomir.
>
> On 3/22/11 6:21 PM, Michael Anstis wrote:
>> hehe, I guess this is a classic example of a circular dependency ;)
>>
>> Can you confirm you're using a changeset to retrieve the rules rather
>> than a URL to simply download the binary package?
>>
>> If so you should be able to include credentials in that file. Google
>> for "drools changeset" and you should see some examples.
>>
>> With kind regards,
>>
>> Mike
>>
>> On 22 March 2011 22:15, Sathya Prakash <prakashagarval at gmail.com
>> <mailto:prakashagarval at gmail.com>> wrote:
>>
>> Hi Mike,
>> Jboss ESB documentation states refer Drools documentation
>> Kindly let me know how to pass credentials in Drools so that i
>> can try with ESB.
>> Regards,
>> Sathya
>>
>> On Wed, Mar 23, 2011 at 2:08 AM, Michael Anstis
>> <michael.anstis at gmail.com <mailto:michael.anstis at gmail.com>> wrote:
>>
>> Hi Sathya,
>>
>> This is by design.
>>
>> Any consumer of the "Guvnor service" will need to provide
>> authentication parameters in the HTTP request.
>>
>> This sounds like it could be an issue with ESB, perhaps you
>> can pose a question to their support forums asking how you
>> can include authorisation credentials in their configuration?
>>
>> Please direct your emails to the drools-user mailing list as
>> any information could be of value to others in the future.
>>
>> If I've mis-understood something please let me know :)
>>
>> With kind regards,
>>
>> Mike
>>
>>
>> On 22 March 2011 22:00, Sathya Prakash
>> <prakashagarval at gmail.com <mailto:prakashagarval at gmail.com>>
>> wrote:
>>
>> Hi Mike,
>> If Drools guvnor is password protected then package url
>> can not be accessed directly.
>> In esb we can specific url or dir location. I have
>> specified url i need to pass credentials. as of now its
>> throwing 401 hhtp code.
>> regards,
>> sathya prakash
>>
>> On Wed, Mar 23, 2011 at 1:55 AM, Michael Anstis
>> <michael.anstis at gmail.com
>> <mailto:michael.anstis at gmail.com>> wrote:
>>
>> I'm not familiar with JBoss ESB Drools integration.
>>
>> However, AFAIK, the file is not password protected
>> but the (Guvnor hosting) web-server authenticates
>> HTTP requests to "close" access.
>>
>> Can you please explain more what you mean by
>> restricting access to a particular server?
>>
>> Thanks,
>>
>> Mike
>>
>>
>> On 22 March 2011 21:39, Sathya Prakash
>> <prakashagarval at gmail.com
>> <mailto:prakashagarval at gmail.com>> wrote:
>>
>> Hi,
>> If package file is password protected, then how
>> to restrict to particular server. I am using
>> JBOSS ESB drools integration.
>> Regards,
>> Sathya Prakash.
>>
>> 2011/3/23 Michael Anstis
>> <michael.anstis at gmail.com
>> <mailto:michael.anstis at gmail.com>>
>>
>> The repository used by Guvnor is not a
>> database but an implementation of JCR
>> (Content Repository for Java Technology).
>>
>> We currently support Apache Jackrabbit and
>> IIRC JBoss Modeshape from 5.2.0.M1 as an
>> option (if not in an earlier version). Whilst
>> it is possible to configure either of these
>> JCR implementations to persist to a RDBMS
>> instead of a FileSystem, I believe the table
>> content is a (proprietary) binary form at not
>> easily integrated. Consequentially we only
>> expose the facility to download rule packages
>> through the channels you state.
>>
>> With kind regards,
>>
>> Mike
>>
>> 2011/3/22 Suk Fung <suk_f at yahoo.com
>> <mailto:suk_f at yahoo.com>>
>>
>> All,
>> To consume the rules in the application,
>> we can either use package URI or download
>> a binary .pkg file from guvnor. I just
>> wonder if the application can connect to
>> the database repository directly?
>>
>> Thanks for any information in advance.
>>
>> Suk
>>
>>
>> _______________________________________________
>> rules-users mailing list
>> rules-users at lists.jboss.org
>> <mailto:rules-users at lists.jboss.org>
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
>>
>>
>> _______________________________________________
>> rules-users mailing list
>> rules-users at lists.jboss.org
>> <mailto:rules-users at lists.jboss.org>
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
>>
>>
>>
>> --
>> Cheers,
>> Sathya Prakash.
>> *సత్య ప్రకాష్*.
>>
>>
>>
>>
>>
>> --
>> Cheers,
>> Sathya Prakash.
>> *సత్య ప్రకాష్*.
>>
>>
>>
>>
>>
>> --
>> Cheers,
>> Sathya Prakash.
>> *సత్య ప్రకాష్*.
>>
>>
>>
>> _______________________________________________
>> rules-users mailing list
>> rules-users at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110322/0f88c305/attachment.html
More information about the rules-users
mailing list