Are blob keys guessable?

69 views
Skip to first unread message

Rob Curtis

unread,
Sep 27, 2015, 3:23:50 PM9/27/15
to Google App Engine
Hi,

I can't find any information on this in the documentation;
Are blob keys guessable?
Is it safe to expose stringified blob key to a user?

Thanks
Rob

Ryan (Cloud Platform Support)

unread,
Sep 28, 2015, 10:22:04 AM9/28/15
to Google App Engine
Salutations Rob

"The Blobstore value is assigned a unique, randomly generated key." [1]

The book was written by a Googler and is a good read.

[1] http://ae-book.appspot.com/chapters/blobstore

Rob Curtis

unread,
Sep 28, 2015, 10:34:42 AM9/28/15
to Google App Engine
Excellent, thanks very much.

--
You received this message because you are subscribed to a topic in the Google Groups "Google App Engine" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-appengine/B2H5YeiDqLQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-appengi...@googlegroups.com.
To post to this group, send email to google-a...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/f5615b93-9c7d-4494-bf4e-17bc4e72f242%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Karl MacMillan

unread,
Sep 28, 2015, 1:51:18 PM9/28/15
to google-a...@googlegroups.com, Google App Engine
Your question made me think that you were worried about security. I would suggest that the randomness provided by the ID assignment is not helpful if you are thinking of using these like people often use authentication tokens or things like shareable urls for Dropbox or Google docs. The most basic question in those scenarios is - if a user has one key what is the likelihood that they could guess another valid key, potentially for another users data? Depending on how you are enforcing user separation, with datastore keys the answer is actually it is quite likely that they could guess another valid key.

In general, you probably want to be handing out security tokens created by a standard process combined with HTTPS with the key. But unfortunately getting this kind of security right means that you have to thoroughly understand what security you are trying to enforce (i.e., threat modeling).

Karl



You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengi...@googlegroups.com.

To post to this group, send email to google-a...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.

Rob Curtis

unread,
Sep 29, 2015, 5:13:56 AM9/29/15
to Google App Engine
Hi Karl,

Thanks for your response. I think it's worth finding out how random the key is and how large the key space is.

@Ryan, could you elaborate on the randomness of the blobkey? Is it guessable given another blobkey?

Thanks
Rob

Ryan (Cloud Platform Support)

unread,
Sep 29, 2015, 4:51:44 PM9/29/15
to Google App Engine
I can't speak to how the keys are generated but take a look at the bellow keys. They are all the same file uploaded with the same code within a few moments of each other. They are unique enough it would take a bruit force attack to find a key that could be used:

AMIfv951k5FTlQxC-6nljafbiyiRJvWkcVhbuCbBvFcSu6cuf_IV2x1f_OIhkQ-Q1OnPp0HN6hKKbXMS4S_C3dgt5zGhQcWKHOZy2ALjOXVr20o9PhPWT8Wmbu4oxJU7gmAXfVQtttYBheQvpJFbOkH_qnilNdWmh_UYNiZjy_O9ioV_SJnH-PM

AMIfv954myPMnDkCeYlHSMUj2noCiBqD-BtaxwZw7Raf_LGg62IOlgOK44PpysRDX5BWEQE5NfzvtS-xVV4BL9kh1eH2lx7l5fWQWJSEQR8vL8JCAOq12A2LuzvUdLK3e9jwXNwx7UCVI1EeUipVXUvABT9tauNJ_DRBBlL8bqNE99QzfXijCFQ

AMIfv97UzePJVVqYjnxkAf5d_-tG88gzxp9DcttAeUdZ10NUpMTVmYG2QttDDOSNzztFzHVnRa4rcy-BWeLlN9ZRZzEEXI2TXWUIxn1tzwW_QgYSJP60YWb5bt_khIPnUAWIbij-FQEdMycGDada_it6WoPky5hCS0cjVtAJ4tr2p7NuRxIo2_c

AMIfv97MrdriwZpoTkLGxc2sEFwfXIMXwz7Dt3f7IH9Iljb9S57f6amI8ZB8H70VwfkLVOnPvhoDNW7iyTUhiqtafSsFu7L6w3U_qxqzaGJNez8XGLLYeZCwBUWRre-6eeodyTzzohB7zgrEvTp4j9B1K99HU5Secp2cZNW0VW4i9co-o352eqw

AMIfv95anW6Qio_APu5La6ZBAs9ZUvaXcO5x8JeN0CW0knMnLtCFSWiAFe0laElTfbguW71WPO7UpKtFK_ijUTSNOgvT6w2T-0YWKawlHaBvyVnDFRZAcdsbGdIeBAcQOnXsJ6D_dDkKLBi73SHTIXB9LTr_oZUbpVOxiLHQOZa8h58ubozYu0E

On Sunday, September 27, 2015 at 3:23:50 PM UTC-4, Rob Curtis wrote:

Rob Curtis

unread,
Sep 30, 2015, 6:41:07 AM9/30/15
to Google App Engine
Thanks Ryan!




--
You received this message because you are subscribed to a topic in the Google Groups "Google App Engine" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-appengine/B2H5YeiDqLQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-appengi...@googlegroups.com.
To post to this group, send email to google-a...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
Reply all
Reply to author
Forward
0 new messages