News for hackers. Stuff that matters.
Re:Show HN: BuzzFeed open source SSO by itwasntandy on Thursday August 23, 2018 @11:54AM (#17828295)
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!

Re:Show HN: BuzzFeed open source SSO by Signez on Thursday August 23, 2018 @01:06PM (#17828874)
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
Re:Show HN: BuzzFeed open source SSO by itwasntandy on Thursday August 23, 2018 @03:22PM (#17829888)
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!

Re:Show HN: BuzzFeed open source SSO by snuxoll on Thursday August 23, 2018 @02:04PM (#17829363)
Neat project, but I have to ask why you didn't go with an existing solution like Keycloak?
Re:Show HN: BuzzFeed open source SSO by itwasntandy on Thursday August 23, 2018 @03:18PM (#17829859)
Hey,

there were a few reasons behind this.

- ease of migration was a big one, we had 100+ instances of bitly's oauth2_proxy, and were able to seamlessly migrate them to this, without any changes to the services being protected.

- ease of deployment was also important. Our solution doesn't have any datastore dependencies, and is stateless, so was straightforward to deploy into our PaaS ( https://tech.buzzfeed.com/deploy-with-haste-the-story-of-rig... ).

- when we built this, there were far fewer solutions than there are today. For example, Ory's Oathkeeper ( https://github.com/ory/oathkeeper) was released after we were already using sso internally at BuzzFeed.

thanks!

Re:Show HN: BuzzFeed open source SSO by ashayh on Thursday August 23, 2018 @08:51PM (#17831917)
Is it possible to use this with Nginx auth_request? I use bitlys oauth2_proxy like so because it doesn't support websockets.
Re:Show HN: BuzzFeed open source SSO by itwasntandy on Thursday August 23, 2018 @09:52PM (#17832170)
Maybe - we've not tried it, but I just asked Justin who architected sso, and he suggested that maybe https://github.com/buzzfeed/sso/blob/master/internal/proxy/o... could be used.

However there would be some caveats - like for example `skip_auth_regex` (see https://github.com/buzzfeed/sso/blob/master/docs/sso_config.... ) would not work with this, because the original URI would not be checked.

Re:Show HN: BuzzFeed open source SSO by andremat on Thursday August 23, 2018 @12:43PM (#17828675)
Have you contracted an independent pen-testing company to assess your design and implementation?
Re:Show HN: BuzzFeed open source SSO by itwasntandy on Thursday August 23, 2018 @12:56PM (#17828776)
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...

Re:Show HN: BuzzFeed open source SSO by kingbirdy on Thursday August 23, 2018 @12:51PM (#17828731)
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.

Re:Show HN: BuzzFeed open source SSO by baby on Thursday August 23, 2018 @01:44PM (#17829200)
It was only a week long assessment though, I don’t know Security Innovation but I’m sure they would have appreciated more time.
Re:Show HN: BuzzFeed open source SSO by itwasntandy on Thursday August 23, 2018 @02:08PM (#17829399)
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.

Re:Show HN: BuzzFeed open source SSO by yubozhao on Thursday August 23, 2018 @02:48PM (#17829674)
Looking forward to read about it. Thank you for the project!
[dead]
Re:Show HN: BuzzFeed open source SSO by gknoy on Thursday August 23, 2018 @02:40PM (#17829626)
In the blog article, they state:

> we have made sso a priority target for penetration testing by researchers on our bug bounty program — we’ve paid bounties for a number of reported issues!

While that makes it clear that they cared about penetration testing, it isn't what the person was asking to that you replied to -- they asked if they had contracted with an independent company to do testing. This did not seem to be answered by the article, and seems like a reasonable question to ask.

Re:Show HN: BuzzFeed open source SSO by itwasntandy on Thursday August 23, 2018 @04:25PM (#17830410)
We did talk in the blog article about engaging with Security Innovation too.
Re:Show HN: BuzzFeed open source SSO by rkho on Thursday August 23, 2018 @01:39PM (#17829138)
Your comment is incredibly unhelpful and does not contribute to the discussion. HN is not the kind of platform to shitpost on.
Re:Show HN: BuzzFeed open source SSO by Dowwie on Thursday August 23, 2018 @07:07PM (#17831336)
How have you found working with Go?
Re:Show HN: BuzzFeed open source SSO by itwasntandy on Thursday August 23, 2018 @09:30PM (#17832073)
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!

Re:Show HN: BuzzFeed open source SSO by thomseddon on Thursday August 23, 2018 @04:26PM (#17830415)
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

Re:Show HN: BuzzFeed open source SSO by nancyp on Thursday August 23, 2018 @01:05PM (#17828862)
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

Re:Show HN: BuzzFeed open source SSO by itwasntandy on Thursday August 23, 2018 @01:09PM (#17828903)
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.
Re:Show HN: BuzzFeed open source SSO by user5994461 on Thursday August 23, 2018 @01:19PM (#17828974)
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.
Re:Show HN: BuzzFeed open source SSO by nancyp on Thursday August 23, 2018 @01:16PM (#17828943)
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.
Re:Show HN: BuzzFeed open source SSO by itwasntandy on Thursday August 23, 2018 @01:23PM (#17829001)
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.

Re:Show HN: BuzzFeed open source SSO by markovbot on Thursday August 23, 2018 @03:20PM (#17829878)
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?
Re:Show HN: BuzzFeed open source SSO by itwasntandy on Thursday August 23, 2018 @03:28PM (#17829941)
Right now we have a dependency on Google as an OAuth2 provider, as that's what we use internally at BuzzFeed. However we've designed sso to allow us to easily add other providers.

For example, there's this task ( https://github.com/buzzfeed/sso/issues/9 ) to create a default provider without Google dependencies for test purposes.

We'd also welcome PRs adding other providers and believe any OAuth2 provider should be straight forward to add.

Re:Show HN: BuzzFeed open source SSO by markovbot on Thursday August 23, 2018 @03:46PM (#17830134)
Cool, thanks for letting me know. I'll have to research this more.
Re:Show HN: BuzzFeed open source SSO by wrboyce on Saturday August 25, 2018 @08:36AM (#17840586)
I have used https://github.com/bitly/oauth2_proxy with success, and it supports a variety of providers.
Re:Show HN: BuzzFeed open source SSO by rllin on Thursday August 23, 2018 @05:11PM (#17830736)
a bit ignorant in this area, but how is this functionally different than Google Cloud IAP?
Re:Show HN: BuzzFeed open source SSO by itwasntandy on Thursday August 23, 2018 @05:27PM (#17830837)
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.

Re:Show HN: BuzzFeed open source SSO by supuun on Thursday August 23, 2018 @02:25PM (#17829532)
never expected BuzzFeed on HN frontpage (:
Re:Show HN: BuzzFeed open source SSO by minimaxir on Thursday August 23, 2018 @02:54PM (#17829705)
Re:Show HN: BuzzFeed open source SSO by solarkraft on Thursday August 23, 2018 @08:05PM (#17831685)
Buzzfeed news is ... surprisingly good. The Buzzfeed name is just associated with painfully stupid content.
Re:Show HN: BuzzFeed open source SSO by philliphaydon on Friday August 24, 2018 @02:51AM (#17833238)
> Buzzfeed news is ... surprisingly good.

This is literally news to me...

[dead]
Re:Show HN: BuzzFeed open source SSO by y4mi on Thursday August 23, 2018 @12:30PM (#17828587)
Why so snarky?

It might not be necessary, because there are already a few good identity providers around, but isn't it always good when companies release quality open source software?

Re:Show HN: BuzzFeed open source SSO by CornishPasty on Thursday August 23, 2018 @12:34PM (#17828617)
From what I can gather, gp posted a joke in reference to the usual clickbait headlines of BuzzFeed, not against the code itself.