Settings

Theme

Show HN: BuzzFeed open source SSO

tech.buzzfeed.com

166 points by itwasntandy 7 years ago · 41 comments

Reader

itwasntandyOP 7 years ago

GitHub repo: https://github.com/buzzfeed/sso

This is our identity aware proxy, which we've been using internally for a year.

The blog post explains our motivations behind creating it, and open-sourcing it. It's available today, under MIT license.

We'll be keeping an eye on the thread, and happy to follow up to any questions!

  • Signez 7 years ago

    Thank you for not having just dumped it like that, but adding quick-start guides, examples and even did some additionnal security checks, it's just awesome for little organizations <3

    • itwasntandyOP 7 years ago

      thank you - We know from our own experience using other open source projects that having documentation, and guides to get started really helps.

      We know there is more to do there too (some of the feedback in this HN post has helped highlight areas we need to improve the docs) and we will be adding to the docs so over the next while.

      We will also welcome PRs improving the docs!

  • snuxoll 7 years ago

    Neat project, but I have to ask why you didn't go with an existing solution like Keycloak?

  • andremat 7 years ago

    Have you contracted an independent pen-testing company to assess your design and implementation?

    • itwasntandyOP 7 years ago

      Yes, as mentioned in the blog post, we worked with Security Innovation to do a week long security assessment with full access to source code, design documents and endpoints.

      We also have a long term consulting arrangement with a widely respected security architect, and they helped review our design and implementation.

      Additionally, BuzzFeed has a bug bounty program on hackerone (https://hackerone.com/buzzfeed), and have invited partipating researchers to report on any issues found. We’ve paid out bounties for a number of minor issues, which were addressed prior to open-sourcing.

      Additionally, knowing that security is never done, we continue to make it eligible for bounties -- see https://github.com/buzzfeed/sso/blob/master/README.md#securi...

    • kingbirdy 7 years ago

      This is mentioned in the article

      > In preparation for open sourcing we also engaged with Security Innovation, a widely respected agency who count Microsoft, Symantec, and Amazon as clients, to do a more in-depth, week long assessment, with full access to source code and design documents. This found no major issues, which gives us the confidence to open source sso today.

      • baby 7 years ago

        It was only a week long assessment though, I don’t know Security Innovation but I’m sure they would have appreciated more time.

        • itwasntandyOP 7 years ago

          That is understood, and is always why we engaged with some of the top researchers who contribute to our bug bounty program, from the start with this project.

          For example offering increased bounties during certain windows, or providing early access to the source code.

          We highly value our bug bounty program, and find it to be a very effective mechanism for continuous security validation.

          I'll write a tech blog post in the near future about how we facilitate our program.

  • Dowwie 7 years ago

    How have you found working with Go?

    • itwasntandyOP 7 years ago

      Golang is pretty beloved at BuzzFeed.

      It’s one of our two standard languages - the other being Python - and whilst the vast majority of our services are Python, Golang is being used for growing and significant number too.

      Touching on my first point, we have observed people enjoy writing Go apps, and it is a great fit particularly where performance and scalability are needed.

      Therefore when engineers have moved to another team internally, they often will evangelize Golang to their new team members.

      So we expect it to continue to grow and thrive here!

thomseddon 7 years ago

We took a slightly different approach to solving a similar problem: https://github.com/thomseddon/traefik-forward-auth

We were already using traefik as a proxy for our docker/swarm clusters and this is a single container drop in to add authentication to every traefik request.

It's still missing a few key features but it can get you started, we're testing the use of a single auth domain (so you don't have to add every internal service domain as a refirect_uri in Google - looks similar to how sso works) internally and we expect to release this shortly once finished.

Additionally, if you want an even lighter weight option, we also use, with great success, cloudflare's lua script on a few services we don't run with docker/traefik: https://github.com/cloudflare/nginx-google-oauth

nancyp 7 years ago

GApps supports Custom SAML app. What's the benefit of using this Oauth2 over SAML2 protocol?

https://support.google.com/a/answer/6087519?hl=en

  • itwasntandyOP 7 years ago

    Great question. We found that SAML doesn’t typically have great support on mobile devices [edit: had originally written browser here, hence the comments below], and since BuzzFeed has many remote employees around the world, we needed to support those workflows, so OAuth2 made more sense.

    • user5994461 7 years ago

      That doesn't make sense. SAML is only a bunch of POST and redirections as far as the browser is concerned. There is no specific support required from the browser.

    • nancyp 7 years ago

      IMO That's opposite of what I understand. The selling point of Oauth2 is SAML works great on web (mobile browsers included) but not so on apps.

      • itwasntandyOP 7 years ago

        I’ll correct my post above. I meant to say `mobile devices`, not `mobile browsers` . My bad.

        The other reason, which I didn’t mention above, but is talked about in the blog post, is we decided to use bitly’s oauth2_proxy as a basis for our solution. This had been widely used in BuzzFeed (we had over 100 auth proxies in place prior to rolling out sso), and so the OAuth flow was something everyone was familiar with.

markovbot 7 years ago

Looks super interesting. I'm looking to do something like this for my personal stuff, but I'd rather avoid the dependency on Google. Does anyone have suggestions for how to set something like that?

rllin 7 years ago

a bit ignorant in this area, but how is this functionally different than Google Cloud IAP?

  • itwasntandyOP 7 years ago

    It’s not. We acknowledge that in our blog post, and our approach was definitely influenced by the BeyondCorp philosophy.

    However google IAP requires that your infrastructure is all in Google cloud.

    Whilst we do use GCP, most of BuzzFeed’s infra is in AWS, we needed a solution which worked for both.

supuun 7 years ago

never expected BuzzFeed on HN frontpage (:

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection