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

restricitng webclient from other windows user session #750

Open
HimanshuNandu opened this issue Aug 21, 2018 · 3 comments
Open

restricitng webclient from other windows user session #750

HimanshuNandu opened this issue Aug 21, 2018 · 3 comments

Comments

@HimanshuNandu
Copy link

I have a websocket C++ server listening on a particular port, I only want to accept connections from client if the client is logged in from the same windows user session, If the requests come from a websocket client that is running under different windows user session, I want to discard it.

The client is in javascript so it cannot send the windows logged in username.

@HimanshuNandu
Copy link
Author

Can I determine in websocketserver from the connected client socket, the client's windows user?

@zaphoyd
Copy link
Owner

zaphoyd commented Aug 21, 2018

You can generally tell if the connection is coming from the local/loopback interface, but beyond that you'd have to send this information from the client and have some way to verify it.

@HimanshuNandu
Copy link
Author

Okay, that's a challenge.

Can I generate a random port using websocketpp, if I listen on port 0, will the library return a unique port from the OS?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants