-
Notifications
You must be signed in to change notification settings - Fork 41
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
SAML authentication #137
Comments
The output we get from the browser looks something like this:
|
That's interesting. As a starting point proof-of-concept, could we add the authentication code as a login authentication option and use it that way? (I presume it only works once.) Once that's working, we could figure out how to get it connected. See also #115 |
@dylex I'm going to hopefully help try bringing this issue back from the dead... I followed some of the instructions put forward in #115 ... using the auth token gathered from the web development tool in the 'API token' field, the debug window shows the following:
However, when going to the URL the plugin is trying to talk to with my browser it's returning a true result with the websocket address, I believe a cookie written out by the auth source is allowing the true result. I'm not an expert on how all of it works, but is there a way we can possibly pass in cookies to the address it's sending API calls to? I'm attempting to SAML auth from an Azure AD source. |
We certainly could add a configuration option to pass a cookie. If you want to try it yourself, you could just add the cookie header to the request manually (in |
@dylex Yes, it works with the cookie. It was a cookie that was created last night when I was working on this so it should work for a little while at least.. Unfortunately I don't have enough C++ know-how to test with the plugin (my attempt at creating a simple string and passing it along in the postdata and getting it to compile have failed), I was simply passing in the Cookie header into a curl command I wrote up, but good news is it will work assuming we are passing it and it will return a result with the appropriate wss:// address. |
It's a python project, but maybe this PR of wee-slack can offer pointers. |
That PR adds support for a |
As suggested by the referenced PR there are others passed along in the cookie request, the d cookie is one of them yes.. but the others are:
I'm not sure which ones are actually necessary if it makes a difference, I was passing all of them when submitting the request with curl. |
I think only the However, the |
Oh, hold on, this is what you were talking about in #115: It's available in Both The (On a side note: the official client gets the Web Socket address from the I'll have to put this down for now due to time constraints, but I hope the above is useful. If nothing happens until I have a new spare moment I might jump on this implementation though. We started enforcing 2FA, and this is bothering me quite a bit... |
@kacf just an update.. I was helping out the weechat guys and going through the process of elimination on what cookies are required to actually pass, it was determined by some testing I did that the |
I've just posted a pull request here, would be great if more people can test it. Even if you don't use 2FA, but the traditional login which already works, it would be great if you can test it. I no longer have access to this method of logging in, so I cannot verify that I didn't break it in the process of enabling this. |
Mentioned wee-slack PR dealing with |
I noticed that auth.findUser returns this now : api response: would this help with it? |
The |
How can I verify if that is used? I rebuild the plugin with the patch
applied, set my pw to the token plus cooky still the same issue.
|
At least for Pidgin: If you open the Debug Window (from Help menu) before trying to log in, the first |
I haven't been able to use my corporate Slack account in Pidgin as it needs authentication to happen in the web browser.
The call to https://slack.com/api/auth.findUser returns an error:
{"ok":false,"error":"sso_nonra"}
I've come up with some scripting which solves this for Chime — we use the browser to perform authentication just like the Slack desktop app does, and capture the slack:// URI that the browser ends up at.
This registers the appropriate x-scheme-handler/chime and provides a Python script to 'prod' the resulting token into Pidgin via D-Bus. It should probably work for Slack too with a little work in the auth code.
awslabs/pidgin-chime@b430eba
The text was updated successfully, but these errors were encountered: