Skip to content

RFC 6750 OAuth 2.0 Authorization Framework: Bearer Token Usage#30

Open
yadij wants to merge 2 commits intosquid-cache:masterfrom
yadij:auth-bearer
Open

RFC 6750 OAuth 2.0 Authorization Framework: Bearer Token Usage#30
yadij wants to merge 2 commits intosquid-cache:masterfrom
yadij:auth-bearer

Conversation

@yadij
Copy link
Contributor

@yadij yadij commented Jul 24, 2017

Adds a minimal implementation of Bearer authentication scheme to
Squid. It consists of three components:

  1. Squid build system infrastructure for building Bearer
    authentication module and helpers.

  2. Bearer authentication library ("module") for Squid.

  • implements the logics for squid.conf "Bearer" auth_param
    scheme and necessary configuration options.

  • implements the helper management and API for Bearer helpers.

  • implements logics for www-auth and proxy-auth header parsing
    and generating.

  1. An authentication helper which takes Bearer tokens needs to
    be implemented. No helpers are provided in this update.

At present no restriction between HTTP and HTTPS is defined by
Squid. Challenges will be made for both. Admin can configure
the protocol restriction on scheme challenges using auth_schemes
directive. Otherwise it is left to the client to ensure adequate
security on the connection it sends Bearer tokens.

  • implements helper driven TTL for token caching.

Due to significant security risks with Bearer tokens the TTL is
not configurable from squid.conf. Instead the helper is expected
to provide a ttl= parameter from the auth backend explicitly
determining the time in seconds for which each response may be
cached and re-used. In absence of ttl= value the helper response
is treated as already expired (a nonce).

  • uses a default token scope of "proxy:HTTP" for generic HTTP
    proxies

NOTES:

  • At present no web browsers implement Bearer authentication in
    response to a proxy-authenticate challenges. However some of
    the common browsers should support Bearer with reverse
    proxies over HTTPS (Firefox and IE apparently, not Chrome).

    • command line tools and AJAX / XHR implementations which
      allow header customization can be scripted to support
      Bearer.
  • This is only a minimal implementation, emitting only the
    realm= and scope= parameters to clients.

    • The key_extras mechanism can be used to pass extension
      client request parameters to the Bearer helper.
    • Extension parameters in Squid responses is not supported.
  • Bearer authentication to cache_peers is not supported
    explicitly.

    • implicit support exists with login=PASSTHRU, which may be
      used to relay Bearer tokens for SSO to multiple proxies.

rousskov

This comment was marked as resolved.

rousskov

This comment was marked as outdated.

@rousskov rousskov added the S-waiting-for-author author action is expected (and usually required) label Aug 10, 2017
@yadij yadij force-pushed the auth-bearer branch 2 times, most recently from c724a50 to 98c0381 Compare August 24, 2017 03:42
@rousskov

This comment was marked as off-topic.

@squid-anubis squid-anubis added the M-failed-description https://github.com/measurement-factory/anubis#pull-request-labels label Feb 5, 2018
@squid-anubis squid-anubis removed the M-failed-description https://github.com/measurement-factory/anubis#pull-request-labels label May 11, 2018
@yadij yadij force-pushed the auth-bearer branch 2 times, most recently from 8d98678 to cbf18cb Compare July 16, 2018 11:39
@yadij

This comment was marked as resolved.

@yadij yadij added S-waiting-for-reviewer ready for review: Set this when requesting a (re)review using GitHub PR Reviewers box and removed S-waiting-for-author author action is expected (and usually required) labels Jul 17, 2018
@squid-anubis squid-anubis added M-failed-other https://github.com/measurement-factory/anubis#pull-request-labels and removed M-failed-other https://github.com/measurement-factory/anubis#pull-request-labels labels Feb 8, 2023
@squid-anubis squid-anubis added M-failed-other https://github.com/measurement-factory/anubis#pull-request-labels and removed M-failed-other https://github.com/measurement-factory/anubis#pull-request-labels labels Mar 27, 2023
@squid-anubis squid-anubis added M-failed-other https://github.com/measurement-factory/anubis#pull-request-labels and removed M-failed-other https://github.com/measurement-factory/anubis#pull-request-labels labels Jun 1, 2023
@squid-anubis squid-anubis added M-failed-other https://github.com/measurement-factory/anubis#pull-request-labels and removed M-failed-other https://github.com/measurement-factory/anubis#pull-request-labels labels Jul 12, 2023
@squid-anubis squid-anubis added M-failed-other https://github.com/measurement-factory/anubis#pull-request-labels and removed M-failed-other https://github.com/measurement-factory/anubis#pull-request-labels labels Jan 9, 2024
@yadij yadij force-pushed the auth-bearer branch 2 times, most recently from a215e6b to 418f420 Compare February 1, 2024 18:49
@yadij
Copy link
Contributor Author

yadij commented Feb 1, 2024

Status update: The branch has been updated, based on latest v7. It builds.

TODO:

  • testing that it works as intended.

@kinkie kinkie added the M-ignored-by-merge-bots https://github.com/measurement-factory/anubis/blob/master/README.md#pull-request-labels label Feb 3, 2024
@yadij yadij added S-waiting-for-PR Closure of other PR(s), current or future, is expected (and usually required) and removed S-waiting-for-author author action is expected (and usually required) labels Feb 4, 2024
@a76yyyy

This comment was marked as outdated.

@rousskov

This comment was marked as outdated.

@rousskov rousskov removed the M-ignored-by-merge-bots https://github.com/measurement-factory/anubis/blob/master/README.md#pull-request-labels label May 21, 2024
@squid-anubis squid-anubis added M-failed-other https://github.com/measurement-factory/anubis#pull-request-labels and removed M-failed-other https://github.com/measurement-factory/anubis#pull-request-labels labels Jul 18, 2024
@squid-anubis squid-anubis added M-failed-other https://github.com/measurement-factory/anubis#pull-request-labels and removed M-failed-other https://github.com/measurement-factory/anubis#pull-request-labels labels Oct 31, 2024
@kinkie kinkie added the M-ignored-by-merge-bots https://github.com/measurement-factory/anubis/blob/master/README.md#pull-request-labels label Nov 1, 2024
@yadij
Copy link
Contributor Author

yadij commented Jan 31, 2025

This PR is blocked on PR #774 as mentioned in #30 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature maintainer needs documentation updates for merge M-ignored-by-merge-bots https://github.com/measurement-factory/anubis/blob/master/README.md#pull-request-labels S-waiting-for-PR Closure of other PR(s), current or future, is expected (and usually required)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants