Re: Branding

2019-05-13 Thread luke
I think we should reconsider having a new Karaf splash screen. :-)

Great stuff!
Cheers,
Łukasz

> On 9 May 2019, at 18:35, Jean-Baptiste Onofré  wrote:
> 
> Lol ;) I like that ;)
> 
> Thanks for sharing ;)
> 
> Regards
> JB
> 
> On 09/05/2019 18:20, Kleber Ayala wrote:
>> Just for fun ;) , you can try this one, its my "dev-mode" branding 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>> On May 9, 2019, at 11:07 AM, Jean-Baptiste Onofré  wrote:
>>> 
>>> Ooops Erwin, I didn't see your reply :)
>>> 
>>> Thanks ;) and I agree ;)
>>> 
>>> Regards
>>> JB
>>> 
>>> On 09/05/2019 17:52, Erwin Hogeweg wrote:
 Hi Paul,
 
 I think you need double \\…
 
 Please try attached.
 
 
 Ewin
 
 
> On May 8, 2019, at 16:07, Paul Fraser  wrote:
> 
> On 8/05/2019 11:07 pm, Jean-Baptiste Onofré wrote:
>> Hi Paul,
>> 
>> What does your branding.properties contain ?
> 
> Attached.
> 
> Paul
> 
>>> 
>>> -- 
>>> Jean-Baptiste Onofré
>>> jbono...@apache.org
>>> http://blog.nanthrax.net
>>> Talend - http://www.talend.com
>> 
> 
> -- 
> Jean-Baptiste Onofré
> jbono...@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com



Apache Karaf hackathon, 4-5 May, Brussels

2019-04-30 Thread luke
Dear Karaf user and dev subscribers,
I would like to share information about free Apache Karaf hackathon which will 
take a place in Brussels within few days (4-5 May 2019). If you are interested 
in Apache Karaf or other Apache projects which will be presented during these 
two days please register using below form. [1]
We also encourage you to promote Apache Karaf presence via media social 
channels such twitter [2] and linkedin [3].

Thanks to Apache marketing team and organisers I will be able to personally 
participate in this event. I will present Apache Karaf (up to 60 minutes) and 
surrounding ecosystem. As part of my presentation you will learn present state 
of Karaf, you will also see it compared to present trends in software industry. 
I will be more than happy to help you to help you with your projects and boost 
its adoption to Apache Karaf as runtime.

To give you a brief idea of what whole event is about. There is a EU-FOSSA [4] 
program was launched by European Union institutions with primary aim to 
organise bug bounty for selected Apache projects (Tomcat & Kafka). Over time a 
scope of program was extended to other Apache communities.
If you are security researcher you might win a nice reward for finding an 
vulnerability. For details please follow last link. [4] Remember, its not only 
about bug bounties, but about moving Open Source projects forward.

Your sincerely,
Łukasz Dywicki
—
Apache Karaf commiter
Twitter: @ldywicki
http://connectorio.com | http://code-house.org

[1] https://bma-events.typeform.com/to/UfDIeW 

[2] https://twitter.com/TheASF/status/1123093398787899394 

[3] https://www.linkedin.com/feed/update/urn:li:activity:6528859694201651201 

[4] https://joinup.ec.europa.eu/collection/eu-fossa-2/about 



https://twitter.com/TheASF/status/1123093398787899394
https://twitter.com/TheASF/status/1123093398787899394


signature.asc
Description: Message signed with OpenPGP


Re: Apache Tamaya and pax-exam problems

2018-06-25 Thread luke
Hey Dominik,
I think you might have two bundles exporting same class in two different 
versions or another issue:

Caused by: java.util.ServiceConfigurationError:
org.apache.tamaya.spi.PropertyConverter: Provider
org.apache.tamaya.collections.ArrayListConverter not a subtype

I suppose these types are compatible. Another thing that ServiceLoader usage 
under OSGi might (and most likely will) have different behaviour than in 
regular deployments due to class loader visibility.

Pozdrawiam
Łukasz

