[JBoss JIRA] (DROOLS-1355) a black box Approval appliance thats super easy to integrate into Jenkins Pipeline or Kubernetes
by James Strachan (JIRA)
[ https://issues.jboss.org/browse/DROOLS-1355?page=com.atlassian.jira.plugi... ]
James Strachan commented on DROOLS-1355:
----------------------------------------
OK I think we can do all the kubernetes + jenkins + REST API definition plumbing inside fabric8 for now:
https://github.com/fabric8io/fabric8-platform/issues/65
we can then have a simple implementation that just delegates to an issue track; but I can see enterprises really wanting a real human workflow system!
> a black box Approval appliance thats super easy to integrate into Jenkins Pipeline or Kubernetes
> ------------------------------------------------------------------------------------------------
>
> Key: DROOLS-1355
> URL: https://issues.jboss.org/browse/DROOLS-1355
> Project: Drools
> Issue Type: Feature Request
> Reporter: James Strachan
> Assignee: Edson Tirelli
>
> [Jenkins Pipelines|https://jenkins.io/doc/book/pipeline/] are the hot way to do Continuous Delivery. Its very common to need human approval before, say, releasing to production.
> Right now the Jenkinsfile can do all the various build, test, deploy steps really well. However the approval is kinda sucky - its a single button on the console right now :)
> https://jenkins.io/doc/pipeline/steps/pipeline-input-step/#input-wait-for...
> What would be awesome is if we could package up drools+jBPM as a black box "approval appliance". Then we could create a little Jenkinsfile step like this:
> {code}
> // lets wait for approval or timeout/fail if not
> droolsApprove(namespace = "cheese", project = "beer", environment = "production", action = "promote")
> // now promote to production
> ...
> }
> {code}
> then we totally decouple from the Jenkins Pipeline how approvals work, which people/roles/teams do it, what the escalation policy is, how many folks need to approve and so forth.
> The various key/value pairs can then be used to associate promoting a project of a certain name in a namespace to a specific environment with different workflow policies. e.g. no approval at all may be required for testing. But for production, most apps may want 1 approver but some may need 2.
> Then how we map the approval policies & workflows to teams, apps & environments can be left to drools/jbpm to figure out.
> I'm hoping 90% of all use cases can be catered for with a couple of simple optional BPM flows really - then a simple mapping of key/value pairs to the flow to use (if any) so that users typically don't need to do much in the way of BPM editing or anything to use the Approval engine - it just works OOTB with maybe a simple config file to define the mappings or something. Just then folks get started right away super easily.
> We can then, for example, package it all up as an appliance and ship it OOTB with fabric8 :)
> We're more than happy to help on the packaging/kubernetes side and the Jenkins side - we could just do with a really simple packaged "approval engine" with a really simple REST API to create new approvals and then have a way to watch/poll when it completes/fails/times out.
> e.g. POST to an approval endpoint the key/value strings to create an approval; you get back a URL to poll for when the approval has completed or if it fails/time out or is rejected. Then some little blob of YAML/JSON gives reasons the OK or the reasons for the fail.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 8 months
[JBoss JIRA] (DROOLS-1355) a black box Approval appliance thats super easy to integrate into Jenkins Pipeline or Kubernetes
by James Strachan (JIRA)
[ https://issues.jboss.org/browse/DROOLS-1355?page=com.atlassian.jira.plugi... ]
James Strachan commented on DROOLS-1355:
----------------------------------------
actually to simplify integration into Jenkins Pipeline and Kubernetes, it might be good for us to define a consumer based contract for the REST API; then do a no-op implementation and make the Drools Approval Engine a plugin implementation
> a black box Approval appliance thats super easy to integrate into Jenkins Pipeline or Kubernetes
> ------------------------------------------------------------------------------------------------
>
> Key: DROOLS-1355
> URL: https://issues.jboss.org/browse/DROOLS-1355
> Project: Drools
> Issue Type: Feature Request
> Reporter: James Strachan
> Assignee: Edson Tirelli
>
> [Jenkins Pipelines|https://jenkins.io/doc/book/pipeline/] are the hot way to do Continuous Delivery. Its very common to need human approval before, say, releasing to production.
> Right now the Jenkinsfile can do all the various build, test, deploy steps really well. However the approval is kinda sucky - its a single button on the console right now :)
> https://jenkins.io/doc/pipeline/steps/pipeline-input-step/#input-wait-for...
> What would be awesome is if we could package up drools+jBPM as a black box "approval appliance". Then we could create a little Jenkinsfile step like this:
> {code}
> // lets wait for approval or timeout/fail if not
> droolsApprove(namespace = "cheese", project = "beer", environment = "production", action = "promote")
> // now promote to production
> ...
> }
> {code}
> then we totally decouple from the Jenkins Pipeline how approvals work, which people/roles/teams do it, what the escalation policy is, how many folks need to approve and so forth.
> The various key/value pairs can then be used to associate promoting a project of a certain name in a namespace to a specific environment with different workflow policies. e.g. no approval at all may be required for testing. But for production, most apps may want 1 approver but some may need 2.
> Then how we map the approval policies & workflows to teams, apps & environments can be left to drools/jbpm to figure out.
> I'm hoping 90% of all use cases can be catered for with a couple of simple optional BPM flows really - then a simple mapping of key/value pairs to the flow to use (if any) so that users typically don't need to do much in the way of BPM editing or anything to use the Approval engine - it just works OOTB with maybe a simple config file to define the mappings or something. Just then folks get started right away super easily.
> We can then, for example, package it all up as an appliance and ship it OOTB with fabric8 :)
> We're more than happy to help on the packaging/kubernetes side and the Jenkins side - we could just do with a really simple packaged "approval engine" with a really simple REST API to create new approvals and then have a way to watch/poll when it completes/fails/times out.
> e.g. POST to an approval endpoint the key/value strings to create an approval; you get back a URL to poll for when the approval has completed or if it fails/time out or is rejected. Then some little blob of YAML/JSON gives reasons the OK or the reasons for the fail.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 8 months
[JBoss JIRA] (DROOLS-1355) a black box Approval appliance thats super easy to integrate into Jenkins Pipeline or Kubernetes
by James Strachan (JIRA)
[ https://issues.jboss.org/browse/DROOLS-1355?page=com.atlassian.jira.plugi... ]
James Strachan updated DROOLS-1355:
-----------------------------------
Description:
[Jenkins Pipelines|https://jenkins.io/doc/book/pipeline/] are the hot way to do Continuous Delivery. Its very common to need human approval before, say, releasing to production.
Right now the Jenkinsfile can do all the various build, test, deploy steps really well. However the approval is kinda sucky - its a single button on the console right now :)
https://jenkins.io/doc/pipeline/steps/pipeline-input-step/#input-wait-for...
What would be awesome is if we could package up drools+jBPM as a black box "approval appliance". Then we could create a little Jenkinsfile step like this:
{code}
// lets wait for approval or timeout/fail if not
droolsApprove(namespace = "cheese", project = "beer", environment = "production", action = "promote")
// now promote to production
...
}
{code}
then we totally decouple from the Jenkins Pipeline how approvals work, which people/roles/teams do it, what the escalation policy is, how many folks need to approve and so forth.
The various key/value pairs can then be used to associate promoting a project of a certain name in a namespace to a specific environment with different workflow policies. e.g. no approval at all may be required for testing. But for production, most apps may want 1 approver but some may need 2.
Then how we map the approval policies & workflows to teams, apps & environments can be left to drools/jbpm to figure out.
I'm hoping 90% of all use cases can be catered for with a couple of simple optional BPM flows really - then a simple mapping of key/value pairs to the flow to use (if any) so that users typically don't need to do much in the way of BPM editing or anything to use the Approval engine - it just works OOTB with maybe a simple config file to define the mappings or something. Just then folks get started right away super easily.
We can then, for example, package it all up as an appliance and ship it OOTB with fabric8 :)
We're more than happy to help on the packaging/kubernetes side and the Jenkins side - we could just do with a really simple packaged "approval engine" with a really simple REST API to create new approvals and then have a way to watch/poll when it completes/fails/times out.
e.g. POST to an approval endpoint the key/value strings to create an approval; you get back a URL to poll for when the approval has completed or if it fails/time out or is rejected. Then some little blob of YAML/JSON gives reasons the OK or the reasons for the fail.
was:
Jenkins Pipelines are the hot way to do Continuous Delivery. Its very common to need human approval before, say, releasing to production.
Right now the Jenkinsfile can do all the various build, test, deploy steps really well. However the approval is kinda sucky - its a single button on the console right now :)
https://jenkins.io/doc/pipeline/steps/pipeline-input-step/#input-wait-for...
What would be awesome is if we could package up drools+jBPM as a black box "approval appliance". Then we could create a little Jenkinsfile step like this:
{code}
// lets wait for approval or timeout/fail if not
droolsApprove(namespace = "cheese", project = "beer", environment = "production", action = "promote")
// now promote to production
...
}
{code}
then we totally decouple from the Jenkins Pipeline how approvals work, which people/roles/teams do it, what the escalation policy is, how many folks need to approve and so forth.
The various key/value pairs can then be used to associate promoting a project of a certain name in a namespace to a specific environment with different workflow policies. e.g. no approval at all may be required for testing. But for production, most apps may want 1 approver but some may need 2.
Then how we map the approval policies & workflows to teams, apps & environments can be left to drools/jbpm to figure out.
I'm hoping 90% of all use cases can be catered for with a couple of simple optional BPM flows really - then a simple mapping of key/value pairs to the flow to use (if any) so that users typically don't need to do much in the way of BPM editing or anything to use the Approval engine - it just works OOTB with maybe a simple config file to define the mappings or something. Just then folks get started right away super easily.
We can then, for example, package it all up as an appliance and ship it OOTB with fabric8 :)
We're more than happy to help on the packaging/kubernetes side and the Jenkins side - we could just do with a really simple packaged "approval engine" with a really simple REST API to create new approvals and then have a way to watch/poll when it completes/fails/times out.
e.g. POST to an approval endpoint the key/value strings to create an approval; you get back a URL to poll for when the approval has completed or if it fails/time out or is rejected. Then some little blob of YAML/JSON gives reasons the OK or the reasons for the fail.
> a black box Approval appliance thats super easy to integrate into Jenkins Pipeline or Kubernetes
> ------------------------------------------------------------------------------------------------
>
> Key: DROOLS-1355
> URL: https://issues.jboss.org/browse/DROOLS-1355
> Project: Drools
> Issue Type: Feature Request
> Reporter: James Strachan
> Assignee: Edson Tirelli
>
> [Jenkins Pipelines|https://jenkins.io/doc/book/pipeline/] are the hot way to do Continuous Delivery. Its very common to need human approval before, say, releasing to production.
> Right now the Jenkinsfile can do all the various build, test, deploy steps really well. However the approval is kinda sucky - its a single button on the console right now :)
> https://jenkins.io/doc/pipeline/steps/pipeline-input-step/#input-wait-for...
> What would be awesome is if we could package up drools+jBPM as a black box "approval appliance". Then we could create a little Jenkinsfile step like this:
> {code}
> // lets wait for approval or timeout/fail if not
> droolsApprove(namespace = "cheese", project = "beer", environment = "production", action = "promote")
> // now promote to production
> ...
> }
> {code}
> then we totally decouple from the Jenkins Pipeline how approvals work, which people/roles/teams do it, what the escalation policy is, how many folks need to approve and so forth.
> The various key/value pairs can then be used to associate promoting a project of a certain name in a namespace to a specific environment with different workflow policies. e.g. no approval at all may be required for testing. But for production, most apps may want 1 approver but some may need 2.
> Then how we map the approval policies & workflows to teams, apps & environments can be left to drools/jbpm to figure out.
> I'm hoping 90% of all use cases can be catered for with a couple of simple optional BPM flows really - then a simple mapping of key/value pairs to the flow to use (if any) so that users typically don't need to do much in the way of BPM editing or anything to use the Approval engine - it just works OOTB with maybe a simple config file to define the mappings or something. Just then folks get started right away super easily.
> We can then, for example, package it all up as an appliance and ship it OOTB with fabric8 :)
> We're more than happy to help on the packaging/kubernetes side and the Jenkins side - we could just do with a really simple packaged "approval engine" with a really simple REST API to create new approvals and then have a way to watch/poll when it completes/fails/times out.
> e.g. POST to an approval endpoint the key/value strings to create an approval; you get back a URL to poll for when the approval has completed or if it fails/time out or is rejected. Then some little blob of YAML/JSON gives reasons the OK or the reasons for the fail.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 8 months
[JBoss JIRA] (DROOLS-1355) a black box Approval appliance thats super easy to integrate into Jenkins Pipeline or Kubernetes
by James Strachan (JIRA)
James Strachan created DROOLS-1355:
--------------------------------------
Summary: a black box Approval appliance thats super easy to integrate into Jenkins Pipeline or Kubernetes
Key: DROOLS-1355
URL: https://issues.jboss.org/browse/DROOLS-1355
Project: Drools
Issue Type: Feature Request
Reporter: James Strachan
Assignee: Edson Tirelli
Jenkins Pipelines are the hot way to do Continuous Delivery. Its very common to need human approval before, say, releasing to production.
Right now the Jenkinsfile can do all the various build, test, deploy steps really well. However the approval is kinda sucky - its a single button on the console right now :)
https://jenkins.io/doc/pipeline/steps/pipeline-input-step/#input-wait-for...
What would be awesome is if we could package up drools+jBPM as a black box "approval appliance". Then we could create a little Jenkinsfile step like this:
{code}
// lets wait for approval or timeout/fail if not
droolsApprove(namespace = "cheese", project = "beer", environment = "production", action = "promote")
// now promote to production
...
}
{code}
then we totally decouple from the Jenkins Pipeline how approvals work, which people/roles/teams do it, what the escalation policy is, how many folks need to approve and so forth.
The various key/value pairs can then be used to associate promoting a project of a certain name in a namespace to a specific environment with different workflow policies. e.g. no approval at all may be required for testing. But for production, most apps may want 1 approver but some may need 2.
Then how we map the approval policies & workflows to teams, apps & environments can be left to drools/jbpm to figure out.
I'm hoping 90% of all use cases can be catered for with a couple of simple optional BPM flows really - then a simple mapping of key/value pairs to the flow to use (if any) so that users typically don't need to do much in the way of BPM editing or anything to use the Approval engine - it just works OOTB with maybe a simple config file to define the mappings or something. Just then folks get started right away super easily.
We can then, for example, package it all up as an appliance and ship it OOTB with fabric8 :)
We're more than happy to help on the packaging/kubernetes side and the Jenkins side - we could just do with a really simple packaged "approval engine" with a really simple REST API to create new approvals and then have a way to watch/poll when it completes/fails/times out.
e.g. POST to an approval endpoint the key/value strings to create an approval; you get back a URL to poll for when the approval has completed or if it fails/time out or is rejected. Then some little blob of YAML/JSON gives reasons the OK or the reasons for the fail.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 8 months
[JBoss JIRA] (WFLY-7482) Poor description of mechanism-name attribute
by Martin Choma (JIRA)
[ https://issues.jboss.org/browse/WFLY-7482?page=com.atlassian.jira.plugin.... ]
Martin Choma updated WFLY-7482:
-------------------------------
Labels: user_experience (was: )
> Poor description of mechanism-name attribute
> --------------------------------------------
>
> Key: WFLY-7482
> URL: https://issues.jboss.org/browse/WFLY-7482
> Project: WildFly
> Issue Type: Bug
> Components: Security
> Affects Versions: 11.0.0.Alpha1
> Reporter: Martin Choma
> Labels: user_experience
>
> Description in model : "The name of the mechanism the configuration applies to"
> XSD description is better and explains why is mechanism-name optional: "This configuration will only apply where a mechanism with the name specified is used. If this attribute is omited then this will match any mechanism name."
> Synchronize descriptions - use description from XSD. in model
> Issue applies to attribute occurences in
> * http-server-mechanism-factory
> * sasl-authentication-factory
> Also applies to description in operation add description. Not sure if this is automatic, therefore mentioning it explicitly.
> {code}
> /subsystem=elytron/http-authentication-factory=a:read-operation-description(name=add)
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 8 months
[JBoss JIRA] (WFLY-7482) Poor description of mechanism-name attribute
by Martin Choma (JIRA)
[ https://issues.jboss.org/browse/WFLY-7482?page=com.atlassian.jira.plugin.... ]
Martin Choma moved JBEAP-6900 to WFLY-7482:
-------------------------------------------
Project: WildFly (was: JBoss Enterprise Application Platform)
Key: WFLY-7482 (was: JBEAP-6900)
Workflow: GIT Pull Request workflow (was: CDW with loose statuses v1)
Component/s: Security
(was: Security)
(was: User Experience)
Affects Version/s: 11.0.0.Alpha1
(was: 7.1.0.DR7)
> Poor description of mechanism-name attribute
> --------------------------------------------
>
> Key: WFLY-7482
> URL: https://issues.jboss.org/browse/WFLY-7482
> Project: WildFly
> Issue Type: Bug
> Components: Security
> Affects Versions: 11.0.0.Alpha1
> Reporter: Martin Choma
>
> Description in model : "The name of the mechanism the configuration applies to"
> XSD description is better and explains why is mechanism-name optional: "This configuration will only apply where a mechanism with the name specified is used. If this attribute is omited then this will match any mechanism name."
> Synchronize descriptions - use description from XSD. in model
> Issue applies to attribute occurences in
> * http-server-mechanism-factory
> * sasl-authentication-factory
> Also applies to description in operation add description. Not sure if this is automatic, therefore mentioning it explicitly.
> {code}
> /subsystem=elytron/http-authentication-factory=a:read-operation-description(name=add)
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 8 months
[JBoss JIRA] (DROOLS-1354) Drools PermGen OOM When create kiebulider several times
by Shukang Guo (JIRA)
[ https://issues.jboss.org/browse/DROOLS-1354?page=com.atlassian.jira.plugi... ]
Shukang Guo updated DROOLS-1354:
--------------------------------
Description:
When i need updating the rule , first i will delete it from kieFileSystem , then add it .Second i will create a new KieBuilder and buildAll().But after several time i have done , it would be gone by PermGen OOM.
{code:java}
@Autowired
private RuleService ruleService;
private KieServices ks = KieServices.Factory.get();
private KieFileSystem kFileSystem = ks.newKieFileSystem();
private KieContainer kContainer;
private KieBase kieBase;
private KieBuilder kbuilder;
private String defaultPath;
/*
* (non-Javadoc)
*/
@Override
@PostConstruct
public void init() {
List<Rule> rules = new ArrayList<>();
rules.add(ruleService.selectById(15));
// List<Rule> rules = ruleService.selectAll(0, 0);
String[] paths = new String[rules.size()];
for (int i = 0; i < paths.length; i++) {
paths[i] = rules.get(i).getPath();
}
init(paths);
}
public void init(String[] paths) {
boolean isSetDefaultPath = false;
for (String path : paths) {
if (isSetDefaultPath)
kFileSystem
.write(ks.getResources().newClassPathResource(path));
else {
Resource resource = ks.getResources().newClassPathResource(
path);
kFileSystem.write(resource);
defaultPath = resource.getResourceType().getDefaultPath() + "/";
isSetDefaultPath = true;
}
}
kbuilder = ks.newKieBuilder(kFileSystem);
kbuilder.buildAll();
kContainer = ks.newKieContainer(ks.getRepository()
.getDefaultReleaseId());
kieBase = kContainer.getKieBase();
}
/*
* (non-Javadoc)
*/
public void refresh() {
kbuilder = ks.newKieBuilder(kFileSystem);
kbuilder.buildAll();
kContainer.updateToVersion(ks.getRepository().getDefaultReleaseId());
}
/*
* (non-Javadoc)
*/
@Override
public KieSession getKieSession() {
return kieBase.newKieSession();
}
@Override
public void add(String path) {
kFileSystem.write(ks.getResources().newClassPathResource(path));
refresh();
}
@Override
public void delete(String path) {
kFileSystem.delete(defaultPath + path);
refresh();
}
@Override
public void update(String path) {
kFileSystem.delete(defaultPath + path);
kFileSystem.write(ks.getResources().newClassPathResource(path));
refresh();
}
{code}
was:
When i need updating the rule , first i will delete it from kieFileSystem , then add it .Second i will create a new KieBuilder and buildAll().But after several time i have done , it would be gone by PermGen OOM.
{code:java}
@Autowired
private RuleService ruleService;
private KieServices ks = KieServices.Factory.get();
private KieFileSystem kFileSystem = ks.newKieFileSystem();
private KieContainer kContainer;
private KieBase kieBase;
private KieBuilder kbuilder;
private String defaultPath;
/*
* (non-Javadoc)
*
* @see com.huawei.datalifecycle.rules.RunRuless#init(java.lang.String[])
*/
@Override
@PostConstruct
public void init() {
List<Rule> rules = new ArrayList<>();
rules.add(ruleService.selectById(15));
// List<Rule> rules = ruleService.selectAll(0, 0);
String[] paths = new String[rules.size()];
for (int i = 0; i < paths.length; i++) {
paths[i] = rules.get(i).getPath();
}
init(paths);
}
public void init(String[] paths) {
boolean isSetDefaultPath = false;
for (String path : paths) {
if (isSetDefaultPath)
kFileSystem
.write(ks.getResources().newClassPathResource(path));
else {
Resource resource = ks.getResources().newClassPathResource(
path);
kFileSystem.write(resource);
defaultPath = resource.getResourceType().getDefaultPath() + "/";
isSetDefaultPath = true;
}
}
kbuilder = ks.newKieBuilder(kFileSystem);
kbuilder.buildAll();
kContainer = ks.newKieContainer(ks.getRepository()
.getDefaultReleaseId());
kieBase = kContainer.getKieBase();
}
/*
* (non-Javadoc)
*
* @see com.huawei.datalifecycle.rules.RunRuless#refresh(java.lang.String)
*/
public void refresh() {
kbuilder = ks.newKieBuilder(kFileSystem);
kbuilder.buildAll();
kContainer.updateToVersion(ks.getRepository().getDefaultReleaseId());
}
/*
* (non-Javadoc)
*
* @see com.huawei.datalifecycle.rules.RunRuless#getKieSession()
*/
@Override
public KieSession getKieSession() {
return kieBase.newKieSession();
}
@Override
public void add(String path) {
kFileSystem.write(ks.getResources().newClassPathResource(path));
refresh();
}
@Override
public void delete(String path) {
kFileSystem.delete(defaultPath + path);
refresh();
}
@Override
public void update(String path) {
kFileSystem.delete(defaultPath + path);
kFileSystem.write(ks.getResources().newClassPathResource(path));
refresh();
}
{code}
> Drools PermGen OOM When create kiebulider several times
> -------------------------------------------------------
>
> Key: DROOLS-1354
> URL: https://issues.jboss.org/browse/DROOLS-1354
> Project: Drools
> Issue Type: Bug
> Components: core engine
> Affects Versions: 6.4.0.Final
> Environment: Windows7 Tomcat7 JDK1.7
> Reporter: Shukang Guo
> Assignee: Mario Fusco
>
> When i need updating the rule , first i will delete it from kieFileSystem , then add it .Second i will create a new KieBuilder and buildAll().But after several time i have done , it would be gone by PermGen OOM.
> {code:java}
> @Autowired
> private RuleService ruleService;
> private KieServices ks = KieServices.Factory.get();
> private KieFileSystem kFileSystem = ks.newKieFileSystem();
> private KieContainer kContainer;
> private KieBase kieBase;
> private KieBuilder kbuilder;
> private String defaultPath;
> /*
> * (non-Javadoc)
> */
> @Override
> @PostConstruct
> public void init() {
> List<Rule> rules = new ArrayList<>();
> rules.add(ruleService.selectById(15));
> // List<Rule> rules = ruleService.selectAll(0, 0);
> String[] paths = new String[rules.size()];
> for (int i = 0; i < paths.length; i++) {
> paths[i] = rules.get(i).getPath();
> }
> init(paths);
> }
> public void init(String[] paths) {
> boolean isSetDefaultPath = false;
> for (String path : paths) {
> if (isSetDefaultPath)
> kFileSystem
> .write(ks.getResources().newClassPathResource(path));
> else {
> Resource resource = ks.getResources().newClassPathResource(
> path);
> kFileSystem.write(resource);
> defaultPath = resource.getResourceType().getDefaultPath() + "/";
> isSetDefaultPath = true;
> }
> }
> kbuilder = ks.newKieBuilder(kFileSystem);
> kbuilder.buildAll();
> kContainer = ks.newKieContainer(ks.getRepository()
> .getDefaultReleaseId());
> kieBase = kContainer.getKieBase();
> }
> /*
> * (non-Javadoc)
> */
> public void refresh() {
> kbuilder = ks.newKieBuilder(kFileSystem);
> kbuilder.buildAll();
> kContainer.updateToVersion(ks.getRepository().getDefaultReleaseId());
> }
> /*
> * (non-Javadoc)
> */
> @Override
> public KieSession getKieSession() {
> return kieBase.newKieSession();
> }
> @Override
> public void add(String path) {
> kFileSystem.write(ks.getResources().newClassPathResource(path));
> refresh();
> }
> @Override
> public void delete(String path) {
> kFileSystem.delete(defaultPath + path);
> refresh();
> }
> @Override
> public void update(String path) {
> kFileSystem.delete(defaultPath + path);
> kFileSystem.write(ks.getResources().newClassPathResource(path));
> refresh();
> }
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 8 months
[JBoss JIRA] (WFLY-7480) Description of Elytron final-name-rewriter resource
by Martin Choma (JIRA)
[ https://issues.jboss.org/browse/WFLY-7480?page=com.atlassian.jira.plugin.... ]
Martin Choma updated WFLY-7480:
-------------------------------
Labels: user_experience (was: )
> Description of Elytron final-name-rewriter resource
> ---------------------------------------------------
>
> Key: WFLY-7480
> URL: https://issues.jboss.org/browse/WFLY-7480
> Project: WildFly
> Issue Type: Bug
> Components: Security
> Affects Versions: 11.0.0.Alpha1
> Reporter: Martin Choma
> Labels: user_experience
>
> Describe in model / add operation / XSD purpose of this attribute. It is not obvious from name neither from description "The final name rewriter"
> What does this rewriter rewrites?
> As a reference, it can be configured in conjuction with {{pre-realm-mapper}} and {{post-realm-mapper}}, in those two cases I can understand from name and description what is it for.
> This JIRA applies to all occurences of {{final-name-rewriter}} in model:
> * 2x in {{http-authentication-factory}}
> * 2x in {{sasl-authentication-factory}}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 8 months
[JBoss JIRA] (WFLY-7481) Definition Credential Store with existing storage file but with wrong store password causes ugly failure-description.
by Hynek Švábek (JIRA)
Hynek Švábek created WFLY-7481:
----------------------------------
Summary: Definition Credential Store with existing storage file but with wrong store password causes ugly failure-description.
Key: WFLY-7481
URL: https://issues.jboss.org/browse/WFLY-7481
Project: WildFly
Issue Type: Bug
Components: Security
Reporter: Hynek Švábek
Assignee: Darran Lofthouse
Definition Credential Store with existing storage file but with wrong store password causes ugly failure-description.
*How to reproduce*
Prepare credential store file (the easiest way is create credential store from scratch)
/subsystem=elytron/credential-store=cs_pass123:add(uri="cr-store://test/cs/ks-pass123.jceks?store.password=pass123;create.storage=true")
/subsystem=elytron/credential-store=cs_pass123/alias=dbPass:add(secret-value=passwordToDB)
Then I try to create Credential store with wrong store password to existing store file.
/subsystem=elytron/credential-store=cs_wrong_store_pass:add(uri="cr-store://test/cs/ks-pass123.jceks?store.password=pass123wrong;key.password=pass123=true")
*I can see this result:*
{code}
{
"outcome" => "failed",
"failure-description" => {
"WFLYCTL0080: Failed services" => {"org.wildfly.security.credential-store-client.cs_wrong_key_pass" => "org.jboss.msc.service.StartException in service org.wildfly.security.credential-store-client.cs_wrong_key_pass: WFLYELY00004: Unable to start the service.
Caused by: org.wildfly.security.credential.store.CredentialStoreException: ELY09506: Cannot read credential storage file '/home/hsvabek/securityworkspace/VERIFICATION/2016_11_02_UX_testing/jboss-eap-7.1.0.DR7/standalone/data/cs/ks-pass123.jceks' for the store named 'cs_wrong_key_pass'
Caused by: java.io.IOException: Keystore was tampered with, or password was incorrect"},
"WFLYCTL0412: Required services that are not installed:" => ["org.wildfly.security.credential-store-client.cs_wrong_key_pass"],
"WFLYCTL0180: Services with missing/unavailable dependencies" => undefined
},
"rolled-back" => true
}
{code}
*Suggestion for solution*
failure-description must not contain Exception or snippet stacktrace.
Description like that "Password to access credential store is incorrect."
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 8 months
[JBoss JIRA] (DROOLS-1354) Drools PermGen OOM When create kiebulider several times
by Shukang Guo (JIRA)
[ https://issues.jboss.org/browse/DROOLS-1354?page=com.atlassian.jira.plugi... ]
Shukang Guo updated DROOLS-1354:
--------------------------------
Steps to Reproduce: several times after execute refresh()
> Drools PermGen OOM When create kiebulider several times
> -------------------------------------------------------
>
> Key: DROOLS-1354
> URL: https://issues.jboss.org/browse/DROOLS-1354
> Project: Drools
> Issue Type: Bug
> Components: core engine
> Affects Versions: 6.4.0.Final
> Environment: Windows7 Tomcat7 JDK1.7
> Reporter: Shukang Guo
> Assignee: Mario Fusco
>
> When i need updating the rule , first i will delete it from kieFileSystem , then add it .Second i will create a new KieBuilder and buildAll().But after several time i have done , it would be gone by PermGen OOM.
> {code:java}
> @Autowired
> private RuleService ruleService;
> private KieServices ks = KieServices.Factory.get();
> private KieFileSystem kFileSystem = ks.newKieFileSystem();
> private KieContainer kContainer;
> private KieBase kieBase;
> private KieBuilder kbuilder;
> private String defaultPath;
> /*
> * (non-Javadoc)
> *
> * @see com.huawei.datalifecycle.rules.RunRuless#init(java.lang.String[])
> */
> @Override
> @PostConstruct
> public void init() {
> List<Rule> rules = new ArrayList<>();
> rules.add(ruleService.selectById(15));
> // List<Rule> rules = ruleService.selectAll(0, 0);
> String[] paths = new String[rules.size()];
> for (int i = 0; i < paths.length; i++) {
> paths[i] = rules.get(i).getPath();
> }
> init(paths);
> }
> public void init(String[] paths) {
> boolean isSetDefaultPath = false;
> for (String path : paths) {
> if (isSetDefaultPath)
> kFileSystem
> .write(ks.getResources().newClassPathResource(path));
> else {
> Resource resource = ks.getResources().newClassPathResource(
> path);
> kFileSystem.write(resource);
> defaultPath = resource.getResourceType().getDefaultPath() + "/";
> isSetDefaultPath = true;
> }
> }
> kbuilder = ks.newKieBuilder(kFileSystem);
> kbuilder.buildAll();
> kContainer = ks.newKieContainer(ks.getRepository()
> .getDefaultReleaseId());
> kieBase = kContainer.getKieBase();
> }
> /*
> * (non-Javadoc)
> *
> * @see com.huawei.datalifecycle.rules.RunRuless#refresh(java.lang.String)
> */
> public void refresh() {
> kbuilder = ks.newKieBuilder(kFileSystem);
> kbuilder.buildAll();
> kContainer.updateToVersion(ks.getRepository().getDefaultReleaseId());
> }
> /*
> * (non-Javadoc)
> *
> * @see com.huawei.datalifecycle.rules.RunRuless#getKieSession()
> */
> @Override
> public KieSession getKieSession() {
> return kieBase.newKieSession();
> }
> @Override
> public void add(String path) {
> kFileSystem.write(ks.getResources().newClassPathResource(path));
> refresh();
> }
> @Override
> public void delete(String path) {
> kFileSystem.delete(defaultPath + path);
> refresh();
> }
> @Override
> public void update(String path) {
> kFileSystem.delete(defaultPath + path);
> kFileSystem.write(ks.getResources().newClassPathResource(path));
> refresh();
> }
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 8 months