Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access Control Improvements: Embargo + ACL User Support #642

Merged
merged 5 commits into from
May 19, 2021
Merged

Conversation

ikreymer
Copy link
Member

@ikreymer ikreymer commented May 18, 2021

Description

This PR adds an embargo system on top of the access control system, allowing blocking of all URLs based on capture date.
The embargo supports blocking:

  • captures before or after specific date
  • captures older or newer than a specific time interval (in years, months, weeks and/or days)

When combined with ACL rules, the embargo takes precedence, unless the allow_ignore_embargo rule is used.

The PR also adds an optional user field to the ACL system, allowing specific matches by user, passed to pywb via the X-pywb-ACL-user header.

Version bump to 2.6.0b0

Motivation and Context

Support for embargo system and custom -user based auth as part of work for:
https://netpreserve.org/projects/pywb/

Docs: Initial pass on updated docs for Embargo + ACL system.

Screenshots (if appropriate):

Types of changes

  • Replay fix (fixes a replay specific issue)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added or updated tests to cover my changes.
  • All new and existing tests passed.

ikreymer added 5 commits May 5, 2021 19:37
…go options of 'before', 'after', 'newer' and 'older'

'before' and 'after' accept a timestamp
'newer' and 'older' options configured with a dictionary consisting of any combo of 'years', 'months', 'days'
add basic test for each embargo option
- support acl access value 'allow_ignore_embargo' for overriding embargo
- support 'user' in acl setting, matched with value of 'X-Pywb-ACL-User' header
- support passing through 'X-Pywb-ACL-User' setting to warcserver
- aclmanager: support -u/--user param for adding, removing and matching rules
- tests: add test for 'allow_ignore_embargo', user-specific acl rule matching
…usage page.

sample-deploy: add examples of configuring X-pywb-ACL-user header based on IP for nginx and apache sample deployments
@ikreymer ikreymer merged commit f07d357 into main May 19, 2021
@ikreymer ikreymer deleted the embargo branch June 9, 2021 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant