Additional SSH socket for Karaf

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Additional SSH socket for Karaf

Thomas Diesler
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
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: Additional SSH socket for Karaf

Tomaž Cerar-2
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 <[hidden email]> 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
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev



_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: Additional SSH socket for Karaf

Darran Lofthouse
In reply to this post by Thomas Diesler
Hi all,

Just to clarify the reason Thomas is asking this question is because I
was talking to him earlier today about integrating this - I know there
is quite a bit of talk about keeping the listener sockets open to a
minimum so the question is more 'should we?' rather than just a 'can
we?' based on the technical need.

Regards,
Darran Lofthouse.


On 09/13/2012 02:14 PM, Thomas Diesler wrote:

> Folks,
>
> https://issues.jboss.org/browse/AS7-5544
>
> We like to integrate Apache Karaf <http://karaf.apache.org/>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
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: Additional SSH socket for Karaf

Thomas Diesler
In reply to this post by Tomaž Cerar-2
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 <[hidden email]> 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 <[hidden email]>
>> 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
>>> [hidden email]
>>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>>>
>
>

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

_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: Additional SSH socket for Karaf

Tomaž Cerar-2
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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]>
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
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev




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



_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: Additional SSH socket for Karaf

Thomas Diesler
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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]>
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
[hidden email]
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 

_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: Additional SSH socket for Karaf

Thomas Diesler
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
> <[hidden email]> 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 <[hidden email]>
>> 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 <[hidden email]>
>>>> 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
>>>>> <[hidden email]>
>>>>> 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
>>>>>> [hidden email]
>>>>>> 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

_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: Additional SSH socket for Karaf

Jason T. Greene
IIRC the hornetq and jacorb subsystems just just the name and port info.

Ideally though, with AS8, we need all subsystems to let us create the socket so that we can multiplex it.

SSH is a bit of an exception though as we don't have control over the client.

Sent from my iPhone

On Sep 14, 2012, at 8:21 AM, Thomas Diesler <[hidden email]> wrote:

> 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
>> <[hidden email]> 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 <[hidden email]>
>>> 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 <[hidden email]>
>>>>> 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
>>>>>> <[hidden email]>
>>>>>> 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
>>>>>>> [hidden email]
>>>>>>> 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
>

_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev