News for hackers. Stuff that matters.
Re:Instagram Django site admin by mikeyk on Thursday June 13, 2013 @10:58AM (#5874373)
Mike from Instagram here. We've now locked it down more (the actual admin contents were always properly protected).

We're also part of Facebook's bug bounty whitehat program (https://www.facebook.com/whitehat/bounty/), if anyone comes across something in the future, we welcome responsible disclosure and pay out bounties through the program as well.

Re:Instagram Django site admin by MattBearman on Thursday June 13, 2013 @11:36AM (#5874593)
Out of interest, would something as easy to find as this qualify for the bug bounty?
Re:Instagram Django site admin by davis_m on Thursday June 13, 2013 @11:48AM (#5874668)
I would hope so. It shouldn't matter how "easy" something is to find. If the bug was really that easy, the team should have never let it out onto production.
Re:Instagram Django site admin by tptacek on Thursday June 13, 2013 @01:06PM (#5875173)
Off the top of my head I can't speak to Facebook's program, but Google's terms include "substantially affects the confidentiality or integrity of user data". A login page that shouldn't be exposed is a marginal finding and might not qualify.

Also: obviously I don't speak for either Facebook or Google, but I strongly recommend against brute-forcing login prompts to try to prove the point that an exposed console is a real finding.

Re:Instagram Django site admin by dylangs1030 on Thursday June 13, 2013 @03:57PM (#5876189)
"Report a bug that could compromise the integrity of Facebook user data, circumvent the privacy protections of Facebook user data, or enable access to a system within the Facebook infrastructure"

^That's Facebook's. Theoretically, an exposed login page "could...enable access to a system within the Facebook infrastructure", but to be fair, I doubt they had that in mind.

Re:Instagram Django site admin by zalew on Thursday June 13, 2013 @08:45AM (#5873705)
it may be a honeypot. I sometimes set up a bogus form under /admin/ which logs attempts. adrian holovaty on the other hand, redirects /admin/ to django docs http://www.holovaty.com/writing/admin-easter-egg/

//edit: oh, now I see somebody thought of my idea too https://github.com/dmpayton/django-admin-honeypot

Re:Instagram Django site admin by Legogris on Thursday June 13, 2013 @09:15AM (#5873845)
Given that they don't seem to have any automatic tests or similar for their APIs (check out their Google group and you'll see that stuff have been broken for a long time for all users without attention. When stuff has been broken in the past, Instagram people will ask "is this still a problem?", like they have no way of checking their own APIs...), I wouldn't expect them to be that crafty.
Re:Instagram Django site admin by donbronson on Thursday June 13, 2013 @09:38AM (#5873941)
Pinterest and Instagram are both using Django. Then again, when you are scale like these sites, you start to build new architecture around existing stuff. Reference: http://highscalability.com/blog/2013/4/15/scaling-pinterest-...
Re:Instagram Django site admin by IgorPartola on Thursday June 13, 2013 @09:42AM (#5873960)
Re:Instagram Django site admin by tomp on Thursday June 13, 2013 @12:25PM (#5874903)
Makes me wonder why there aren't more jobs for Django; Ruby on Rails still seems to be far more popular for new startups!
Re:Instagram Django site admin by cwh on Thursday June 13, 2013 @12:32PM (#5874939)
i believe it's because Rails is as easy as grabbing a shovel to dig a hole for yourself.
Re:Instagram Django site admin by pjan on Thursday June 13, 2013 @11:22AM (#5874517)
And they're not alone: mixpanel Django site admin: https://mixpanel.com/admin/
Re:Instagram Django site admin by pacifi30 on Thursday June 13, 2013 @10:02AM (#5874049)
How do you mask your admin portal when you are small enough that you dont have an intranet. Someone on hacker news pointed out to me about my admin portal being open but I never understood how to mask it. http://www.truffle.io/admin/ Any suggestions?
Re:Instagram Django site admin by StavrosK on Thursday June 13, 2013 @10:04AM (#5874059)
Well, first of all, change the URL to something obscure. That'll take care of most of the problems. Afterwards, you could set SSL certificates so only browsers with the private keys could even access it.
Re:Instagram Django site admin by pacifi30 on Thursday June 13, 2013 @10:06AM (#5874071)
Thank you so much. I'll change it to something obscure and for the SSL certificate I am thinking if I can use heroku's SSL certificate.
Re:Instagram Django site admin by StavrosK on Thursday June 13, 2013 @10:10AM (#5874088)
That's a normal HTTPS cert, I'm talking about this:

http://www.ibm.com/developerworks/lotus/library/ls-SSL_clien...

Really, though, unless you're extremely security-conscious, a hidden URL over HTTPS with a good password is sufficient for your purposes.

Also, don't serve any pages over plain HTTP, login pages even less so.

Re:Instagram Django site admin by pacifi30 on Thursday June 13, 2013 @10:34AM (#5874223)
Thanks, I guess I ll explore the option that you described above. Also there is one more thing I am curious about, so heroku does gives a free SSL certificate but that only works for their domain meaning something like truffleapp.herokuapp.com, it doesn't work for the custom domain. Do you know any way where I can save money on buying SSL certificate and rather use heroku's certificate. All the certificates put atleast a 1000$ hole in the pocket but eventually in a week or so if I can't figure out how to use heroku SLL, I have to spend that money
Re:Instagram Django site admin by tingletech on Thursday June 13, 2013 @10:42AM (#5874269)
If you are just using ssl on your admin site; you could roll your own.

  openssl req -new -x509 -nodes \
        -out /nuxeo/certs/server.crt \
        -keyout /nuxeo/certs/server.key \
        -batch
you will get a warning about the certificate being suspect; but at least the traffic will be encrypted
Re:Instagram Django site admin by tjohns on Thursday June 13, 2013 @12:44PM (#5875017)
StartCom offers free SSL certificates that are recognized by most browsers: http://cert.startcom.org/

Heroku will still probably charge you a basic fee for enabling SSL, since each certificate requires a dedicated (non-shared) IP address... at least until SNI support becomes more commonplace.

Edit: Just to reiterate what others have said, this is a server-side certificate, which is primarily used for encryption. You'll also want to generate a client-side certificate for authentication purposes. That's something you'd do entirely on your own, no need to go through a third-party CA for that.

Re:Instagram Django site admin by pfg on Thursday June 13, 2013 @10:15AM (#5874124)
Note that StavrosK is probably talking about SSL client authentication, which isn't what most people think about when talking about SSL. Basically, it enables you to allow access only to people with a certain client certificate installed in their browser (i.e., proving the clients' identity to the server, not just the other way around).

Unfortunately I have no idea how this would work on Heroku.

There's a great article about client authentication for HAProxy (might be interesting even if you're not using HAProxy): http://blog.exceliance.fr/2012/10/03/ssl-client-certificate-...

Re:Instagram Django site admin by dalore on Thursday June 13, 2013 @11:00AM (#5874381)
There is a module for django to do client ssl cert authentication. I haven't used it though but it seems maintained.

https://github.com/kimvais/django-ssl-client-auth

Re:Instagram Django site admin by Keyframe on Thursday June 13, 2013 @10:18AM (#5874139)
you can also put up a htpasswd if you can on that directory, every bit helps.
Re:Instagram Django site admin by ing33k on Thursday June 13, 2013 @10:35AM (#5874225)
tbh , was not aware of creating private ssl certificates for this purpose .. Thanks
Re:Instagram Django site admin by cdjk on Thursday June 13, 2013 @12:30PM (#5874930)
Limit access in the firewall/load balancer/webserver to whitelisted ip addresses. If you don't have static ips at your office or a vpn, include the ip of a VPS or dev server, and use ssh forwarding (-D for a socks proxy) to access the admin site. And if you're running everything from one server, you can even limit connections to localhost and tunnel connections through there.
Re:Instagram Django site admin by workhere-io on Thursday June 13, 2013 @10:07AM (#5874079)
I'm not sure what the point in linking to this is. If you regard it as security hole, alert Instagram. If you just want to let people know that Instagram uses Django... well, that information is already on https://www.djangoproject.com.
Re:Instagram Django site admin by aet on Thursday June 13, 2013 @10:45AM (#5874292)
I guess the point is that maybe you should restrict "people from the internet" from being able to access the login page.
Re:Instagram Django site admin by workhere-io on Thursday June 13, 2013 @10:47AM (#5874310)
I understand. My point was that it would be better to alert Instagram rather than direct a lot of HN users to a page that offers no value.
Re:Instagram Django site admin by aet on Thursday June 13, 2013 @11:06AM (#5874425)
I agree. (Already fixed?)
Re:Instagram Django site admin by gregorkas on Thursday June 13, 2013 @08:19AM (#5873625)
Although it's been a while since I've done anything in Django, seeing this still gives me a warm feeling.
Re:Instagram Django site admin by the_cat_kittles on Thursday June 13, 2013 @10:06AM (#5874070)
I changed the top bar color from that blue green to a red on the production deployment of my app- helps avoid forgetting which deployment you are messing with.
Re:Instagram Django site admin by craigkerstiens on Thursday June 13, 2013 @10:46AM (#5874303)
A post or code snippet that does this would be great, seems like a really simple but useful people others may like
Re:Instagram Django site admin by sevenproxies on Thursday June 13, 2013 @10:57AM (#5874364)
Simple browser-side CSS does the trick. I use Stylish[1] for Chromium. I believe there is also a Firefox version.

[1] - https://chrome.google.com/webstore/detail/stylish/fjnbnpbmke...

Re:Instagram Django site admin by the_cat_kittles on Thursday June 13, 2013 @04:39PM (#5876412)
I changed django admin's base.css:

    #header {
       ... css ...
       background: <whatever color you want>;
       ... more css ...
    }
Re:Instagram Django site admin by dlsym on Thursday June 13, 2013 @09:00AM (#5873765)
admin:admin doesn't work.
Re:Instagram Django site admin by stefs on Thursday June 13, 2013 @09:29AM (#5873897)
file a bug report "login is broken"
Re:Instagram Django site admin by dopamean on Thursday June 13, 2013 @10:42AM (#5874270)
This is the best idea in this thread.
Re:Instagram Django site admin by antidaily on Thursday June 13, 2013 @09:45AM (#5873969)
tried that too. LOL.
Re:Instagram Django site admin by spdy on Thursday June 13, 2013 @10:03AM (#5874052)
Would love to see the inside. If they use special dashboards etc.

Maybe someone can give some insight.

Re:Instagram Django site admin by johndavidback on Thursday June 13, 2013 @11:19AM (#5874497)
It would actually be quite interesting to see how large enterprise clients modify/utilize the Django admin... if at all.

Other than Grappelli, I've historically used the admin pretty much as-is. Creating admin functions is one thing, but lots of custom screens is quite another.

I also think that's one thing really lacking from the Django documentation, really great customization of the Admin.

Re:Instagram Django site admin by DirtyMonkey on Sunday June 16, 2013 @09:45PM (#5890946)
Most of the Django projects I've worked on, people tended to make their own admin panels with things like Bootstrap and Foundation. Django's core team have made their goals clear for the next admin, extensibility and adaptability. https://github.com/twoscoops/django-admin2
Re:Instagram Django site admin by lukashed on Thursday June 13, 2013 @10:28AM (#5874188)
BlackJet Django admin: https://www.blackjet.com/admin/
Re:Instagram Django site admin by jchung on Thursday June 13, 2013 @11:18AM (#5874489)
Did you inform Instagram first before posting it to HN?
Re:Instagram Django site admin by wrboyce on Thursday June 13, 2013 @10:53AM (#5874338)
It seems to have (just) changed to a non-standard (different to the rest of Instagram's) 404 page.
Re:Instagram Django site admin by techaddict009 on Thursday June 13, 2013 @11:26AM (#5874543)
Has anyone taken the snapshot of it ? As instagram has fixed it and i have missed a chance to see it.
Re:Instagram Django site admin by danielsamuels on Thursday June 13, 2013 @12:10PM (#5874805)
It just looked like the default Django login - http://www.djangobook.com/en/2.0/_images/login.png
Re:Instagram Django site admin by rajbala on Thursday June 13, 2013 @10:54AM (#5874346)
They removed the link to the admin page.