Google Groups Home
Help | Sign in
Sending encoded login details to API
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  23 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
dean.j.robinson  
View profile
 More options May 6, 9:25 pm
From: "dean.j.robinson" <Dean.J.Robin...@gmail.com>
Date: Tue, 6 May 2008 18:25:37 -0700 (PDT)
Local: Tues, May 6 2008 9:25 pm
Subject: Sending encoded login details to API
A couple of days ago, after the launch of Hahlo 3, someone posted that
Hahlo is "insecure" because it stores the username/password in a
cookie on your iPhone. Personally I think its not that big of an issue
(its just a twitter password, its not bank account details or
anything), and what he fails to mention is that every twitter iphone
app does exactly the same thing.

I tried (even though I was doubtful it would work) to md5 the password
before saving it in the cookie, which would counteract the "issue".
However it then doesn't work when you try to use it to authenticate
against the api (as expected)

Is there anyway that I can authenticate against the API with something
other than the raw password?  ie, can you make it possible to login
using an md5 hashed password or something better?

Does anyone else have any suggestions?


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alex Payne  
View profile
 More options May 6, 9:56 pm
From: "Alex Payne" <a...@twitter.com>
Date: Tue, 6 May 2008 18:56:01 -0700
Local: Tues, May 6 2008 9:56 pm
Subject: Re: Sending encoded login details to API
We've looked into providing an alternative to HTTP Basic Auth in the
short term, but due to our password storage technique we're unable to
accept a salted hash as the basis of authentication.  Our long-term
solution here is still OAuth.

On Tue, May 6, 2008 at 6:25 PM, dean.j.robinson

--
Alex Payne
http://twitter.com/al3x

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ed Finkler  
View profile
 More options May 6, 11:02 pm
From: "Ed Finkler" <funkat...@gmail.com>
Date: Tue, 6 May 2008 23:02:32 -0400
Local: Tues, May 6 2008 11:02 pm
Subject: Re: Sending encoded login details to API
Lemme put on my 10 gallon security "expert" hat here...

Do you really have to store the username and pass in the cookie? Hahlo
is, if I remember, a web app, so you should be able to just store the
username and pass server-side in the session data. The cookie would
only need to store a session ID.

If you really *have* to store your data in the cookie, you should be
able to encrypt your cookie data with a two-way hash. It's not optimal
(you should never store authentication data in the cookie, encrypted
or not), but it will make stealing the data significantly harder.

Does Safari on the iPhone support HTTPS-only cookies? If so, I would
be using those as well (again, if you really HAVE to store usernames
and passwords in the cookie).

Remember that *lots* of (most?) people only use a handful of usernames
and passwords for numerous accounts. A lost iPhone or an unknown XSS
exploit in Hahlo or Twitter could cause big, embarrassing trouble.

You can ping me offlist if you wanted to discuss this further, since
the issues are a bit outside scope.

--
Ed Finkler
http://funkatron.com
AIM: funka7ron
ICQ: 3922133
Skype: funka7ron

On Tue, May 6, 2008 at 9:25 PM, dean.j.robinson


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
dean.j.robinson  
View profile
 More options May 6, 11:36 pm
From: "dean.j.robinson" <Dean.J.Robin...@gmail.com>
Date: Tue, 6 May 2008 20:36:13 -0700 (PDT)
Local: Tues, May 6 2008 11:36 pm
Subject: Re: Sending encoded login details to API
Hi Ed,

Thanks for the response, I'm going to have to take a good look at my
auth code, its not something I wrote myself, its a modified script I
got from elsewhere. I should be able to switch it to session data
instead, but I need to make sure I can do it without interuptting my
users too much. Looks like I'm not going to escape from working on
Hahlo just yet.

cheers

On May 7, 1:02 pm, "Ed Finkler" <funkat...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
dean.j.robinson  
View profile
 More options May 7, 9:54 am
From: "dean.j.robinson" <Dean.J.Robin...@gmail.com>
Date: Wed, 7 May 2008 06:54:04 -0700 (PDT)
Local: Wed, May 7 2008 9:54 am
Subject: Re: Sending encoded login details to API
Ok, it got the better of me I had to fix it. I've re-written just
about all my authentication stuff to only use php sessions, all
information previously being stored in cookies is now in sessions
variables instead. I've been fiddling with if for the past few hours
and it appears to be working ok for me, but I would really appreciate
it if a few of you could jump over to http://old.hahlo.com (no iPhone
required) , login and play around to check it out for me.

Once I get this out Hahlo should be the only third party mobile
twitter client/webapp not storing raw auth details in a cookie.

cheers

Dean


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ed Finkler  
View profile
 More options May 7, 10:03 am
From: "Ed Finkler" <funkat...@gmail.com>
Date: Wed, 7 May 2008 10:03:11 -0400
Local: Wed, May 7 2008 10:03 am
Subject: Re: Sending encoded login details to API
On Wed, May 7, 2008 at 9:54 AM, dean.j.robinson

