[jira] [Commented] (KARAF-7061) Add default message escaping for Log4J2 configuration to help prevent log injection attacks

2021-03-05 Thread Serge Huber (Jira)


[ 
https://issues.apache.org/jira/browse/KARAF-7061?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17296037#comment-17296037
 ] 

Serge Huber commented on KARAF-7061:


Thank you so much for doing this so quickly!


> Add default message escaping for Log4J2 configuration to help prevent log 
> injection attacks
> ---
>
> Key: KARAF-7061
> URL: https://issues.apache.org/jira/browse/KARAF-7061
> Project: Karaf
>  Issue Type: Improvement
>  Components: karaf
>Affects Versions: 4.3.0, 4.2.10
>Reporter: Serge Huber
>Assignee: Jean-Baptiste Onofré
>Priority: Major
>
> As recommended in 
> https://www.linuxsecrets.com/owasp-wiki/index.php/Injection_Prevention_Cheat_Sheet_in_Java.html#Example_using_Log4j2
> to prevent log injections of CRLF or HTML code (which could be exploited if 
> the logs are displayed in an HTML page), we should change the default log4j2 
> pattern in Karaf from:
> {code}
> log4j2.pattern = %d{ISO8601} | %-5p | %-16t | %-32c{1} | %X{bundle.id} - 
> %X{bundle.name} - %X{bundle.version} | %m%n
> {code}
> to something like this:
> {code}
> log4j2.pattern = %d{ISO8601} | %-5p | %-16t | %-32c{1} | %X{bundle.id} - 
> %X{bundle.name} - %X{bundle.version} | %encode{%.-500m}%n
> {code}
> See : 
> This would limit the message to 500 characters to prevent sending huge 
> messages and will turn on the default HTML escaping which escapes for CRLF 
> and any HTML tags such as 

[jira] [Created] (KARAF-7061) Add default message escaping for Log4J2 configuration to help prevent log injection attacks

2021-03-05 Thread Serge Huber (Jira)
Serge Huber created KARAF-7061:
--

 Summary: Add default message escaping for Log4J2 configuration to 
help prevent log injection attacks
 Key: KARAF-7061
 URL: https://issues.apache.org/jira/browse/KARAF-7061
 Project: Karaf
  Issue Type: Improvement
  Components: karaf
Affects Versions: 4.2.10, 4.3.0
Reporter: Serge Huber


As recommended in 
https://www.linuxsecrets.com/owasp-wiki/index.php/Injection_Prevention_Cheat_Sheet_in_Java.html#Example_using_Log4j2
to prevent log injections of CRLF or HTML code (which could be exploited if the 
logs are displayed in an HTML page), we should change the default log4j2 
pattern in Karaf from:

{code}
log4j2.pattern = %d{ISO8601} | %-5p | %-16t | %-32c{1} | %X{bundle.id} - 
%X{bundle.name} - %X{bundle.version} | %m%n
{code}

to something like this:
{code}
log4j2.pattern = %d{ISO8601} | %-5p | %-16t | %-32c{1} | %X{bundle.id} - 
%X{bundle.name} - %X{bundle.version} | %encode{%.-500m}%n
{code}

See : 

This would limit the message to 500 characters to prevent sending huge messages 
and will turn on the default HTML escaping which escapes for CRLF and any HTML 
tags such as 

[jira] [Commented] (KARAF-6058) Even key based auth enabled, ssh still prompt for password

2019-01-19 Thread Serge Huber (JIRA)


[ 
https://issues.apache.org/jira/browse/KARAF-6058?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16746987#comment-16746987
 ] 

Serge Huber commented on KARAF-6058:


Thanks for all the changes. 

I was wondering if we should provide an example with another user name than 
"karaf" ? Because in my tests it works well with other users and maybe also 
clarify that users don't need to be registered in the users.properties file at 
all because that wasn't clear to me until I looked at the LoginModule code.

Also I was wondering if there was some way we could make the realm registration 
configurable because currently its hardcoded in the bundles but I guess that a 
story for another ticket :)

Regards,
  Serge

> Even key based auth enabled, ssh still prompt for password
> --
>
> Key: KARAF-6058
> URL: https://issues.apache.org/jira/browse/KARAF-6058
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf
>Affects Versions: 4.1.7
>Reporter: Jean-Baptiste Onofré
>Assignee: Jean-Baptiste Onofré
>Priority: Major
> Fix For: 4.1.8, 4.2.3
>
>
> It's documented at: 
> http://karaf.apache.org/manual/latest/#_managing_authentication_by_key
> I cannot get it work and wondering if I'm doing something wrong. Steps I did 
> to test the feature:
> {code}
> ssh-keygen -t dsa -f karaf.id_dsa # enter nothing for the passphrase
> {code}
> {code}
> # add a "karaf" entry with the generated public key
> vi apache-karaf-4.1.7/etc/keys.properties
> # start Karaf
> apache-karaf-4.1.7/bin/karaf server
> # try to connect without providing a password
> ssh -p 8101 -i ./karaf.id_dsa karaf@localhost
> Password authentication
> Password:
> {code}
> So it still prompts for a password... the public/private key-pair approach 
> doesn't work in Karaf 4.1.7 :-(
> I tried 4.1.5, 4.1.6, it also does not work. However, same approach works 
> fine in 4.0.10. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KARAF-6058) Even key based auth enabled, ssh still prompt for password

2019-01-18 Thread Serge Huber (JIRA)


[ 
https://issues.apache.org/jira/browse/KARAF-6058?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16746360#comment-16746360
 ] 

Serge Huber commented on KARAF-6058:


Seems like this is the cause : 
https://security.stackexchange.com/questions/112802/why-openssh-deprecated-dsa-keys

