Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 351320 - [Gogo] Merge the SSH and telnet configurations
Summary: [Gogo] Merge the SSH and telnet configurations
Status: CLOSED FIXED
Alias: None
Product: Virgo
Classification: RT
Component: runtime (show other bugs)
Version: 3.0.0.M06   Edit
Hardware: PC Windows 7
: P3 enhancement (vote)
Target Milestone: 3.5.0.M02   Edit
Assignee: Lazar Kirchev CLA
QA Contact:
URL: http://www.eclipse.org/forums/index.p...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-06 08:38 EDT by Borislav Kapukaranov CLA
Modified: 2012-01-16 11:59 EST (History)
3 users (show)

See Also:


Attachments
Patch providing the functionality (15.34 KB, patch)
2012-01-10 11:53 EST, Lazar Kirchev CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Borislav Kapukaranov CLA 2011-07-06 08:38:48 EDT
Here we will track discussions if merging the SSH and telnet shell configurations can be done.
Comment 1 Glyn Normington CLA 2011-07-08 05:33:58 EDT
There is duplication in having separate telnet and ssh properties files, particularly when a host other than the default needs to be specified.
Comment 2 Lazar Kirchev CLA 2011-07-11 06:43:10 EDT
Currently the telnet and ssh components register separate managed services to listen for their configurations. 
The purpose for this was to keep the two components completely independent. 

