Skip to content

Conversation

@Imat00
Copy link
Contributor

@Imat00 Imat00 commented Oct 24, 2025

  • add crosstable rule_destination_to_zone and rule_source_to_zone
  • add FKs for both to rule and zone
  • update upgrade script 9.0
  • update permissions + permissions for management and some rule_* tables

management - role reporter - select - add mgm_uid

rule - recertifier - select - add is_global and rulebase_id
rule - modeller - select - add is_global and rulebase_id

rule_from/rule_to - middleware - seelct - add cl_from_relevant_for_tenant
rule_service and more add removed in select for filtered roles

changelog_rule add cl_rule_relevant_for_tenant in select for filtered roles

@tpurschke
Copy link
Contributor

@Imat00 sorry I also had to add some permissions - could you please resolve the resulting conflicts in your branch?
Feel free to reach out to me for any questions.

@Imat00
Copy link
Contributor Author

Imat00 commented Oct 27, 2025

@Imat00 sorry I also had to add some permissions - could you please resolve the resulting conflicts in your branch? Feel free to reach out to me for any questions.

should be done

@tpurschke
Copy link
Contributor

@Imat00 there seems to be an issue with the metadata file (test import job fails)

@Imat00
Copy link
Contributor Author

Imat00 commented Oct 27, 2025

@Imat00 there seems to be an issue with the metadata file (test import job fails)

Yes, currently working on it

@tpurschke tpurschke marked this pull request as draft October 27, 2025 11:37
@Imat00
Copy link
Contributor Author

Imat00 commented Oct 27, 2025

Finally!
I think we should still check Permissions again.

@Imat00 Imat00 marked this pull request as ready for review October 27, 2025 13:43
Imat00 and others added 7 commits October 28, 2025 14:16
Kept incoming changes from remote and renamed local methods for clarity:
- DisplayDestinationZones() (was DisplayDestinationZone() before)
- DisplaySourceZones() (was DisplaySourceZone() before)
fixed: warnings
…e zones

- changed GraphQL fragments for rule zones
- renamed normalized rule fields from *zone to *zones
- updated export tests for rules with multiple zones
- RuleSourceZones and RuleDestinationZones changed to ZoneWrapper[]
- ZoneWrapper wraps NetworkZone for GraphQL data exchange
- Updated display and comparison logic to handle wrapped zones
@Imat00 Imat00 requested a review from Y4nnikH November 11, 2025 10:13
@Y4nnikH
Copy link
Contributor

Y4nnikH commented Nov 12, 2025

I added the necessary changes in the importer and middleware to correctly handle multiple zones per rule source/destination. And I renamed the new tables to make it more consistent with existing similar tables.
We will add my changes into this branch before we merge the pr.

One note / inconsistency regarding the new tables: We now have a situation where we link to the crosstable rule_from_zone, like with rule_from via ids, but we do not write the zones directly into the rule as a string, like we do with rule_src. (same with rule_to_zone). This has the benefit, that we do not get a new rule version whenever the zones change. only the crosstable changes. But it would be more consistent if we also wrote the zones as string to each rule entry (or the other way around, remove the rule_src/dst/svc etc fields from the rule)

@sonarqubecloud
Copy link

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