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

Allow for catch-all wildcard *, in ACLs #881

Closed
tw4l opened this issue Feb 13, 2024 · 3 comments · Fixed by #882
Closed

Allow for catch-all wildcard *, in ACLs #881

tw4l opened this issue Feb 13, 2024 · 3 comments · Fixed by #882
Assignees

Comments

@tw4l
Copy link
Member

tw4l commented Feb 13, 2024

Is your feature request related to a problem? Please describe.

Currently, if a user wants to set default_access: block but allow particular users to have access to any URL, there is no way to do this other than enumerating all of the possible TLDs in their collection in an ACLJ file, e.g.:

com, - {"access": "allow", "user": "staff"}
org, - {"access": "allow", "user": "staff"}
...

Describe the solution you'd like

I'd like a user to be able to specify an ACL rule matching any possible URL, with the following syntax:

*, - {"access": "allow", "user": "staff"}

Describe alternatives you've considered

  • Requiring users to list all TLDs (cumbersome)
  • Simply using * rather than *, as the key to match any URL (doesn't match existing syntax)

Additional context

This originally came in as a user request on IIPC Slack.

@ptrourke
Copy link

ptrourke commented Mar 12, 2024

Testing this version, my podman container is failing, and I'm seeing this error:

*** Operational MODE: async ***
mounting /pywb/pywb/apps/wayback.py on /playback-services
Traceback (most recent call last):
  File "/pywb/pywb/apps/wayback.py", line 1, in <module>
    from gevent.monkey import patch_all; patch_all()
  File "/usr/local/lib/python3.8/site-packages/gevent/__init__.py", line 86, in <module>
    from gevent._hub_local import get_hub
  File "/usr/local/lib/python3.8/site-packages/gevent/_hub_local.py", line 101, in <module>
    import_c_accel(globals(), 'gevent.__hub_local')
  File "/usr/local/lib/python3.8/site-packages/gevent/_util.py", line 148, in import_c_accel
    mod = importlib.import_module(cname)
  File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "src/gevent/_hub_local.py", line 1, in init gevent._gevent_c_hub_local
ValueError: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 152 from C header, got 40 from PyObject

(playback-services is the name of our deployment for PyWB-based playback)

This seems to be a version of this error?
python-greenlet/greenlet#178

Reverting to 2.7.4 has resolved the issue.

@tw4l
Copy link
Member Author

tw4l commented Mar 14, 2024

Thanks for pointing this out @ptrourke ! We'll be turning our attention to pywb issues in the next sprint and should be able to resolve this and the failing tests on main then.

@tw4l
Copy link
Member Author

tw4l commented Mar 29, 2024

Hi @ptrourke, looks like this was due to the incorrect version of greenlet being used with gevent - there were a number of dependencies that needed updating that are getting resolved in #839, once that's merged into main and we rebase this branch you shouldn't run into that issue anymore and the tests should be good again.

@tw4l tw4l closed this as completed in #882 Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done!
Development

Successfully merging a pull request may close this issue.

2 participants