> Even key based auth enabled, ssh still prompt for password
> --
>
> Key: KARAF-6058
> URL: https://issues.apache.org/jira/browse/KARAF-6058
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf
>Affects Versions: 4.1.7
>Reporter: Jean-Baptiste Onofré
>Assignee: Jean-Baptiste Onofré
>Priority: Major
> Fix For: 4.1.8, 4.2.3
>
>
> It's documented at: 
> http://karaf.apache.org/manual/latest/#_managing_authentication_by_key
> I cannot get it work and wondering if I'm doing something wrong. Steps I did 
> to test the feature:
> {code}
> ssh-keygen -t dsa -f karaf.id_dsa # enter nothing for the passphrase
> {code}
> {code}
> # add a "karaf" entry with the generated public key
> vi apache-karaf-4.1.7/etc/keys.properties
> # start Karaf
> apache-karaf-4.1.7/bin/karaf server
> # try to connect without providing a password
> ssh -p 8101 -i ./karaf.id_dsa karaf@localhost
> Password authentication
> Password:
> {code}
> So it still prompts for a password... the public/private key-pair approach 
> doesn't work in Karaf 4.1.7 :-(
> I tried 4.1.5, 4.1.6, it also does not work. However, same approach works 
> fine in 4.0.10. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KARAF-6058) Even key based auth enabled, ssh still prompt for password

2019-01-18 Thread Serge Huber (JIRA)


[ 
https://issues.apache.org/jira/browse/KARAF-6058?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16746366#comment-16746366
 ] 

Serge Huber commented on KARAF-6058:


Well the problem is that in this ticket the example uses DSA and in the 
documentation (https://karaf.apache.org/manual/latest/security) as well :) 



> Even key based auth enabled, ssh still prompt for password
> --
>
> Key: KARAF-6058
> URL: https://issues.apache.org/jira/browse/KARAF-6058
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf
>Affects Versions: 4.1.7
>Reporter: Jean-Baptiste Onofré
>Assignee: Jean-Baptiste Onofré
>Priority: Major
> Fix For: 4.1.8, 4.2.3
>
>
> It's documented at: 
> http://karaf.apache.org/manual/latest/#_managing_authentication_by_key
> I cannot get it work and wondering if I'm doing something wrong. Steps I did 
> to test the feature:
> {code}
> ssh-keygen -t dsa -f karaf.id_dsa # enter nothing for the passphrase
> {code}
> {code}
> # add a "karaf" entry with the generated public key
> vi apache-karaf-4.1.7/etc/keys.properties
> # start Karaf
> apache-karaf-4.1.7/bin/karaf server
> # try to connect without providing a password
> ssh -p 8101 -i ./karaf.id_dsa karaf@localhost
> Password authentication
> Password:
> {code}
> So it still prompts for a password... the public/private key-pair approach 
> doesn't work in Karaf 4.1.7 :-(
> I tried 4.1.5, 4.1.6, it also does not work. However, same approach works 
> fine in 4.0.10. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Comment Edited] (KARAF-6058) Even key based auth enabled, ssh still prompt for password

2019-01-18 Thread Serge Huber (JIRA)


[ 
https://issues.apache.org/jira/browse/KARAF-6058?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16746366#comment-16746366
 ] 

Serge Huber edited comment on KARAF-6058 at 1/18/19 2:52 PM:
-

Well the problem is that in this ticket the example uses DSA and in the 
documentation (https://karaf.apache.org/manual/latest/security) as well :) 

Oh and yes I did test by adding the SSH role that was indeed missing


was (Author: shuber):
Well the problem is that in this ticket the example uses DSA and in the 
documentation (https://karaf.apache.org/manual/latest/security) as well :) 



> Even key based auth enabled, ssh still prompt for password
> --
>
> Key: KARAF-6058
> URL: https://issues.apache.org/jira/browse/KARAF-6058
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf
>Affects Versions: 4.1.7
>Reporter: Jean-Baptiste Onofré
>Assignee: Jean-Baptiste Onofré
>Priority: Major
> Fix For: 4.1.8, 4.2.3
>
>
> It's documented at: 
> http://karaf.apache.org/manual/latest/#_managing_authentication_by_key
> I cannot get it work and wondering if I'm doing something wrong. Steps I did 
> to test the feature:
> {code}
> ssh-keygen -t dsa -f karaf.id_dsa # enter nothing for the passphrase
> {code}
> {code}
> # add a "karaf" entry with the generated public key
> vi apache-karaf-4.1.7/etc/keys.properties
> # start Karaf
> apache-karaf-4.1.7/bin/karaf server
> # try to connect without providing a password
> ssh -p 8101 -i ./karaf.id_dsa karaf@localhost
> Password authentication
> Password:
> {code}
> So it still prompts for a password... the public/private key-pair approach 
> doesn't work in Karaf 4.1.7 :-(
> I tried 4.1.5, 4.1.6, it also does not work. However, same approach works 
> fine in 4.0.10. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KARAF-6058) Even key based auth enabled, ssh still prompt for password

2019-01-18 Thread Serge Huber (JIRA)


[ 
https://issues.apache.org/jira/browse/KARAF-6058?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16746351#comment-16746351
 ] 

Serge Huber commented on KARAF-6058:


I have been testing this type of auth on my Mac and it seems that DSA is not 
supported anymore, only RSA seems to be sent.

> Even key based auth enabled, ssh still prompt for password
> --
>
> Key: KARAF-6058
> URL: https://issues.apache.org/jira/browse/KARAF-6058
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf
>Affects Versions: 4.1.7
>Reporter: Jean-Baptiste Onofré
>Assignee: Jean-Baptiste Onofré
>Priority: Major
> Fix For: 4.1.8, 4.2.3
>
>
> It's documented at: 
> http://karaf.apache.org/manual/latest/#_managing_authentication_by_key
> I cannot get it work and wondering if I'm doing something wrong. Steps I did 
> to test the feature:
> {code}
> ssh-keygen -t dsa -f karaf.id_dsa # enter nothing for the passphrase
> {code}
> {code}
> # add a "karaf" entry with the generated public key
> vi apache-karaf-4.1.7/etc/keys.properties
> # start Karaf
> apache-karaf-4.1.7/bin/karaf server
> # try to connect without providing a password
> ssh -p 8101 -i ./karaf.id_dsa karaf@localhost
> Password authentication
> Password:
> {code}
> So it still prompts for a password... the public/private key-pair approach 
> doesn't work in Karaf 4.1.7 :-(
> I tried 4.1.5, 4.1.6, it also does not work. However, same approach works 
> fine in 4.0.10. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KARAF-4609) Be able to override ConfigAdmin properties with System/JVM properties

