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

Option for per request authentication #51

Closed
AODtorusan opened this issue Feb 20, 2018 · 11 comments
Closed

Option for per request authentication #51

AODtorusan opened this issue Feb 20, 2018 · 11 comments

Comments

@AODtorusan
Copy link

Would it be possible to add an option to re-request the authentication each time you do a new request for an SSH session ?

We're using webssh on a jumphost server, but most target devices use different credentials. This means that almost every time we need to flush the browser authentication cache when we want to connect to a device, which is cumbersome.

@NetFunctional
Copy link

+1 - same use case, same issue.

@billchurch
Copy link
Owner

I love it. It’s in the queue.

@vbeskrovny
Copy link

I did a small workaround for that. However, you have to patch few files...

@richard-scott
Copy link

@vbeskrovny - Would you be able to share your workaround?

@vbeskrovny
Copy link

Sure, the link is under my profile or here: https://github.com/vbeskrovny/WebSSH2-session

@billchurch
Copy link
Owner

@vbeskrovny I'll take a look at this when I have a moment and try to integrate it if that's ok.

@vbeskrovny
Copy link

Cool, thanks. By the way I wanted to add custom calls to the onDisconnect events, to add some nice prompts and fancy UI, but the "bundle.js" has no source... :(

@vvalchev
Copy link

The provided patch, will add a /logout URL, which will re-request the authentication and then redirect you back to the referrer (e.g like http://localhost:2222/ssh/host/myhost.com).

It also adds a menu entry "Switch User" that opens /logout and forces re-authentication.

logout-diff.txt

@billchurch
Copy link
Owner

Thanks @vvalchev, I will look at this shortly!

@billchurch
Copy link
Owner

@richard-scott and @AODtorusan I've merged this into master can you see if this now fits your use case or do you feel we need to expand it to cover your use case?

@billchurch
Copy link
Owner

Here's what the screen looks like:
image

And the resulting prompt (I've been working on the styling to fit current style and methods)
image

Option added to config.json as options.allowreauth to toggle this feature

billchurch added a commit that referenced this issue Jul 30, 2018
fixes #75 and potentially #51 thanks to both @vbeskrovny and @vvalchev
hktalent pushed a commit to hktalent/webssh2 that referenced this issue Jun 3, 2022
fixes billchurch#75 and potentially billchurch#51 thanks to both @vbeskrovny and @vvalchev
hktalent pushed a commit to hktalent/webssh2 that referenced this issue Jun 3, 2022
fixes billchurch#75 and potentially billchurch#51 thanks to both @vbeskrovny and @vvalchev
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

6 participants