Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/crypto/ssh: expose channel IDs #19568

Closed
jaksi opened this issue Mar 16, 2017 · 2 comments
Closed

x/crypto/ssh: expose channel IDs #19568

jaksi opened this issue Mar 16, 2017 · 2 comments
Milestone

Comments

@jaksi
Copy link

@jaksi jaksi commented Mar 16, 2017

Currently there is no way to identify channels. Sessions can be identified by the SessionID method of ConnMetaData, but there's no such thing for channels.
Internally, a local and a remote ID is stored for each channel, either of which could be used for this.
This would be useful for correlating logs by sessions and channels.

@gopherbot gopherbot added this to the Unreleased milestone Mar 21, 2017
@hanwen
Copy link
Contributor

@hanwen hanwen commented Mar 27, 2017

this has been discussed before, but the short answer is: no, the local/remote IDs can't be used for this.

The meaning of those IDs is tied to the map in which they are administrated. The map is protected by a mutex

https://go.googlesource.com/crypto/+/459e26527287adbc2adcc5d0d49abff9a5f315a7/ssh/mux.go#23

so you can't use those IDs unless you also hold the mutex.

@hanwen
Copy link
Contributor

@hanwen hanwen commented Mar 27, 2017

you can build your own channel ID mechanism by using the extra data payload in OpenChannel/Accept.

@hanwen hanwen closed this Mar 29, 2017
@golang golang locked and limited conversation to collaborators Mar 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.