The place to discuss how to make 23 work in special ways with the 23 api

Authentication and Signing

marrethozi   March 27, 2009, 05:14 PM

Hi. I am planning to write a little application to access my pictures over the 23 API.

Considering authentication I read the documentation for 23hq (http://www.23hq.com/doc/api/auth) which should be compatible (?) to authentication with the flickr API (http://www.flickr.com/services/api/auth.howto.web.html)

Flickr Authentication seems to require a shared secret in order to sign the calls - 23hq seems not.

1. Is it right that if someone captures the frob, token and api_key than he/she is able to access my pictures?
2. Shouldn't be there a shared_key (provided, e.g. by https) to sign calls to the API for security?

--
Thorsten

 
Steffen Fagerström Christensen Team 23   March 27, 2009, 11:27 PM

Hey marrethozi,

You're right that we need to handle request slightly differently from Flickr. The consideration is that we want applications made to work with flickr to work with 23 without you needing to rewrite code. And since Flickr controls the register of secret keys, this leaves us unable to verify the api_sig parameter.

What the api_sig parameter does, however, is one thing: It verifies that the api key is correct -- and thus that an application matches the records over on flickr.com. It verifies to Flickr that the application is approved and not masquerading as another application.

However, for any desktop application, the secret_key can be extracted from the application, which is even easier if the app is open source making for a false sense of security. Only for web applications that use the Flickr API is secret_key secret at all.

Thus, from a security standpoint, 23's implementation of the Flickr API is just as secure as Flickr. The only difference is that we are less able to verify the identity of applications, which only affects our ability to gather statistics, not any security-related aspect of the user's interaction with 23. (It could also affect our ability to block certain applications from using our API, but Flickr's ability to do so is also hampered by the fact that many secret_keys cannot be kept secret.)

You're right, of course, if somebody were to pick up the auth_token they'd be able to access your photos -- but the exact same thing is true of that same someone were to capture your browser cookies or your username/password which are also sent in plain text by browsers. This leave our api no more and no less secure than the ordinary site or any other non-https website for that matter. And the same thing would be true if you used Flickr.

(There are ways to make the API more secure, but we wish to maintain compatibility with apps that support the Flickr API. We feel, however, that the current API provides a reasonable amount of security for the purpose.)

I hope this clarifies the issue ;-)

 
marrethozi   March 28, 2009, 12:23 AM

Hi Steffen,

thank you for your detailed answer. I was just a little bit confused when I started to program a piece of code using the flickcurl library (http://librdf.org/flickcurl/) . This library needs the secret_key to be initialized. However, my code (written in C) now successfully synchronizes my photos to a local directory.

For the flickcurl library I also wrote a little patch which allows overwriting the default flickr server url with a user defined url. Hopefully, the maintainer will apply it for further releases.

--
marrethozi

P.S.: I first tried flickrfs which I got somewhat working with 23 after some quick hack modifications. However, I am not really a Python programmer and, therefore, I couldn't get it stable...

 
Steffen Fagerström Christensen Team 23   March 28, 2009, 06:42 AM

Nice, will you be publishing any code, i.e. for the backup-by-syncing-to-local-folder app?

 
marrethozi   March 29, 2009, 01:29 PM

Yes, I plan to publish it as soon as I find the time to make it more user-friendly and error tolerant.

 




About 23

About 23
What is 23 and who's behind the service?
Just In
Discover the world from a different angle.
Here's a crop of the latest photos from the around the world.
Search
Search photos from users using 23
Help / Discussion
Get help or share your ideas to make 23 better
23 Blog / 23 on Twitter
Messages and observations from Team 23
Terms of use
What can 23 be used for and what isn't allowed
More services from 23
We also help people use photo sharing in their professional lives
RSS Feed
Subscribe to these photos in an RSS reader
  • Basque (ES)
  • Bulgarian (BG)
  • Chinese (CN)
  • Chinese (TW)
  • Danish (DK)
  • Dutch (NL)
  • English (US)
  • French (FR)
  • Galician (ES)
  • German (DE)
  • Italian (IT)
  • Norwegian (NO)
  • Polish (PL)
  • Portuguese (PT)
  • Russian (RU)
  • Spanish (ES)
  • Swedish (SE)

Popular photos right now