> On 22 Jun 2018, at 12:18, Dominik Marciniszyn  
> wrote:
> 
> Hi,
> I'm trying to test my bundle which uses apache tamaya. I'm using recommended
> technology for this pax-exam.
> I created the abstract class which setup karaf test container based on
> pax-exam documentation. Problem shows up when
> I'm trying to test method which uses apache tamaya. Logs shows me an error:
> 
> 2018-06-22T10:34:38,292 | ERROR | pool-1-thread-2  | BootFeaturesInstaller
>
> | 10 - org.apache.karaf.features.core - 4.1.5 | Error installing boot
> features
> org.apache.karaf.features.internal.util.MultiException: Error restarting
> bundles:
>   Exception in org.apache.tamaya.core.OSGIActivator.start() of bundle
> org.apache.tamaya.core.
>   at
> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:902)
> ~[?:?]
>   at
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1248)
> ~[?:?]
>   at
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$1(FeaturesServiceImpl.java:1147)
> ~[?:?]
>   at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
>   at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> [?:?]
>   at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> [?:?]
>   at java.lang.Thread.run(Thread.java:745) [?:?]
>   Suppressed: org.osgi.framework.BundleException: Exception in
> org.apache.tamaya.core.OSGIActivator.start() of bundle
> org.apache.tamaya.core.
>   at
> org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:800)
> ~[?:?]
>   at
> org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:729)
> ~[?:?]
>   at
> org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:933)
> ~[?:?]
>   at
> org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:309)
> ~[?:?]
>   at org.eclipse.osgi.container.Module.doStart(Module.java:581) 
> ~[?:?]
>   at org.eclipse.osgi.container.Module.start(Module.java:449) 
> ~[?:?]
>   at
> org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383)
> ~[?:?]
>   at
> org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:402)
> ~[?:?]
>   at
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.startBundle(FeaturesServiceImpl.java:1361)
> ~[?:?]
>   at
> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:894)
> ~[?:?]
>   at
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1248)
> ~[?:?]
>   at
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$1(FeaturesServiceImpl.java:1147)
> ~[?:?]
>   at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
> [?:?]
>   at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> [?:?]
>   at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> [?:?]
>   at java.lang.Thread.run(Thread.java:745) [?:?]
>   Caused by: java.util.ServiceConfigurationError:
> org.apache.tamaya.spi.PropertyConverter: Provider
> org.apache.tamaya.collections.ArrayListConverter not a subtype
>   at java.util.ServiceLoader.fail(ServiceLoader.java:239) ~[?:?]
>   at java.util.ServiceLoader.access$300(ServiceLoader.java:185) 
> ~[?:?]
>   at
> java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:376)
> ~[?:?]
>   at 
> java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
> ~[?:?]
>   at java.util.ServiceLoader$1.next(ServiceLoader.java:480) ~[?:?]
>   at
> org.apache.tamaya.core.internal.OSGIServiceContext.getServices(OSGIServiceContext.java:108)
> ~[?:?]
>   at
> org.apache.tamaya.spisupport.DefaultConfigurationContextBuilder.getDefaultPropertyConverters(DefaultConfigurationContextBuilder.java:378)
> ~[?:?]
>   at
> org.apache.tamaya.spisupport.DefaultConfigurationContextBuilder.addDefaultPropertyConverters(DefaultConfigurationContextBuilder.java:171)
> ~[?:?]
>   at
> 

Re: JacksonJaxbJsonProvider doesn't work properly after upgrading CXF to 3.x

2018-05-06 Thread luke
Hey Neehal,
Have you checked if you have, by accident, two different versions of JAXB in 
runtime? One of reasons why annotations get ignored is class loading.

Kind regards,
Lukasz

> On 3 May 2018, at 11:39, Neehal  wrote:
> 
> Hi,
> I have karaf v4.1.5 and have installed CXF v3.2.2. What I notice is that, my
> jackson serialization only works if I remove any XML JAXB annotations from
> the response class. 
> I have my JacksonJaxbJsonProvider configured in the blueprint as a provider.
> 
> 
>   
> 
>   
>   
>   
>   
> 
>   
>   
> 
> My 'CustomJacksonJaxbJsonProvider' extends 'JacksonJaxbJsonProvider', and I
> have configured the following:
> 
> ObjectMapper mapper = new ObjectMapper();
> mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, true);
> mapper.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, true);
> mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
> setMapper(mapper);
> setAnnotationsToUse(DEFAULT_ANNOTATIONS);
> 
> 
> The above take effect only if do not have any JAXB annotations(e.g.
> @XmlRootElement) in the response class. 
> My response has a map that shows like,
> { entry: { key: "xyz", value: "abc"}}, instead of ,
> { "xyz" : "abc" } 
> 
> This was not a problem with my earlier CXF v2.7.13 on Karaf. Has anyone else
> faced a similar problem?
> 
> Regards,
> Neehal.
> 
> 
> 
> 
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html