2018-12-21 Thread Serge Huber (JIRA)


[ 
https://issues.apache.org/jira/browse/KARAF-4609?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16726844#comment-16726844
 ] 

Serge Huber commented on KARAF-4609:


Hmm... I'm not that fond of having to prepare the image because that forces to 
put placeholder for lots of properties "just in case" you can to override them. 

Because of no other option I did this in this commit for Apache Unomi:
https://github.com/apache/incubator-unomi/commit/b873b35a208a53b607d3e0928ec46c975d2024ff

As you can see in that commit it also means that you need to override default 
cfg files which is also a problem when upgrading the packaged Karaf.

It would probably be better to have an override mechanism as proposed initially 
in this ticket to avoid having to go to these measures.


> Be able to override ConfigAdmin properties with System/JVM properties
> -
>
> Key: KARAF-4609
> URL: https://issues.apache.org/jira/browse/KARAF-4609
> Project: Karaf
>  Issue Type: Improvement
>  Components: karaf
>Reporter: Jean-Baptiste Onofré
>Assignee: Jean-Baptiste Onofré
>Priority: Minor
>
> It would be great to be able to override some ConfigAdmin properties using 
> '-Dconfig.myproperty=' at startup.
> It's especially interesting when using Karaf in Docker.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Comment Edited] (KARAF-4361) Allow dynamic config customization when embedding Karaf using the Main class

2017-03-15 Thread Serge Huber (JIRA)

[ 
https://issues.apache.org/jira/browse/KARAF-4361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15925793#comment-15925793
 ] 

Serge Huber edited comment on KARAF-4361 at 3/15/17 9:25 AM:
-

I just checked the status of the master branch and it seems this patch was not 
completely applied or was lost somehow ? It's missing the check in the launch 
method but the setConfig() method is present.

The karaf-4.0.x branch seems ok though.


was (Author: shuber):
I just checked the status of the master branch and it seems this patch was not 
applied correctly or was lost somehow ? It's missing the check in the launch 
method.

The karaf-4.0.x branch seems ok though.

