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

Allow configuration of per-provider publishers policy #2526

Merged
merged 2 commits into from
Feb 20, 2024

Conversation

gammazero
Copy link
Collaborator

@gammazero gammazero commented Feb 20, 2024

This allows each provider to have its own policy for which publishers are allowed to publish advertisements on behalf of that provider. The previous publisher policy serves as the default when there is no policy configured for a specific provider.

This allows each provider to have its own policy for which publishers are allowed to publish advertisements on behalf of that provider. The previous publisher policy serves as the default policy when there is no policy configured for a specific provider.
@gammazero gammazero requested a review from masih February 20, 2024 03:11
@codecov-commenter
Copy link

codecov-commenter commented Feb 20, 2024

Codecov Report

Attention: 11 lines in your changes are missing coverage. Please review.

Comparison is base (e7299f0) 44.68% compared to head (02024c8) 44.81%.
Report is 1 commits behind head on main.

Files Patch % Lines
internal/registry/policy/policy.go 62.06% 8 Missing and 3 partials ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2526      +/-   ##
==========================================
+ Coverage   44.68%   44.81%   +0.12%     
==========================================
  Files          87       87              
  Lines       11007    11031      +24     
==========================================
+ Hits         4919     4943      +24     
+ Misses       5497     5494       -3     
- Partials      591      594       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@gammazero
Copy link
Collaborator Author

gammazero commented Feb 20, 2024

Note: This leaves the default publisher policy config (Discovery.Policy.Publish = true) to allow any peer to publish/sign advertisements for a provider that does not have its own specific publisher policy. If we want to make the default behavior to block any publisher (with peerID different from provider), that is not explicitly allowed, then this should be changed to false.

@gammazero gammazero merged commit e2e3e62 into main Feb 20, 2024
7 of 9 checks passed
@gammazero gammazero deleted the publishers-per-provider branch February 20, 2024 18:26
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

Successfully merging this pull request may close these issues.

3 participants