-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
feat: add ability to delegate authorization to external sources #4864
feat: add ability to delegate authorization to external sources #4864
Conversation
d8bac16
to
2a0615d
Compare
Hi @nickking-brt please add docs, as many tests you can and an example in here of how that would work to understand the user flow. |
Hi @jamengual, I've added some tests and documentation with some examples. Please let me know if more is needed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we followup adding some token comment, this would be some breaking change (as it broke the CI right now)
{"level":"error","ts":"2024-09-03T22:40:26.913Z","caller":"events/command_runner.go:161","msg":"Unable to fetch user teams: Your token has not been granted the required scopes to execute this query. The 'name' field requires one of the following scopes: ['read:org', 'read:discussion'], but your token has only been granted the: ['admin:repo_hook', 'repo'] scopes. Please modify your token's scopes at: https://github.com/settings/tokens.","json":{},"stacktrace":"github.com/runatlantis/atlantis/server/events.(*DefaultCommandRunner).RunAutoplanCommand\n\t/home/runner/work/atlantis/atlantis/server/events/command_runner.go:161"}
It looks like my change caused user team lookups to always happen, instead of being conditional. I'm working on a fix now to revert that behavior. |
Thanks Nick. |
…tlantis#4864) Signed-off-by: a1k0u <[email protected]>
what
This change allows administrators to delegate command authorization checks to an external command, in place of a Github team check.
why
This change allows Atlantis installation admins to write custom logic for authorization, without needing to modify Atlantis code. This allows for easier and more flexible integrations with team workflows and business requirements.