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

Add key/value suffix for schema filtering on LITERAL ACL on v3 claim #328

Merged
merged 2 commits into from
Oct 3, 2023

Conversation

AlexisSouquiere
Copy link
Collaborator

We decided during the v3 endpoint creation to add the same filtering on schema than on topics (see here)

We figured out that a bug appears with LITERAL ACL because we will set the same pattern for "registry-read" role on these ACL (ex: "^\\Qproject.topic\\E$"). The filtering on schemas list searches literally for schema with the project.topic name which is incorrect because schemas will be named project.topic-key or project.topic-value

This PR fixes the issue by updating the pattern for patterns that do not contain .* (pattern for prefixed ACL). Then, literal pattern "^\\Qproject.topic\\E$" becomes "^\\Qproject.topic-\\E(key|value)$"

@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 2, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@loicgreffier loicgreffier added enhancement This issue or pull request improves a feature bug Something isn't working and removed enhancement This issue or pull request improves a feature labels Oct 3, 2023
@loicgreffier loicgreffier merged commit a1764e0 into master Oct 3, 2023
4 checks passed
@loicgreffier loicgreffier deleted the feat/v3-claim-registry-acl-literal branch October 3, 2023 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants