feat(github): Allow to configure which orgs/repos the github auth applies to#175
Merged
athornton merged 3 commits intodatopian:mainfrom Dec 13, 2024
Merged
feat(github): Allow to configure which orgs/repos the github auth applies to#175athornton merged 3 commits intodatopian:mainfrom
athornton merged 3 commits intodatopian:mainfrom
Conversation
This allows the operator to configure orgs (and repos) that are restricted to the GitHub authentication. Auth attempts for anything outside the list gets rejected.
Collaborator
Author
|
PR created as promised in #166 (comment). |
athornton
reviewed
Dec 12, 2024
| * `api_url` (`str` = `"https://api.github.com"`): Base URL for the GitHub API (enterprise servers have API at `"https://<custom-hostname>/api/v3/"`). | ||
| * `api_timeout` (`float | tuple[float, float]` = `(10.0, 20.0)`): Timeout for the GitHub API calls ([details](https://requests.readthedocs.io/en/stable/user/advanced/#timeouts)). | ||
| * `api_version` (`str | None` = `"2022-11-28"`): Target GitHub API version; set to `None` to use GitHub's latest (rather experimental). | ||
| * `restrict_to` (`dict[str, list[str] | None] | None` = `None`): Optional (but very recommended) dictionary of GitHub organizations/users the authentication is restricted to. Each key (organization name) in the dictionary can contain a list of further restricted repository names. When the list is empty (or null), only the organizations are considered. |
Collaborator
There was a problem hiding this comment.
I'd say "highly recommended" rather than "very recommended" but honestly everyone will know what it means.
Collaborator
Author
There was a problem hiding this comment.
Done, thanks for correcting my Czenglish! I can't appreciate this enough :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is done via a configuration item
restrict_to, which is a dict of Github orgs, potentially containing a list of repos.Closes: #166