robotito icon indicating copy to clipboard operation
robotito copied to clipboard

Detailed setup for newbie

Open stanbar opened this issue 7 years ago • 6 comments

Hello. I'm quite new in the jabber/xmpp world. I created account on jabber.org and jabber.at let's say [email protected] for running on my raspberry, and [email protected] for clients.

My credentials will looks like:

# Robo-TiTO connects to Jabber using these settings.
BOT_LOGIN         = "[email protected]"
BOT_PASSWORD      = "password"
BOT_JABBER_HOST_SERVER = 'jabber.org'
BOT_JABBER_SERVER_PORT = 5222

# Robo-TiTO only accepts commands from contacts listed on AllowedUsers array.
PASSWD = {
  "[email protected]" => "base32secret_for_one_time_passwords",
}

I'm using Google Auth for my personal gmail account, but I don't get how can I get/generate base32secret_for_one_time_passwords ?

If I left it as it is: then the raspberry respond to me:

client: pwd rasperry: Unknown User: pwd

client: whoami raspberry: Unknown User: whoami

and so on...

stanbar avatar Nov 07 '18 11:11 stanbar

Hello @stasbar, I will come back to help you as soon as I have a computer in hand to reproduce the steps required. Probably tonight (in about 12 hours).

formigarafa avatar Nov 07 '18 12:11 formigarafa

I generated some random base32 string and used it in my Google auth and in credentials.rb

➜  robotito-1.0.0 cat config/credentials.rb
# Robo-TiTO connects to Jabber using these settings.
BOT_LOGIN         = "[email protected]"
BOT_PASSWORD      = "password"
BOT_JABBER_HOST_SERVER = 'conversations.im'
BOT_JABBER_SERVER_PORT = 5222

# Robo-TiTO only accepts commands from contacts listed on AllowedUsers array.
PASSWD = {
        "stasbar" => "JBZW4YLLMFVXKZDEMJ3HGYTCONUHG2DTNBZWU43KONVHG2TTNJZWUYLLNNQWWYLLMFVXG2DYNBUHQ==="
}

Then when I started interaction with the server

Client: stasbar Raspberry: Welcome, stasbar. Please send authentication. Client: 348468

Meanwhile:

./robotitod run
Connecting...
Connected.
/var/lib/gems/2.3.0/gems/rotp-3.3.0/lib/rotp/base32.rb:43:in `decode_quint': Invalid Base32 Character - '=' (ROTP::Base32::Base32Error)

I removed '=' chars from the key and restarted.

./robotitod run
Connecting...
Connected.

At this point the server is not responding to any message, it doesn't even send Unknown User: stasbar

stanbar avatar Nov 07 '18 14:11 stanbar

Hello, I don't understand how to setup : PASSWD = { "username" => "base32secret_for_one_time_passwords", } Can you provide more detailed instructions?

Atlas974 avatar Apr 15 '19 16:04 Atlas974

Hello, I don't understand how to setup : PASSWD = { "username" => "base32secret_for_one_time_passwords", } Can you provide more detailed instructions?

Edit: I managed to make it work! Even if I didn't understand how.... Basically "base32secret_for_one_time_passwords" can be anything, right?

Atlas974 avatar Apr 15 '19 17:04 Atlas974

As far as I understood it must be base32 conform. So that means upper-case letters A–Z and digits 2–7 are allowed. https://en.wikipedia.org/wiki/Base32

JarnoThierolf avatar Apr 15 '19 17:04 JarnoThierolf

As far as I understood it must be base32 conform. So that means upper-case letters A–Z and digits 2–7 are allowed. https://en.wikipedia.org/wiki/Base32

For sure, I was talking about how Google Authenticator works (so I made some research). I used Python to generate my key if it helps some of them: https://riptutorial.com/python/example/27071/encoding-and-decoding-base32

Atlas974 avatar Apr 15 '19 17:04 Atlas974