github oauth2-proxy/oauth2-proxy v7.0.0

latest releases: v7.6.0, v7.5.1, v7.5.0...
3 years ago

Release Highlights

  • Major internal improvements to provider interfaces
  • Added group authorization support
  • Improved support for external auth for Traefik
  • Introduced alpha configuration format to allow users to trial new configuration format and alpha features
  • GitLab provider now supports restricting to members of a project
  • Keycloak provider now supports restricting users to members of a set of groups
  • (Alpha) Flexible header configuration allowing user defined mapping of session claims to header values

Important Notes

  • GHSA-4mf2-f3wh-gvf2 The whitelist domain feature has been updated to fix a vulnerability that was identified, please see the linked advisory for details
  • #964 Redirect URL generation will attempt secondary strategies
    in the priority chain if any fail the IsValidRedirect security check. Previously any failures fell back to /.
  • #953 Keycloak will now use --profile-url if set for the userinfo endpoint
    instead of --validate-url. --validate-url will still work for backwards compatibility.
  • #957 To use X-Forwarded-{Proto,Host,Uri} on redirect detection, --reverse-proxy must be true.
  • #936 --user-id-claim option is deprecated and replaced by --oidc-email-claim
  • #630 Gitlab projects needs a Gitlab application with the extra read_api enabled
  • #849 /oauth2/auth allowed_groups querystring parameter can be paired with the allowed-groups configuration option.
    • The allowed_groups querystring parameter can specify multiple comma delimited groups.
    • In this scenario, the user must have a group (from their multiple groups) present in both lists to not get a 401 or 403 response code.
    • Example:
      • OAuth2-Proxy globally sets the allowed_groups as engineering.
      • An application using Kubernetes ingress uses the /oauth2/auth endpoint with allowed_groups querystring set to backend.
      • A user must have a session with the groups ["engineering", "backend"] to pass authorization.
      • Another user with the groups ["engineering", "frontend"] would fail the querystring authorization portion.
  • #905 Existing sessions from v6.0.0 or earlier are no longer valid. They will trigger a reauthentication.
  • #826 skip-auth-strip-headers now applies to all requests, not just those where authentication would be skipped.
  • #797 The behavior of the Google provider Groups restriction changes with this
    • Either --google-group or the new --allowed-group will work for Google now (--google-group will be used if both are set)
    • Group membership lists will be passed to the backend with the X-Forwarded-Groups header
    • If you change the list of allowed groups, existing sessions that now don't have a valid group will be logged out immediately.
      • Previously, group membership was only checked on session creation and refresh.
  • #789 --skip-auth-route is (almost) backwards compatible with --skip-auth-regex
    • We are marking --skip-auth-regex as DEPRECATED and will remove it in the next major version.
    • If your regex contains an = and you want it for all methods, you will need to add a leading = (this is the area where --skip-auth-regex doesn't port perfectly)
  • #575 Sessions from v5.1.1 or earlier will no longer validate since they were not signed with SHA1.
    • Sessions from v6.0.0 or later had a graceful conversion to SHA256 that resulted in no reauthentication
    • Upgrading from v5.1.1 or earlier will result in a reauthentication
  • #616 Ensure you have configured oauth2-proxy to use the groups scope.
    • The user may be logged out initially as they may not currently have the groups claim however after going back through login process wil be authenticated.
  • #839 Enables complex data structures for group claim entries, which are output as Json by default.

Breaking Changes

  • #964 --reverse-proxy must be true to trust X-Forwarded-* headers as canonical.
    These are used throughout the application in redirect URLs, cookie domains and host logging logic. These are the headers:
    • X-Forwarded-Proto instead of req.URL.Scheme
    • X-Forwarded-Host instead of req.Host
    • X-Forwarded-Uri instead of req.URL.RequestURI()
  • #953 In config files & envvar configs, keycloak_group is now the plural keycloak_groups.
    Flag configs are still --keycloak-group but it can be passed multiple times.
  • #911 Specifying a non-existent provider will cause OAuth2-Proxy to fail on startup instead of defaulting to "google".
  • #797 Security changes to Google provider group authorization flow
    • If you change the list of allowed groups, existing sessions that now don't have a valid group will be logged out immediately.
      • Previously, group membership was only checked on session creation and refresh.
  • #722 When a Redis session store is configured, OAuth2-Proxy will fail to start up unless connection and health checks to Redis pass
  • #800 Fix import path for v7. The import path has changed to support the go get installation.
    • You can now go get github.com/oauth2-proxy/oauth2-proxy/v7 to get the latest v7 version of OAuth2 Proxy
    • Import paths for package are now under v7, eg github.com/oauth2-proxy/oauth2-proxy/v7/pkg/<module>
  • #753 A bug in the Azure provider prevented it from properly passing the configured protected --resource
    via the login url. If this option was used in the past, behavior will change with this release as it will
    affect the tokens returned by Azure. In the past, the tokens were always for https://graph.microsoft.com (the default)
    and will now be for the configured resource (if it exists, otherwise it will run into errors)
  • #754 The Azure provider now has token refresh functionality implemented. This means that there won't
    be any redirects in the browser anymore when tokens expire, but instead a token refresh is initiated
    in the background, which leads to new tokens being returned in the cookies.
    • Please note that --cookie-refresh must be 0 (the default) or equal to the token lifespan configured in Azure AD to make
      Azure token refresh reliable. Setting this value to 0 means that it relies on the provider implementation
      to decide if a refresh is required.

Changes since v6.1.1

Don't miss a new oauth2-proxy release

NewReleases is sending notifications on new releases.