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

Add security hooks #3

Open
Malvolio opened this issue Apr 19, 2019 · 0 comments
Open

Add security hooks #3

Malvolio opened this issue Apr 19, 2019 · 0 comments

Comments

@Malvolio
Copy link
Collaborator

Right now, the code assumes that everything under the "root" given your repo is supposed to be entirely public, every version of every file. Obviously, this isn't the case universally.

Instead, the config should also take two optional lambdas:

  1. reference verifier: when a file is requested by tag or branch, this
    function will be called with the tag or branch name as an
    argument. If the function returns None, the request will be
    honored. If it returns a number, the request will be declined with
    that number as the status code (I expect 404 or 403 will be the
    usual status).
  2. path verifier: whenever a file is requested (except through a
    blob-id), this function will be called with the path. The return
    will be interpreted as above.
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

No branches or pull requests

2 participants
@Malvolio and others