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

Document how to ban repositories in binderhub #848

Open
choldgraf opened this issue May 15, 2019 · 4 comments
Open

Document how to ban repositories in binderhub #848

choldgraf opened this issue May 15, 2019 · 4 comments

Comments

@choldgraf
Copy link
Member

choldgraf commented May 15, 2019

In a recent discourse thread someone asked how they could allow only one repository to run with binderhub. In answering, I realized that we don't document how to ban a repository. We should do so.

For reference, this is where we ban repos in mybinder.org:

https://github.com/jupyterhub/mybinder.org-deploy/blob/master/mybinder/values.yaml#L45

@sgibson91
Copy link
Member

To allow access to only one repo, update the config with the following:

config:
  GitHubRepoProvider:
    banned_specs:
      - ^(?!org\/repo).*$ 

where org and repo are the ones you want to allow.

@sgibson91
Copy link
Member

Is it possible, or do we want it to be possible, to ban repos from other providers? For example, I assume my snippet above won't affect GitLab, BitBucket, etc. providers?

@betatim
Copy link
Member

betatim commented May 20, 2019

Correct, this config only bans repositories for the GitHub provider. You'd have to add the same or similar config for all of the other providers.

I think already the providers are different enough that we can't set a global regular expression on the base class.

Maybe another good first contribution would be to add a whitelist in addition to the black list we have now. So you don't have to do the gymnastics of writing an "inverse" regular expression.

@meeseeksmachine
Copy link

This issue has been mentioned on Jupyter Community Forum. There might be relevant details there:

https://discourse.jupyter.org/t/building-a-the-littlest-binderhub/9824/4

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

No branches or pull requests

4 participants