However, I think we could register one centralized managed service to listen for one configuration, where to be included both the ssh and telnet properties.
Then the properties will be passed to the components. 
This will keep them independent and still will remove the duplication.
Comment 3 Glyn Normington CLA 2011-07-11 06:58:48 EDT
(In reply to comment #2)
> Currently the telnet and ssh components register separate managed services to
> listen for their configurations. 
> The purpose for this was to keep the two components completely independent. 
> 
> However, I think we could register one centralized managed service to listen
> for one configuration, where to be included both the ssh and telnet properties.
> Then the properties will be passed to the components. 
> This will keep them independent and still will remove the duplication.

Sounds good to me.
Comment 4 Lazar Kirchev CLA 2012-01-10 11:53:46 EST
Created attachment 209272 [details]
Patch providing the functionality

The patch merges the ssh and telnet configurations into one. It provides a class, ConsoleConfigurationConvertor, both in kernel and user regions, which wait for the merged configuration and split it into two configurations (the ones which the console is registered).
Comment 5 Glyn Normington CLA 2012-01-11 05:06:59 EST
(In reply to comment #4)
> Created attachment 209272 [details]
> Patch providing the functionality
> 
> The patch merges the ssh and telnet configurations into one. It provides a
> class, ConsoleConfigurationConvertor, both in kernel and user regions, which
> wait for the merged configuration and split it into two configurations (the
> ones which the console is registered).

Looking good. One comment: is there a good reason why telnet.host and ssh.host need to be separately specifiable? If not, it would be better to share a host property.
Comment 6 Lazar Kirchev CLA 2012-01-11 07:10:57 EST
(In reply to comment #5)
> (In reply to comment #4)
> > Created attachment 209272 [details]
> > Patch providing the functionality
> > 
> > The patch merges the ssh and telnet configurations into one. It provides a
> > class, ConsoleConfigurationConvertor, both in kernel and user regions, which
> > wait for the merged configuration and split it into two configurations (the
> > ones which the console is registered).
> 
> Looking good. One comment: is there a good reason why telnet.host and ssh.host
> need to be separately specifiable? If not, it would be better to share a host
> property.

Theoretically, it could be possible someone to want the ssh to be accessible on a particular network interface on the machine, different from localhost/127.0.0.1. That is why I made different properties. But I am not sure at all that we really have such a use case. Can you think of such a scenario? If not, it is OK to have on e property and I will update the code.
Comment 7 Glyn Normington CLA 2012-01-11 07:14:04 EST
(In reply to comment #6)
> (In reply to comment #5)
> > (In reply to comment #4)
> > > Created attachment 209272 [details]
> > > Patch providing the functionality
> > > 
> > > The patch merges the ssh and telnet configurations into one. It provides a
> > > class, ConsoleConfigurationConvertor, both in kernel and user regions, which
> > > wait for the merged configuration and split it into two configurations (the
> > > ones which the console is registered).
> > 
> > Looking good. One comment: is there a good reason why telnet.host and ssh.host
> > need to be separately specifiable? If not, it would be better to share a host
> > property.
> 
> Theoretically, it could be possible someone to want the ssh to be accessible on
> a particular network interface on the machine, different from
> localhost/127.0.0.1. That is why I made different properties. But I am not sure
> at all that we really have such a use case. Can you think of such a scenario?
> If not, it is OK to have on e property and I will update the code.

You're right. Someone might want to configure telnet for localhost for unsecure local access and ssh for some other host for secure remote access. Best to keep them separate therefore. Thanks!
Comment 8 Borislav Kapukaranov CLA 2012-01-12 12:02:45 EST
I'm applying this change over that nano branch and plan to close the bug after that.
Comment 9 Borislav Kapukaranov CLA 2012-01-12 12:56:57 EST
Fixed with commits:
nano - 7e4f769
kernel - 062f3e8

AFAIK this still needs to be documented so I'm leaving the bug open.

I found out that the console properties file doesn't accept new lines at the end of the file. If such are present the properties are discarded and the configuration isn't initialized. 
This has to be documented as well.
Comment 10 Glyn Normington CLA 2012-01-13 05:09:42 EST
(In reply to comment #9)
> I found out that the console properties file doesn't accept new lines at the
> end of the file. If such are present the properties are discarded and the
> configuration isn't initialized. 
> This has to be documented as well.

It would be better to fix this behaviour so we don't have to document it and users won't hit it by accident. Please would you capture the problem in a new bug.
Comment 11 Lazar Kirchev CLA 2012-01-13 11:35:11 EST
(In reply to comment #10)
> (In reply to comment #9)
> > I found out that the console properties file doesn't accept new lines at the
> > end of the file. If such are present the properties are discarded and the
> > configuration isn't initialized. 
> > This has to be documented as well.
> 
> It would be better to fix this behaviour so we don't have to document it and
> users won't hit it by accident. Please would you capture the problem in a new
> bug.

Only to mention that the merged console properties are not handled in any special way - exactly as any other deployed configuration.
Comment 12 Glyn Normington CLA 2012-01-13 11:45:38 EST
(In reply to comment #11)
> (In reply to comment #10)
> > (In reply to comment #9)
> > > I found out that the console properties file doesn't accept new lines at the
> > > end of the file. If such are present the properties are discarded and the
> > > configuration isn't initialized. 
> > > This has to be documented as well.
> > 
> > It would be better to fix this behaviour so we don't have to document it and
> > users won't hit it by accident. Please would you capture the problem in a new
> > bug.
> 
> Only to mention that the merged console properties are not handled in any
> special way - exactly as any other deployed configuration.

Thanks. Then it's even more important to log a bug on this. It may be that Equinox config admin needs fixing.
Comment 13 Lazar Kirchev CLA 2012-01-16 04:02:59 EST
User guide updated with the new configuration file with commit http://git.eclipse.org/c/virgo/org.eclipse.virgo.documentation.git/commit/?h=364571-introduce-nano&id=7c2754553c8b132514b166fb63e49fed881bcca2
Comment 14 Glyn Normington CLA 2012-01-16 04:37:35 EST
(In reply to comment #13)
> User guide updated with the new configuration file with commit
> http://git.eclipse.org/c/virgo/org.eclipse.virgo.documentation.git/commit/?h=364571-introduce-nano&id=7c2754553c8b132514b166fb63e49fed881bcca2

The update is fine except that:

The telnet properties in the file are prefixed with <emphasis>.telnet</emphasis>, and the ssh properties are prefixed with <emphasis>.ssh</emphasis>.

should presumably say:

The telnet properties in the file are prefixed with <emphasis>telnet.</emphasis>, and the ssh properties are prefixed with <emphasis>ssh.</emphasis>.

(unless you've changed each of these to be a suffix).
Comment 15 Lazar Kirchev CLA 2012-01-16 09:13:54 EST
(In reply to comment #14)
> (In reply to comment #13)
> > User guide updated with the new configuration file with commit
> > http://git.eclipse.org/c/virgo/org.eclipse.virgo.documentation.git/commit/?h=364571-introduce-nano&id=7c2754553c8b132514b166fb63e49fed881bcca2
> 
> The update is fine except that:
> 
> The telnet properties in the file are prefixed with
> <emphasis>.telnet</emphasis>, and the ssh properties are prefixed with
> <emphasis>.ssh</emphasis>.
> 
> should presumably say:
> 
> The telnet properties in the file are prefixed with
> <emphasis>telnet.</emphasis>, and the ssh properties are prefixed with
> <emphasis>ssh.</emphasis>.
> 
> (unless you've changed each of these to be a suffix).

Thanks for the comment, Glyn - my mistake. I will amend the change.
Comment 16 Lazar Kirchev CLA 2012-01-16 10:01:57 EST
(In reply to comment #15)
> (In reply to comment #14)
> > (In reply to comment #13)
> > > User guide updated with the new configuration file with commit
> > > http://git.eclipse.org/c/virgo/org.eclipse.virgo.documentation.git/commit/?h=364571-introduce-nano&id=7c2754553c8b132514b166fb63e49fed881bcca2
> > 
> > The update is fine except that:
> > 
> > The telnet properties in the file are prefixed with
> > <emphasis>.telnet</emphasis>, and the ssh properties are prefixed with
> > <emphasis>.ssh</emphasis>.
> > 
> > should presumably say:
> > 
> > The telnet properties in the file are prefixed with
> > <emphasis>telnet.</emphasis>, and the ssh properties are prefixed with
> > <emphasis>ssh.</emphasis>.
> > 
> > (unless you've changed each of these to be a suffix).
> 
> Thanks for the comment, Glyn - my mistake. I will amend the change.

Fixed with http://git.eclipse.org/c/virgo/org.eclipse.virgo.documentation.git/commit/?h=364571-introduce-nano&id=426be96d5a599830cfb006b7817df0057828942f
Comment 17 Borislav Kapukaranov CLA 2012-01-16 11:59:32 EST
I couldn't reproduce this anymore. I believe it was related to bug 368741 which I think is fixed now.
Since Lazar committed the documentation I think we are good to close this bug.