0.02
No commit activity in last 3 years
No release in over 3 years
There's a lot of open issues
Auth backend for use with nginx to protect applications with Okta SAML
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

= 0.10.3
= 3.3.0
= 10.4.2
= 3.2.0
= 0.10.0

Runtime

= 1.3.1
= 1.4.7
= 1.6.4
>= 0.19.1
 Project Readme

Okta Auth Proxy

The idea is that you run this along-side an nginx instance, and it'll handle authentication for you for an application or page that doesn't understand SAML or okta.

Configuration

Set the following environment variables

  • SSO_TARGET_URL: the target url specified in okta
  • SSO_ISSUER: the accepted audience in okta
  • PROXY_TARGET: the address of the target application you are authing for
  • CERT_PATH: Path to the certificate provided by Okta
  • COOKIE_SECRET: a secure random secret for the cookie
  • COOKIE_DOMAIN: The domain to use for the cookie

If okta authentication succeeds, a cookie will be created and stored for the session. All requests are proxied through proxy target if authentication succeeds.

The proxy target should be set as an internal server in nginx, so that it can only be accessed through a local referral. See the example nginx configuration provided

The following variables are optional:

  • AUTH_DOMAIN: the local address of this authentication app (change if not 'localhost')
  • COOKIE_SECRET: a random secret will be generated at runtime if this is not set. If you need to avoid reauthenticating each time okta-auth-proxy is restarted for some reason, set this to a fixed value.
  • DEBUG: set this to anything to debug logging

Note: Ensure the protocol in okta matches the protocol of your app (http/https)

export SSO_TARGET_URL=https://company.okta.com/app/company_project_1/hXk5d47tkNkB0x7/sso/saml
export AUTH_DOMAIN=http://localhost:3311
export PROXY_TARGET=http://127.0.0.1:7000
bundle exec okta-auth-proxy serve

Credits

This was inspired by smashing the ideas from projects together: