[jboss-as7-dev] Additional SSH socket for Karaf

Thomas Diesler thomas.diesler at jboss.com
Fri Sep 14 09:21:00 EDT 2012


I suggest to introduce a little abstraction here. What is currently done 
by Karaf (i.e. call into Mina, etc) should be done by AS7. AS7 would 
then provide a service that Karaf can use to obtain the readily 
configured socket.

Meanwhile, it is ok to go ahead as it is and let Karaf create that 
socket. This will give us an environment that we can work with and 
collect issues that need to be done for completion.

On 09/13/2012 08:06 PM, Nodet, Guillaume wrote:
> The SSHD layer uses NIO through Apache Mina, so while the
> SocketBinding can be used to retrieve the port and address to bind the
> server socket to, it can't be used to create the socket itself.
>
> On Thu, Sep 13, 2012 at 7:35 PM, Thomas Diesler
> <thomas.diesler at jboss.com> wrote:
>> Yes, I know that part.
>>
>> Can I use SocketBinding.createServerSocket() to get an ready configured SSH
>> socket that I can give to Karaf?
>> How does this integrate with the security layer?
>>
>> On 09/13/2012 05:51 PM, Tomaž Cerar wrote:
>>
>> Thomas,
>>
>> we do have socket-binding service that provides/injects requested socket
>> binding into your service.
>>
>> All you need to do is to define your own Service that field of type
>> InjectedValue<SocketBinding> binding
>>
>> and then you can just inject socket binding like this:
>>
>>   final ServiceBuilder<MyService> serviceBuilder =
>> context.getServiceTarget().addService(MyServiceName.append(name), service)
>>
>> .addDependency(SocketBinding.JBOSS_BINDING_NAME.append(bindingRef),
>> SocketBinding.class, service.getBinding());
>>
>> where bindingRef is name of socket-binding in standalone.xml (or mgmt model)
>>
>> Hope that answered your question. or did i misunderstood it...
>>
>> --
>> tomaz
>>
>>
>>
>> On Thu, Sep 13, 2012 at 5:43 PM, Thomas Diesler <thomas.diesler at jboss.com>
>> wrote:
>>> Tomaz,
>>>
>>> do we have a service that can provide an SSH socket based on a given
>>> socket-binding?
>>>
>>> What mina is doing should be done by an AS7 service. Karaf could then use
>>> a SSHSocketProviderService that abstracts the details of how this socket is
>>> provided/configured.
>>> AS7 must be in control of creating that socket based on its configuration.
>>>
>>> cheers
>>> --thomas
>>>
>>>
>>> On 09/13/2012 05:38 PM, Nodet, Guillaume wrote:
>>>> What do you mean by 'socket-binding' ?
>>>> The goal is not to bridge to the OS ssh server, but to start a java
>>>> ssh server inside AS7 using Apache Mina SSHD.
>>>>
>>>> On Thu, Sep 13, 2012 at 5:16 PM, Tomaž Cerar <tomaz.cerar at gmail.com>
>>>> wrote:
>>>>> That is an option,
>>>>> but you need to use socket-binding to do that.
>>>>>
>>>>> --
>>>>> tomaz
>>>>>
>>>>> On Thu, Sep 13, 2012 at 3:14 PM, Thomas Diesler
>>>>> <thomas.diesler at jboss.com>
>>>>> wrote:
>>>>>> Folks,
>>>>>>
>>>>>> https://issues.jboss.org/browse/AS7-5544
>>>>>>
>>>>>> We like to integrate Apache Karaf with AS7. For that we need to open an
>>>>>> additional SSH socket.
>>>>>> Is that an option?
>>>>>>
>>>>>> cheers
>>>>>> -thomas
>>>>>>
>>>>>> --
>>>>>> xxxxxxxxxxxxxxxxxxxxxxxxxxxx
>>>>>> Thomas Diesler
>>>>>> JBoss OSGi Lead
>>>>>> JBoss, a division of Red Hat
>>>>>> xxxxxxxxxxxxxxxxxxxxxxxxxxxx
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> jboss-as7-dev mailing list
>>>>>> jboss-as7-dev at lists.jboss.org
>>>>>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>>>>>>
>>>>
>>> --
>>> xxxxxxxxxxxxxxxxxxxxxxxxxxxx
>>> Thomas Diesler
>>> JBoss OSGi Lead
>>> JBoss, a division of Red Hat
>>> xxxxxxxxxxxxxxxxxxxxxxxxxxxx
>>>
>>
>> --
>> xxxxxxxxxxxxxxxxxxxxxxxxxxxx
>> Thomas Diesler
>> JBoss OSGi Lead
>> JBoss, a division of Red Hat
>> xxxxxxxxxxxxxxxxxxxxxxxxxxxx
>
>

-- 
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Thomas Diesler
JBoss OSGi Lead
JBoss, a division of Red Hat
xxxxxxxxxxxxxxxxxxxxxxxxxxxx



More information about the jboss-as7-dev mailing list