> Allow dynamic config customization when embedding Karaf using the Main class
> 
>
> Key: KARAF-4361
> URL: https://issues.apache.org/jira/browse/KARAF-4361
> Project: Karaf
>  Issue Type: Improvement
>  Components: karaf-core
>Affects Versions: 4.1.0, 4.0.4
>Reporter: Serge Huber
>Assignee: Guillaume Nodet
> Fix For: 4.0.9, 4.1.1
>
> Attachments: 
> KARAF_4361_Allow_dynamic_config_customization_when_embedding_Karaf_using_the_Main_class.patch
>
>
> We are using Karaf by embedding it and basically starting it like this : 
> {code}
> // code to setup System properties
> main = new Main(new String[0]);
> main.launch();
> {code}
> The problem is that the ConfigProperties that are used to startup Karaf are 
> directly created in the main.launch() method, like this:
> {code}
> public void launch() throws Exception {
> config = new ConfigProperties();
> {code}
> Ideally it would be great if we could either have a setter to provide the 
> config value, so that we could manipulate it before launching. In an embedded 
> environment this quickly becomes a necessity. For example we would like to 
> make it possible to have retrieve properties coming from another framework 
> such as Spring and use those to override  config.properties settings in a 
> dynamic way, without needing to dump them to a file at Karaf startup. I'm 
> aware of the ${includes} and ${optionals} but those require files to be read 
> from the disk where here I'm talking about being able to dynamically 
> manipulate the properties once loaded.
> Basically something like this would be fantastic
> {code}
> // code to setup System properties
> main = new Main(new String[0]);
> ConfigProperties config = main.getConfig();
> if (config == null) {
>config = new ConfigProperties();
> }
> // manipulate config in any way desired
> main.setConfig(config)
> main.launch();
> {code}
> The main.launch could then simply be modified to something like this : 
> {code}
> public void launch() throws Exception {
> if (config == null) {
> config = new ConfigProperties();
> }
> {code}
> Btw we are using Karaf 4.0.x so having this in both Karaf 4.1.0 and Karaf 4.0 
> would be fantastic.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Reopened] (KARAF-4361) Allow dynamic config customization when embedding Karaf using the Main class

2017-03-15 Thread Serge Huber (JIRA)

 [ 
https://issues.apache.org/jira/browse/KARAF-4361?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Serge Huber reopened KARAF-4361:


I just checked the status of the master branch and it seems this patch was not 
applied correctly or was lost somehow ? It's missing the check in the launch 
method.

The karaf-4.0.x branch seems ok though.

> Allow dynamic config customization when embedding Karaf using the Main class
> 
>
> Key: KARAF-4361
> URL: https://issues.apache.org/jira/browse/KARAF-4361
> Project: Karaf
>  Issue Type: Improvement
>  Components: karaf-core
>Affects Versions: 4.1.0, 4.0.4
>Reporter: Serge Huber
>Assignee: Guillaume Nodet
> Fix For: 4.0.9, 4.1.1
>
> Attachments: 
> KARAF_4361_Allow_dynamic_config_customization_when_embedding_Karaf_using_the_Main_class.patch
>
>
> We are using Karaf by embedding it and basically starting it like this : 
> {code}
> // code to setup System properties
> main = new Main(new String[0]);
> main.launch();
> {code}
> The problem is that the ConfigProperties that are used to startup Karaf are 
> directly created in the main.launch() method, like this:
> {code}
> public void launch() throws Exception {
> config = new ConfigProperties();
> {code}
> Ideally it would be great if we could either have a setter to provide the 
> config value, so that we could manipulate it before launching. In an embedded 
> environment this quickly becomes a necessity. For example we would like to 
> make it possible to have retrieve properties coming from another framework 
> such as Spring and use those to override  config.properties settings in a 
> dynamic way, without needing to dump them to a file at Karaf startup. I'm 
> aware of the ${includes} and ${optionals} but those require files to be read 
> from the disk where here I'm talking about being able to dynamically 
> manipulate the properties once loaded.
> Basically something like this would be fantastic
> {code}
> // code to setup System properties
> main = new Main(new String[0]);
> ConfigProperties config = main.getConfig();
> if (config == null) {
>config = new ConfigProperties();
> }
> // manipulate config in any way desired
> main.setConfig(config)
> main.launch();
> {code}
> The main.launch could then simply be modified to something like this : 
> {code}
> public void launch() throws Exception {
> if (config == null) {
> config = new ConfigProperties();
> }
> {code}
> Btw we are using Karaf 4.0.x so having this in both Karaf 4.1.0 and Karaf 4.0 
> would be fantastic.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (KARAF-4361) Allow dynamic config customization when embedding Karaf using the Main class

2016-02-25 Thread Serge Huber (JIRA)

 [ 
https://issues.apache.org/jira/browse/KARAF-4361?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Serge Huber updated KARAF-4361:
---
Description: 
We are using Karaf by embedding it and basically starting it like this : 

{code}
// code to setup System properties
main = new Main(new String[0]);
main.launch();
{code}

The problem is that the ConfigProperties that are used to startup Karaf are 
directly created in the main.launch() method, like this:

{code}
public void launch() throws Exception {
config = new ConfigProperties();
{code}

Ideally it would be great if we could either have a setter to provide the 
config value, so that we could manipulate it before launching. In an embedded 
environment this quickly becomes a necessity. For example we would like to make 
it possible to have retrieve properties coming from another framework such as 
Spring and use those to override  config.properties settings in a dynamic way, 
without needing to dump them to a file at Karaf startup. I'm aware of the 
${includes} and ${optionals} but those require files to be read from the disk 
where here I'm talking about being able to dynamically manipulate the 
properties once loaded.

Basically something like this would be fantastic

{code}
// code to setup System properties
main = new Main(new String[0]);
ConfigProperties config = main.getConfig();
if (config == null) {
   config = new ConfigProperties();
}
// manipulate config in any way desired
main.setConfig(config)
main.launch();
{code}

The main.launch could then simply be modified to something like this : 
{code}
public void launch() throws Exception {
if (config == null) {
config = new ConfigProperties();
}
{code}

Btw we are using Karaf 4.0.x so having this in both Karaf 4.1.0 and Karaf 4.0 
would be fantastic.


  was:
We are using Karaf by embedding it and basically starting it like this : 

{code}
// code to setup System properties
main = new Main(new String[0]);
main.launch();
{code}

The problem is that the ConfigProperties that are used to startup Karaf are 
directly created in the main.launch() method, like this:

{code}
public void launch() throws Exception {
config = new ConfigProperties();
{code}

Ideally it would be great if we could either have a setter to provide the 
config value, so that we could manipulate it before launching. In an embedded 
environment this quickly becomes a necessity. For example we would like to make 
it possible to have calculate properties that override the values of the 
config.properties settings in a dynamic way. I'm aware of the ${includes} and 
${optionals} but those require files to be read from the disk where here I'm 
talking about being able to dynamically manipulate the properties once loaded.

Basically something like this would be fantastic

{code}
// code to setup System properties
main = new Main(new String[0]);
ConfigProperties config = main.getConfig();
if (config == null) {
   config = new ConfigProperties();
}
// manipulate config in any way desired
main.setConfig(config)
main.launch();
{code}

The main.launch could then simply be modified to something like this : 
{code}
public void launch() throws Exception {
if (config == null) {
config = new ConfigProperties();
}
{code}

Btw we are using Karaf 4.0.x so having this in both Karaf 4.1.0 and Karaf 4.0 
would be fantastic.



> Allow dynamic config customization when embedding Karaf using the Main class
> 
>
> Key: KARAF-4361
> URL: https://issues.apache.org/jira/browse/KARAF-4361
> Project: Karaf
>  Issue Type: Improvement
>  Components: karaf-core
>Affects Versions: 4.1.0, 4.0.4
>Reporter: Serge Huber
> Attachments: 
> KARAF_4361_Allow_dynamic_config_customization_when_embedding_Karaf_using_the_Main_class.patch
>
>
> We are using Karaf by embedding it and basically starting it like this : 
> {code}
> // code to setup System properties
> main = new Main(new String[0]);
> main.launch();
> {code}
> The problem is that the ConfigProperties that are used to startup Karaf are 
> directly created in the main.launch() method, like this:
> {code}
> public void launch() throws Exception {
> config = new ConfigProperties();
> {code}
> Ideally it would be great if we could either have a setter to provide the 
> config value, so that we could manipulate it before launching. In an embedded 
> environment this quickly becomes a 

[jira] [Updated] (KARAF-4361) Allow dynamic config customization when embedding Karaf using the Main class

2016-02-25 Thread Serge Huber (JIRA)

 [ 
https://issues.apache.org/jira/browse/KARAF-4361?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Serge Huber updated KARAF-4361:
---
Description: 
We are using Karaf by embedding it and basically starting it like this : 

{code}
// code to setup System properties
main = new Main(new String[0]);
main.launch();
{code}

The problem is that the ConfigProperties that are used to startup Karaf are 
directly created in the main.launch() method, like this:

{code}
public void launch() throws Exception {
config = new ConfigProperties();
{code}

Ideally it would be great if we could either have a setter to provide the 
config value, so that we could manipulate it before launching. In an embedded 
environment this quickly becomes a necessity. For example we would like to make 
it possible to have "custom.properties" files that could override the values of 
the config.properties settings so that we can offer integrators to modify a 
custom file without touching the default file.

Basically something like this would be fantastic

{code}
// code to setup System properties
main = new Main(new String[0]);
ConfigProperties config = main.getConfig();
if (config == null) {
   config = new ConfigProperties();
}
// manipulate config in any way desired
main.setConfig(config)
main.launch();
{code}

The main.launch could then simply be modified to something like this : 
{code}
public void launch() throws Exception {
if (config == null) {
config = new ConfigProperties();
}
{code}

Btw we are using Karaf 4.0.x so having this in both Karaf 4.1.0 and Karaf 4.0 
would be fantastic.


  was:
We are using Karaf by embedding it and basically starting it like this : 

{code}
// code to setup System properties
main = new Main(new String[0]);
main.launch();
{code}

The problem is that the ConfigProperties that are used to startup Karaf are 
directly created in the main.launch() method, like this:

{code}
public void launch() throws Exception {
config = new ConfigProperties();
{code}

Ideally it would be great if we could either have a setter to provide the 
config value, so that we could manipulate it before launching. In an embedded 
environment this quickly becomes a necessity.

Basically something like this would be fantastic

{code}
// code to setup System properties
main = new Main(new String[0]);
ConfigProperties config = main.getConfig();
if (config == null) {
   config = new ConfigProperties();
}
// manipulate config in any way desired
main.setConfig(config)
main.launch();
{code}

The main.launch could then simply be modified to something like this : 
{code}
public void launch() throws Exception {
if (config == null) {
config = new ConfigProperties();
}
{code}

Btw we are using Karaf 4.0.x so having this in both Karaf 4.1.0 and Karaf 4.0 
would be fantastic.



> Allow dynamic config customization when embedding Karaf using the Main class
> 
>
> Key: KARAF-4361
> URL: https://issues.apache.org/jira/browse/KARAF-4361
> Project: Karaf
>  Issue Type: Improvement
>  Components: karaf-core
>Affects Versions: 4.1.0, 4.0.4
>Reporter: Serge Huber
> Attachments: 
> KARAF_4361_Allow_dynamic_config_customization_when_embedding_Karaf_using_the_Main_class.patch
>
>
> We are using Karaf by embedding it and basically starting it like this : 
> {code}
> // code to setup System properties
> main = new Main(new String[0]);
> main.launch();
> {code}
> The problem is that the ConfigProperties that are used to startup Karaf are 
> directly created in the main.launch() method, like this:
> {code}
> public void launch() throws Exception {
> config = new ConfigProperties();
> {code}
> Ideally it would be great if we could either have a setter to provide the 
> config value, so that we could manipulate it before launching. In an embedded 
> environment this quickly becomes a necessity. For example we would like to 
> make it possible to have "custom.properties" files that could override the 
> values of the config.properties settings so that we can offer integrators to 
> modify a custom file without touching the default file.
> Basically something like this would be fantastic
> {code}
> // code to setup System properties
> main = new Main(new String[0]);
> ConfigProperties config = main.getConfig();
> if (config == null) {
>config = new ConfigProperties();
> 

[jira] [Updated] (KARAF-4361) Allow dynamic config customization when embedding Karaf using the Main class

2016-02-25 Thread Serge Huber (JIRA)

 [ 
https://issues.apache.org/jira/browse/KARAF-4361?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Serge Huber updated KARAF-4361:
---
Description: 
We are using Karaf by embedding it and basically starting it like this : 

{code}
// code to setup System properties
main = new Main(new String[0]);
main.launch();
{code}

The problem is that the ConfigProperties that are used to startup Karaf are 
directly created in the main.launch() method, like this:

{code}
public void launch() throws Exception {
config = new ConfigProperties();
{code}

Ideally it would be great if we could either have a setter to provide the 
config value, so that we could manipulate it before launching. In an embedded 
environment this quickly becomes a necessity. For example we would like to make 
it possible to have calculate properties that override the values of the 
config.properties settings in a dynamic way. I'm aware of the ${includes} and 
${optionals} but those require files to be read from the disk where here I'm 
talking about being able to dynamically manipulate the properties once loaded.

Basically something like this would be fantastic

{code}
// code to setup System properties
main = new Main(new String[0]);
ConfigProperties config = main.getConfig();
if (config == null) {
   config = new ConfigProperties();
}
// manipulate config in any way desired
main.setConfig(config)
main.launch();
{code}

The main.launch could then simply be modified to something like this : 
{code}
public void launch() throws Exception {
if (config == null) {
config = new ConfigProperties();
}
{code}

Btw we are using Karaf 4.0.x so having this in both Karaf 4.1.0 and Karaf 4.0 
would be fantastic.


  was:
We are using Karaf by embedding it and basically starting it like this : 

{code}
// code to setup System properties
main = new Main(new String[0]);
main.launch();
{code}

The problem is that the ConfigProperties that are used to startup Karaf are 
directly created in the main.launch() method, like this:

{code}
public void launch() throws Exception {
config = new ConfigProperties();
{code}

Ideally it would be great if we could either have a setter to provide the 
config value, so that we could manipulate it before launching. In an embedded 
environment this quickly becomes a necessity. For example we would like to make 
it possible to have "custom.properties" files that could override the values of 
the config.properties settings so that we can offer integrators to modify a 
custom file without touching the default file.

Basically something like this would be fantastic

{code}
// code to setup System properties
main = new Main(new String[0]);
ConfigProperties config = main.getConfig();
if (config == null) {
   config = new ConfigProperties();
}
// manipulate config in any way desired
main.setConfig(config)
main.launch();
{code}

The main.launch could then simply be modified to something like this : 
{code}
public void launch() throws Exception {
if (config == null) {
config = new ConfigProperties();
}
{code}

Btw we are using Karaf 4.0.x so having this in both Karaf 4.1.0 and Karaf 4.0 
would be fantastic.



> Allow dynamic config customization when embedding Karaf using the Main class
> 
>
> Key: KARAF-4361
> URL: https://issues.apache.org/jira/browse/KARAF-4361
> Project: Karaf
>  Issue Type: Improvement
>  Components: karaf-core
>Affects Versions: 4.1.0, 4.0.4
>Reporter: Serge Huber
> Attachments: 
> KARAF_4361_Allow_dynamic_config_customization_when_embedding_Karaf_using_the_Main_class.patch
>
>
> We are using Karaf by embedding it and basically starting it like this : 
> {code}
> // code to setup System properties
> main = new Main(new String[0]);
> main.launch();
> {code}
> The problem is that the ConfigProperties that are used to startup Karaf are 
> directly created in the main.launch() method, like this:
> {code}
> public void launch() throws Exception {
> config = new ConfigProperties();
> {code}
> Ideally it would be great if we could either have a setter to provide the 
> config value, so that we could manipulate it before launching. In an embedded 
> environment this quickly becomes a necessity. For example we would like to 
> make it possible to have calculate properties that override the values of the 
> config.properties settings in a dynamic way. I'm aware of the ${includes} and 
> 

[jira] [Updated] (KARAF-4361) Allow dynamic config customization when embedding Karaf using the Main class

2016-02-25 Thread Serge Huber (JIRA)

 [ 
https://issues.apache.org/jira/browse/KARAF-4361?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Serge Huber updated KARAF-4361:
---
Attachment: 
KARAF_4361_Allow_dynamic_config_customization_when_embedding_Karaf_using_the_Main_class.patch

I've attached a patch I generated against the Karaf 4.0.x that implements the 
getter and setter for the config variable and also modified the launch method 
to check if the variable is null and only set it up when it is null. 

In effect this shouldn't change the contract for existing uses, but should make 
it possible to access and modify the config properties setup before the launch 
is called.

> Allow dynamic config customization when embedding Karaf using the Main class
> 
>
> Key: KARAF-4361
> URL: https://issues.apache.org/jira/browse/KARAF-4361
> Project: Karaf
>  Issue Type: Improvement
>  Components: karaf-core
>Affects Versions: 4.1.0, 4.0.4
>Reporter: Serge Huber
> Attachments: 
> KARAF_4361_Allow_dynamic_config_customization_when_embedding_Karaf_using_the_Main_class.patch
>
>
> We are using Karaf by embedding it and basically starting it like this : 
> {code}
> // code to setup System properties
> main = new Main(new String[0]);
> main.launch();
> {code}
> The problem is that the ConfigProperties that are used to startup Karaf are 
> directly created in the main.launch() method, like this:
> {code}
> public void launch() throws Exception {
> config = new ConfigProperties();
> {code}
> Ideally it would be great if we could either have a setter to provide the 
> config value, so that we could manipulate it before launching. In an embedded 
> environment this quickly becomes a necessity.
> Basically something like this would be fantastic
> {code}
> // code to setup System properties
> main = new Main(new String[0]);
> ConfigProperties config = main.getConfig();
> if (config == null) {
>config = new ConfigProperties();
> }
> // manipulate config in any way desired
> main.setConfig(config)
> main.launch();
> {code}
> The main.launch could then simply be modified to something like this : 
> {code}
> public void launch() throws Exception {
> if (config == null) {
> config = new ConfigProperties();
> }
> {code}
> Btw we are using Karaf 4.0.x so having this in both Karaf 4.1.0 and Karaf 4.0 
> would be fantastic.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (KARAF-4361) Allow dynamic config customization when embedding Karaf using the Main class

2016-02-25 Thread Serge Huber (JIRA)

 [ 
https://issues.apache.org/jira/browse/KARAF-4361?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Serge Huber updated KARAF-4361:
---
Description: 
We are using Karaf by embedding it and basically starting it like this : 

{code}
// code to setup System properties
main = new Main(new String[0]);
main.launch();
{code}

The problem is that the ConfigProperties that are used to startup Karaf are 
directly created in the main.launch() method, like this:

{code}
public void launch() throws Exception {
config = new ConfigProperties();
{code}

Ideally it would be great if we could either have a setter to provide the 
config value, so that we could manipulate it before launching. In an embedded 
environment this quickly becomes a necessity.

Basically something like this would be fantastic

{code}
// code to setup System properties
main = new Main(new String[0]);
ConfigProperties config = main.getConfig();
if (config == null) {
   config = new ConfigProperties();
}
// manipulate config in any way desired
main.setConfig(config)
main.launch();
{code}

The main.launch could then simply be modified to something like this : 
{code}
public void launch() throws Exception {
if (config == null) {
config = new ConfigProperties();
}
{code}

Btw we are using Karaf 4.0.x so having this in both Karaf 4.1.0 and Karaf 4.0 
would be fantastic.


  was:
We are using Karaf by embedding it and basically starting it like this : 

{code}
// code to setup System properties
main = new Main(new String[0]);
main.launch();
{code}

The problem is that the ConfigProperties that are used to startup Karaf are 
directly created in the main.launch() method, like this:

{code}
public void launch() throws Exception {
config = new ConfigProperties();
{code}

Ideally it would be great if we could either have a setter to provide the 
config value, so that we could manipulate it before launching. In an embedded 
environment this quickly becomes a necessity.

Basically something like this would be fantastic

{code}
// code to setup System properties
main = new Main(new String[0]);
ConfigProperties config = main.getConfigProperties();
if (config == null) {
   config = new ConfigProperties();
}
// manipulate config in any way desired
main.setConfigProperties(config)
main.launch();
{code}

The main.launch could then simply be modified to something like this : 
{code}
public void launch() throws Exception {
if (config == null) {
config = new ConfigProperties();
}
{code}

Btw we are using Karaf 4.0.x so having this in both Karaf 4.1.0 and Karaf 4.0 
would be fantastic.



> Allow dynamic config customization when embedding Karaf using the Main class
> 
>
> Key: KARAF-4361
> URL: https://issues.apache.org/jira/browse/KARAF-4361
> Project: Karaf
>  Issue Type: Improvement
>  Components: karaf-core
>Affects Versions: 4.1.0, 4.0.4
>Reporter: Serge Huber
>
> We are using Karaf by embedding it and basically starting it like this : 
> {code}
> // code to setup System properties
> main = new Main(new String[0]);
> main.launch();
> {code}
> The problem is that the ConfigProperties that are used to startup Karaf are 
> directly created in the main.launch() method, like this:
> {code}
> public void launch() throws Exception {
> config = new ConfigProperties();
> {code}
> Ideally it would be great if we could either have a setter to provide the 
> config value, so that we could manipulate it before launching. In an embedded 
> environment this quickly becomes a necessity.
> Basically something like this would be fantastic
> {code}
> // code to setup System properties
> main = new Main(new String[0]);
> ConfigProperties config = main.getConfig();
> if (config == null) {
>config = new ConfigProperties();
> }
> // manipulate config in any way desired
> main.setConfig(config)
> main.launch();
> {code}
> The main.launch could then simply be modified to something like this : 
> {code}
> public void launch() throws Exception {
> if (config == null) {
> config = new ConfigProperties();
> }
> {code}
> Btw we are using Karaf 4.0.x so having this in both Karaf 4.1.0 and Karaf 4.0 
> would be fantastic.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (KARAF-4361) Allow dynamic config customization when embedding Karaf using the Main class

2016-02-25 Thread Serge Huber (JIRA)

 [ 
https://issues.apache.org/jira/browse/KARAF-4361?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Serge Huber updated KARAF-4361:
---
Description: 
We are using Karaf by embedding it and basically starting it like this : 

{code}
// code to setup System properties
main = new Main(new String[0]);
main.launch();
{code}

The problem is that the ConfigProperties that are used to startup Karaf are 
directly created in the main.launch() method, like this:

{code}
public void launch() throws Exception {
config = new ConfigProperties();
{code}

Ideally it would be great if we could either have a setter to provide the 
config value, so that we could manipulate it before launching. In an embedded 
environment this quickly becomes a necessity.

Basically something like this would be fantastic

{code}
// code to setup System properties
main = new Main(new String[0]);
ConfigProperties config = main.getConfigProperties();
if (config == null) {
   config = new ConfigProperties();
}
// manipulate config in any way desired
main.setConfigProperties(config)
main.launch();
{code}

The main.launch could then simply be modified to something like this : 
{code}
public void launch() throws Exception {
if (config == null) {
config = new ConfigProperties();
}
{code}

Btw we are using Karaf 4.0.x so having this in both Karaf 4.1.0 and Karaf 4.0 
would be fantastic.


  was:
We are using Karaf by embedding it and basically starting it like this : 

{code}
// code to setup System properties
main = new Main(new String[0]);
main.launch();
{code}

The problem is that the ConfigProperties that are used to startup Karaf are 
directly created in the main.launch() method, like this:

{code}
public void launch() throws Exception {
config = new ConfigProperties();
{code}

Ideally it would be great if we could either have a setter to provide the 
config value, so that we could manipulate it before launching. In an embedded 
environment this quickly becomes a necessity.

Basically something like this would be fantastic

{code}
// code to setup System properties
main = new Main(new String[0]);
ConfigProperties config = main.getConfigProperties();
// manipulate config in any way desired
main.setConfigProperties(config)
main.launch();
{code}

The main.launch could then simply be modified to something like this : 
{code}
public void launch() throws Exception {
if (config == null) {
config = new ConfigProperties();
}
{code}

Btw we are using Karaf 4.0.x so having this in both Karaf 4.1.0 and Karaf 4.0 
would be fantastic.



> Allow dynamic config customization when embedding Karaf using the Main class
> 
>
> Key: KARAF-4361
> URL: https://issues.apache.org/jira/browse/KARAF-4361
> Project: Karaf
>  Issue Type: Improvement
>  Components: karaf-core
>Affects Versions: 4.1.0, 4.0.4
>Reporter: Serge Huber
>
> We are using Karaf by embedding it and basically starting it like this : 
> {code}
> // code to setup System properties
> main = new Main(new String[0]);
> main.launch();
> {code}
> The problem is that the ConfigProperties that are used to startup Karaf are 
> directly created in the main.launch() method, like this:
> {code}
> public void launch() throws Exception {
> config = new ConfigProperties();
> {code}
> Ideally it would be great if we could either have a setter to provide the 
> config value, so that we could manipulate it before launching. In an embedded 
> environment this quickly becomes a necessity.
> Basically something like this would be fantastic
> {code}
> // code to setup System properties
> main = new Main(new String[0]);
> ConfigProperties config = main.getConfigProperties();
> if (config == null) {
>config = new ConfigProperties();
> }
> // manipulate config in any way desired
> main.setConfigProperties(config)
> main.launch();
> {code}
> The main.launch could then simply be modified to something like this : 
> {code}
> public void launch() throws Exception {
> if (config == null) {
> config = new ConfigProperties();
> }
> {code}
> Btw we are using Karaf 4.0.x so having this in both Karaf 4.1.0 and Karaf 4.0 
> would be fantastic.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (KARAF-4361) Allow dynamic config customization when embedding Karaf using the Main class

2016-02-25 Thread Serge Huber (JIRA)
Serge Huber created KARAF-4361:
--

 Summary: Allow dynamic config customization when embedding Karaf 
using the Main class
 Key: KARAF-4361
 URL: https://issues.apache.org/jira/browse/KARAF-4361
 Project: Karaf
  Issue Type: Improvement
  Components: karaf-core
Affects Versions: 4.0.4, 4.1.0
Reporter: Serge Huber


We are using Karaf by embedding it and basically starting it like this : 

{code}
// code to setup System properties
main = new Main(new String[0]);
main.launch();
{code}

The problem is that the ConfigProperties that are used to startup Karaf are 
directly created in the main.launch() method, like this:

{code}
public void launch() throws Exception {
config = new ConfigProperties();
{code}

Ideally it would be great if we could either have a setter to provide the 
config value, so that we could manipulate it before launching. In an embedded 
environment this quickly becomes a necessity.

Basically something like this would be fantastic

{code}
// code to setup System properties
main = new Main(new String[0]);
ConfigProperties config = main.getConfigProperties();
// manipulate config in any way desired
main.setConfigProperties(config)
main.launch();
{code}

The main.launch could then simply be modified to something like this : 
{code}
public void launch() throws Exception {
if (config == null) {
config = new ConfigProperties();
}
{code}




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (KARAF-4361) Allow dynamic config customization when embedding Karaf using the Main class

2016-02-25 Thread Serge Huber (JIRA)

 [ 
https://issues.apache.org/jira/browse/KARAF-4361?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Serge Huber updated KARAF-4361:
---
Description: 
We are using Karaf by embedding it and basically starting it like this : 

{code}
// code to setup System properties
main = new Main(new String[0]);
main.launch();
{code}

The problem is that the ConfigProperties that are used to startup Karaf are 
directly created in the main.launch() method, like this:

{code}
public void launch() throws Exception {
config = new ConfigProperties();
{code}

Ideally it would be great if we could either have a setter to provide the 
config value, so that we could manipulate it before launching. In an embedded 
environment this quickly becomes a necessity.

Basically something like this would be fantastic

{code}
// code to setup System properties
main = new Main(new String[0]);
ConfigProperties config = main.getConfigProperties();
// manipulate config in any way desired
main.setConfigProperties(config)
main.launch();
{code}

The main.launch could then simply be modified to something like this : 
{code}
public void launch() throws Exception {
if (config == null) {
config = new ConfigProperties();
}
{code}

Btw we are using Karaf 4.0.x so having this in both Karaf 4.1.0 and Karaf 4.0 
would be fantastic.


  was:
We are using Karaf by embedding it and basically starting it like this : 

{code}
// code to setup System properties
main = new Main(new String[0]);
main.launch();
{code}

The problem is that the ConfigProperties that are used to startup Karaf are 
directly created in the main.launch() method, like this:

{code}
public void launch() throws Exception {
config = new ConfigProperties();
{code}

Ideally it would be great if we could either have a setter to provide the 
config value, so that we could manipulate it before launching. In an embedded 
environment this quickly becomes a necessity.

Basically something like this would be fantastic

{code}
// code to setup System properties
main = new Main(new String[0]);
ConfigProperties config = main.getConfigProperties();
// manipulate config in any way desired
main.setConfigProperties(config)
main.launch();
{code}

The main.launch could then simply be modified to something like this : 
{code}
public void launch() throws Exception {
if (config == null) {
config = new ConfigProperties();
}
{code}



> Allow dynamic config customization when embedding Karaf using the Main class
> 
>
> Key: KARAF-4361
> URL: https://issues.apache.org/jira/browse/KARAF-4361
> Project: Karaf
>  Issue Type: Improvement
>  Components: karaf-core
>Affects Versions: 4.1.0, 4.0.4
>Reporter: Serge Huber
>
> We are using Karaf by embedding it and basically starting it like this : 
> {code}
> // code to setup System properties
> main = new Main(new String[0]);
> main.launch();
> {code}
> The problem is that the ConfigProperties that are used to startup Karaf are 
> directly created in the main.launch() method, like this:
> {code}
> public void launch() throws Exception {
> config = new ConfigProperties();
> {code}
> Ideally it would be great if we could either have a setter to provide the 
> config value, so that we could manipulate it before launching. In an embedded 
> environment this quickly becomes a necessity.
> Basically something like this would be fantastic
> {code}
> // code to setup System properties
> main = new Main(new String[0]);
> ConfigProperties config = main.getConfigProperties();
> // manipulate config in any way desired
> main.setConfigProperties(config)
> main.launch();
> {code}
> The main.launch could then simply be modified to something like this : 
> {code}
> public void launch() throws Exception {
> if (config == null) {
> config = new ConfigProperties();
> }
> {code}
> Btw we are using Karaf 4.0.x so having this in both Karaf 4.1.0 and Karaf 4.0 
> would be fantastic.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (KARAF-4072) Karaf shell not working properly in windows

2016-01-18 Thread Serge Huber (JIRA)

[ 
https://issues.apache.org/jira/browse/KARAF-4072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15105077#comment-15105077
 ] 

Serge Huber commented on KARAF-4072:


Ok I just tested this on my Windows 10 machine and Karaf 4.0.4

If I start karaf using “karaf start” from the CMD.exe and use the shell console 
the backspace key and arrow key work normally. I tested with the Windows 
Powershell and it works fine also.

If I connect using Putty to the SSH Shell then the backspace key doesn’t work 
and it looks like a whitespace characters is inserted. So it might be something 
to do with the detection of the terminal emulation with Putty. Also the up and 
down arrows keys also seem to have issues because the line doesn’t seem to be 
properly erased. It seems mostly like a display issue because if I enter “aa” 
and hit backspace and then enter, Karaf tries to execute a command called “a”, 
so the backspace has indeed modified the string properly. The same is true for 
the up and down arrows. I tested this with Putty 0.62, 0.66 (beta) and the 
latest snapshot (2016-01-04.51465fa and the behavior was the same in all of 
them. I use the default settings.

I also tested with AbsoluteTelnet10.12 (demo license) and I got the exact same 
behavior. 

I hope this information helps.


> Karaf shell not working properly in windows
> ---
>
> Key: KARAF-4072
> URL: https://issues.apache.org/jira/browse/KARAF-4072
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf-shell
>Affects Versions: 4.0.2
> Environment: Windows x64
>Reporter: Ankur Nema
> Attachments: karaf_shell_issue.PNG, karaf_shell_issue_2.PNG
>
>
> I have recently installed karaf 4.0.2 on windows x64. After install karaf 
> shell is not working properly. When ever I am trying to press tab for auto 
> complete behaviour is strange. I am attaching snapshot for same.
> Also delete button is also not working properly. When I press delete then 
> cursor moves one position ahead.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)