BuzzFeed's SSO is our single sign-on experience for our internal web services, lovingly known as the S.S. Octopus (octoboi) by our team. In addition to the source code, we publish an official Docker image.
SSO is used to provide single-sign-on authentication and authorization for internal web applications behind it by ensuring that only people in a specific email domain (and optionally users in specific Google Groups) can access them. It consists of two processes - auth
and proxy
.
The main idea of SSO is a "double OAuth2" flow, where auth
is the OAuth2 provider for proxy
, and Google or another third-party provider, is the OAuth2 provider for auth
.
In a nutshell:
- If a user visits a
proxy
-protected service (foo.sso.example.com
) and does not have a session cookie, they are redirected toauth
(sso-auth.example.com
).- If the user does not have a session cookie for
auth
, they are prompted to log in via the usual Google OAuth2 flow, and then redirected back toproxy
where they will now be logged in (tofoo.sso.example.com
) - If the user does have a session cookie for
auth
(e.g. they have already logged intobar.sso.example.com
), they are transparently redirected back toproxy
where they will be logged in, without needing to go through the Google OAuth2 flow
- If the user does not have a session cookie for
proxy
transparently re-validates & refreshes the user's session withauth
- After 15 days, all sessions are expired and
proxy
will redirect the user toauth
to go through the Google OAuth2 flow once, after which they will again have access to all SSO-protected services.
Help us keep SSO open and inclusive. Please read and follow our Code of Conduct.
Contributions to SSO are welcome! Please follow our contribution guideline.
Please file any issues you find in our issue tracker.
If you come across any security vulnerabilities with the SSO repo or software, please email security@buzzfeed.com. In your email, please request access to our bug bounty program so we can compensate you for any valid issues reported.
SSO is actively maintained by the BuzzFeed Infrastructure teams.