<Dean.J.Robin...@gmail.com> wrote:
>  Once I get this out Hahlo should be the only third party mobile
>  twitter client/webapp not storing raw auth details in a cookie.

Good for you... and also fairly sad for them.

--
Ed Finkler
http://funkatron.com
AIM: funka7ron
ICQ: 3922133
Skype: funka7ron


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Randal Hicks  
View profile
 More options May 7, 2:18 pm
From: Randal Hicks <rhick...@tampabay.rr.com>
Date: Wed, 7 May 2008 14:18:57 -0400
Local: Wed, May 7 2008 2:18 pm
Subject: Re: Sending encoded login details to API
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On May 7, 2008, at 9:54 AM, dean.j.robinson wrote:

> Ok, it got the better of me I had to fix it. I've re-written just
> about all my authentication stuff to only use php sessions, all
> information previously being stored in cookies is now in sessions
> variables instead. I've been fiddling with if for the past few hours
> and it appears to be working ok for me, but I would really appreciate
> it if a few of you could jump over to http://old.hahlo.com (no iPhone
> required) , login and play around to check it out for me.

> Once I get this out Hahlo should be the only third party mobile
> twitter client/webapp not storing raw auth details in a cookie.

> cheers

> Dean

Works for me.  Thanks for taking the security seriously; best to do
the right thing the first time.  I wish https was used for the login
screen, but at least the potential for assuming someone's social
identity (say by a top100 Twitterer) and broadcasting a tinyurl
pointing towards a driveby-malware-serving site has been minimized.
Hopefully others will follow your lead.

Regards,
Randal Hicks

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)

iEYEARECAAYFAkgh8pIACgkQHXnD0tz+/vyVnACdEcdI7P8ejlkyt0ro1Y+tXHGp
2ccAn1ieDvbgBUuqpiwPKjOkCbfw+msW
=h59J
-----END PGP SIGNATURE-----


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Benjamin Tucker  
View profile
 More options May 7, 6:16 pm
From: Benjamin Tucker <btuc...@gmail.com>
Date: Wed, 7 May 2008 15:16:23 -0700 (PDT)
Local: Wed, May 7 2008 6:16 pm
Subject: Re: Sending encoded login details to API
Hey Dean,

I'm the guy that wrote http://stream.btucker.org/post/33710515
Sorry to miss your post on the list or I would have responded
sooner.

Your solution sounds like an improvement, but not ideal.  Now if your
server is compromised, with it will go all your users twitter
credentials (correct me if I'm misunderstand your solution).

Here's how Quotably handles authentication:

1) use SSL for the login page
2) use a 2-way encryption algorithm on the credential cookies, like
Blowfish

I think this is the best approach until OAuth becomes viable.

Thanks for addressing this!  I really appreciate you taking it
seriously.  I know it doesn't seem like twitter credentials are that
important.  But remember a twitter account is a direct route to a lot
of people's eyes, and could cause some serious embarrassment if
nothing else for the user who has their account compromised.

-Ben

On May 7, 9:54 am, "dean.j.robinson" <Dean.J.Robin...@gmail.com>
wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
dean.j.robinson  
View profile
 More options May 7, 7:52 pm
From: "dean.j.robinson" <Dean.J.Robin...@gmail.com>
Date: Wed, 7 May 2008 16:52:18 -0700 (PDT)
Local: Wed, May 7 2008 7:52 pm
Subject: Re: Sending encoded login details to API
Hey Ben,

In addition to the switch from cookies to session vars, I am also
encrypting the password using one of the encryption functions
available in my php install. I did also encrypt the username, but it
broke a few things, I should be able to solve that when I get time.

I'll check out the ssl bit when my hosting admin panel comes back
online...

cheers

Dean

On May 8, 8:16 am, Benjamin  Tucker <btuc...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Benjamin Tucker  
View profile
 More options May 7, 8:41 pm
From: Benjamin Tucker <btuc...@gmail.com>
Date: Wed, 7 May 2008 17:41:03 -0700 (PDT)
Local: Wed, May 7 2008 8:41 pm
Subject: Re: Sending encoded login details to API
Cool.  Just don't store the encrypted password in session data stored
on the server (there's really little reason to encrypt it if you do
that since an attacker could read it using the same mechanism as your
code).  What you want is to store it in the cookie on the client.

Keep up the good work.  Hahlo really does rock!

-Ben

On May 7, 7:52 pm, "dean.j.robinson" <Dean.J.Robin...@gmail.com>
wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ed Finkler  
View profile
 More options May 7, 8:58 pm
From: "Ed Finkler" <funkat...@gmail.com>
Date: Wed, 7 May 2008 20:58:56 -0400
Local: Wed, May 7 2008 8:58 pm
Subject: Re: Sending encoded login details to API