-
Notifications
You must be signed in to change notification settings - Fork 40
feat(policy): implement policy eval #2611
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Sylwester Piskozub <sylwesterpiskozub@gmail.com>
Signed-off-by: Sylwester Piskozub <sylwesterpiskozub@gmail.com>
Signed-off-by: Sylwester Piskozub <sylwesterpiskozub@gmail.com>
migmartri
left a comment
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.
See inline comments, I am not sure why we need to move the evaluation server-side for this change cc/ @jiparis
| option go_package = "github.com/chainloop-dev/chainloop/app/controlplane/api/controlplane/v1;v1"; | ||
|
|
||
| service PolicyEvaluationService { | ||
| rpc Evaluate(PolicyEvaluationServiceEvaluateRequest) returns (PolicyEvaluationServiceEvaluateResponse); |
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.
is it possible that this PR contains too much information, including remote evaluations or smth like that?
| # default: true | ||
| # url: http://localhost:8002/v1 | ||
| # Policy providers configuration | ||
| policy_providers: |
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.
please keep it commented out
| } | ||
|
|
||
| // Call business layer to evaluate the policy | ||
| result, err := s.uc.Evaluate(ctx, &biz.PolicyEvaluationEvaluateOpts{ |
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.
why isn't the evaluation happening client side? Why did we move it server-side?
Summary
Introduces a new
chainloop policy evalcommand that evaluates policies using the control plane with organization settings, supporting both generic and material-based policy evaluation.Differences
--allowed-hostnames