Comments (9)
Thanks @insomniacslk , seems to be working for me so I can re-enable MFA. I appreciate your work on this!
from irc-slack.
Hi @securityinsanity , thanks for your feedback! The first thing that looks odd to me is the empty Slack websocket URL on the third line of the log, where it says "Using URL:", there I expect something like wss://cerberus-xxxx.lb.slack-msgs.com/websocket/XXXX (where XXXX is specific to your connection). In this case there seems to be just a newline instead. This comes from the slack library rather than from irc-slack directly.
Then there is "invalid_auth". From Slack's API documentation:
Some aspect of authentication cannot be validated.
Either the provided token is invalid or the request
originates from an IP address disallowed from making
the request.
I would safely assume that this is not a disallowed IP address issue, so the other option is "invalid token". To rule out any client issue, could you try the same process using irssi
and report back here? The command line is irssi -c localhost -p 6666 -w 'your token'
.
If the above doesn't work, we can look into why the websocket URL is empty
from irc-slack.
Also can you confirm that the token you obtain with autotoken
is of the form xoxp-XXXX|d=YYYY;
? The important details are the |d=
and the ;
at the end. Thanks!
from irc-slack.
Hey! @insomniacslk , Autotoken doesn't seem to work for me (I believe it's because I have MFA!). However the tokens I have are in the format:
xoxc-xxxxxx|d=xxxx;
Using irssi I get the same result which (is good(?)):
[2020-07-11T00:20:10Z] INFO main: Setting log level to 'info'
[2020-07-11T00:20:10Z] INFO main: Starting server on 127.0.0.1:6666
[2020-07-11T00:20:10Z] INFO main: Listening on 127.0.0.1:6666
[2020-07-11T00:20:27Z] INFO main: Starting Slack client
[2020-07-11T00:20:27Z] INFO slack-api: Connecting to RTM
[2020-07-11T00:20:27Z] INFO slack-api: Using URL:
[2020-07-11T00:20:27Z] INFO slack-api: Failed to start or connect to RTM: invalid_auth
[2020-07-11T00:20:27Z] INFO slack-api: invalid auth when connecting with RTM: invalid_auth
[2020-07-11T00:20:27Z] INFO slack-api: Failed to connect with RTM on try 0: invalid_auth
[2020-07-11T00:20:37Z] WARN main: Cannot connect to Slack: Connection to Slack timed out after 10s
[2020-07-11T00:20:37Z] WARN main: Error handling connection from 127.0.0.1:27093: read tcp 127.0.0.1:6666->127.0.0.1:27093: use of closed network connection
from irc-slack.
Yes, MFA would make autotoken fail (and it should be possible to add support for it).
Since you've used the manual procedure, it's still possible that the token is invalid. When I was developing autotoken, the first few times I copied the percent-encoded string instead of the decoded string. In the browser console the token can show up in both ways, depending on where it was copied from. Could you please check that you have a non-percent-encoded cookie?
from irc-slack.
I can confirm there is no percents in the cookie value (or in the xoxc- value). The cookie seems to be a valid base64 string.
Anyway I can perhaps try manually using the cookie with curl, or something of the like to validate it's correctness?
from irc-slack.
I disabled mfa and used autotoken, and it looks like it actually wanted the percent encoded value for me, and not the non-percent encoded value.
from irc-slack.
@securityinsanity I have implemented MFA support in autotoken
in #131 . Just call autotoken
with -mfa <your auth code>
. If it doesn't work, there is another new flag, -show-browser
that can be used to debug it. Hope that helps!
from irc-slack.
I can confirm the cookie value needs to be percent-encoded, or otherwise causes an auth failure.
from irc-slack.
Related Issues (20)
- Reply with RPL_NOTOPIC if no topic is set
- Use slacks 'away' flag when loading slack users HOT 4
- My own messages are shown twice HOT 8
- Handle certain JOIN failures
- Handle user change event and show nick change if relevant
- App on slack.efi.re throws 502 error HOT 3
- Add feature matrix on README
- Fix `cannot create nick "" for channel "+chan-12345"`
- Messages posted to threads show up in 1-on-1 channels HOT 8
- Clean up resources after disconnecting from a team
- Support threads to self
- Send IM thread to a thread channel
- Support sending messages in thread and multiparty IMs HOT 1
- Failed to fetch users by their IDs: internal_error HOT 2
- irc-slack + znc constantly adding new channels HOT 1
- irc-slack 'reactions' being sent to the wrong channels HOT 1
- Only one private channel working. Other channels sent to <unknown-channel> HOT 1
- Members of private channels and threads not shown HOT 1
- cannot connect anymore since 2023-09-18 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from irc-slack.