Re: Using a custom JAAS LoginModule with karaf

2018-04-06 Thread luke
Hey Martin,
You raised an interesting scenario - have you tried to debug JAAS code from JRE 
which gets called after ShiroJaasIntegration module returns? Your configuration 
seems fine, if shiro fails properties login module is used as fallback. If it 
doesn’t get called then we need to check what is happening in LoginContext.

Please try adding 
java.security.debug=logincontext,configfile,configparser,policy to your system 
properties and check if you get anything useful from this debug. If you see to 
little - switching this debug flag to all will print a lot of debug information.

Cheers,
Łukasz
--
Twitter: ldywicki
Blog: http://dywicki.pl
Code-House - http://code-house.org

> On 5 Apr 2018, at 14:40, Martin Nielsen  wrote:
> 
> One problem down, one to go. I had he rank set to 0, upon setting it to 1 i 
> can succesfully override the default karaf realm.
> 
> The new problem is that the PropertiesLoginModule is no longer called.
> 
> My blueprint is below. What i am trying to accomplish is for JAAS to look in 
> either module in order to authenticate a user. But right now i cannot login 
> with karaf/karaf, as it seems that the PropertiesLoginModule is ignored. I 
> can login with anything from the ShiroJaasIntegration module without issue.
> 
>  
> http://www.osgi.org/xmlns/blueprint/v1.0.0 
> "
>xmlns:jaas="http://karaf.apache.org/xmlns/jaas/v1.0.0 
> "
>
> xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0 
> ">
> 
> 
> 
> 
> 
>  className="dk.netdesign.common.security.karaf.ShiroJaasIntegration" 
>  flags="sufficient">
> 
>  className="org.apache.karaf.jaas.modules.properties.PropertiesLoginModule"
>  flags="sufficient">
> users = $[karaf.base]/etc/users.properties
> 
> 
> 
> 
> 
> 
> 
> 
> 
> On Thu, Apr 5, 2018 at 12:04 PM, Martin Nielsen  > wrote:
> The only way my module is called is if I force stop  Apache Karaf :: JAAS :: 
> Modulesorg.apache.karaf.jaas.modules 
> . Is this intended behavior?
> 
> On Wed, Apr 4, 2018 at 9:28 AM, Martin Nielsen  > wrote:
> I now tried changing the blueprint to this:
>  
> http://www.osgi.org/xmlns/blueprint/v1.0.0 
> "
>xmlns:jaas="http://karaf.apache.org/xmlns/jaas/v1.0.0 
> "
>
> xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0 
> ">
> 
> 
> 
> 
> 
>  className="my.test.common.security.karaf.ShiroJaasIntegration" 
>  flags="sufficient">
> 
> 
> 
> 
> 
> That changes the realm list command to this
> 
> karaf@root()> jaas:realm-list 
>   
> Index | Realm Name | Login Module Class Name  
>   
> --++  
>   
> 1 | karaf  | dk.netdesign.common.security.karaf.ShiroJaasIntegration  
> 
> But i can still log in with karaf/karaf, and my module is STILL not called. I 
> do not understand this. How can i still log in through the property module 
> when it is no longer listed?
> 
> 
> On Tue, Apr 3, 2018 at 6:40 PM, Martin Nielsen  > wrote:
> No you understood completely. I obviously didn't though. So if i want the 
> loginmodule i made to be usable through the webconsole, I must place it in 
> the karaf realm, is that correct?
> 
> Second question: what if i want to disable one of the current modules, for 
> example the properties module?
> 
> On Tue, 3 Apr 2018, 18:18 Jean-Baptiste Onofré,  > wrote:
> Hi,
> 
> Maybe I don't understand what you want to do.
> 
> You added your login module in a new realm (ShiroBridge). So, it means that it
> will be used only for applications that will use this realm.
> 
> It's not possible to remove the karaf realm easily today as core part of Karaf
> use it (shell, MBeanServer, ...).
> 
> So:
> 1. If you want to use your login module in the core Karaf part (like the shell
> or ssh), then, your login module as to be in the karaf realm
> 2. No problem to create new realms and plug third party applications using 
> this
> realm
> 
> Regards
> JB
> 
> On 04/03/2018 05:42 PM, Martin Nielsen wrote:
> > Hello everyone
> >
> > I am trying to create a new karaf JAAS module and preferably