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

Explainability with hcs #477

Merged
merged 205 commits into from
Jul 5, 2023
Merged

Explainability with hcs #477

merged 205 commits into from
Jul 5, 2023

Conversation

shmfr
Copy link
Collaborator

@shmfr shmfr commented Apr 13, 2023

No description provided.

…ubeSet) holding all connections including src_peers, dst_peers and protocols

Signed-off-by: Tanya <[email protected]>
Added optimized_denied_ingress_props
and optimized_denied_egress_props (in addition to allowed ones).
Improved non_captured_conns computation

Signed-off-by: Tanya <[email protected]>
Signed-off-by: Tanya <[email protected]>
…_HC_set

# Conflicts:
#	nca/CoreDS/CanonicalHyperCubeSet.py
Signed-off-by: Tanya <[email protected]>

Signed-off-by: Tanya <[email protected]>
Signed-off-by: Tanya <[email protected]>

Signed-off-by: Tanya <[email protected]>
Fixed protocol handling: 0 is a valid protocol number (HOPOPT).
Allowing any protocol in the range [0...255], though ProtocolNameResolver does not contain names of all of the possible 256 protocols.
Fixed handling non-captured peers in K8S (cannot be handled as denied).

Signed-off-by: Tanya <[email protected]>
…r dst_peers dimensions is all values).

Added optimization for fw_rules_map - join different entries having the same values (fw_rules).

Signed-off-by: Tanya <[email protected]>
1. To represent No connections, do not build TcpLikeProperties (TcpLikeProperties with no dimensions represent All connections).
2. Support subsets in query in optimized solution.
3. For comparison of optimized solution to the original one, add connections from peers to themselves.
4. More accurate comparison for 'dot' connectivity queries.
5. Generalized convert_named_ports (to not assume dimensions order)
6. Handling the possibility when projection on one dimension is empty.

Signed-off-by: Tanya <[email protected]>
Properly handling HostEPs in optimized TcpLikeProperties.

Signed-off-by: Tanya <[email protected]>
…perties)

Fixed handling of non-captured pods in optimized solution.
Added using True/False HC_set (make_all_properties()/make_empty_properties())

Signed-off-by: Tanya <[email protected]>
'false' - only original run
'true' - only optimized run
'debug'- both runs and comparison of their results.

Printing parsing time, queries time and total run time.

Signed-off-by: Tanya <[email protected]>
Workaround for the bug in HC set: using mutual contained_in, instead of ==

Signed-off-by: Tanya <[email protected]>
Signed-off-by: Tanya <[email protected]>
…for -opt=debug option)

Added more debug prints.
Better handling of peer_set copying in TcpLikeProperties.

Signed-off-by: Tanya <[email protected]>
Further optimization - calculating ref_ip_blocks only in non-optimized run.

Signed-off-by: Tanya <[email protected]>
shmfr added 4 commits June 7, 2023 21:01
Signed-off-by: Shmulik Froimovich <[email protected]>
Signed-off-by: Shmulik Froimovich <[email protected]>
Signed-off-by: Shmulik Froimovich <[email protected]>
@shmfr
Copy link
Collaborator Author

shmfr commented Jun 8, 2023

output comments: for ip-block as src or dst - no need to add policy configurations or resources configurations.

Done - "ipblocks had no configurations" explanation now replace the explanation for Ipblocks.

Test run issue: when running with explain: ALL and without -opt=true , nca crashes in explain_all function, though I would expect this function should not be called.

I could not re-create the crash. Perhaps was tested on an older version? the current version protects this case.

Signed-off-by: Shmulik Froimovich <[email protected]>
Signed-off-by: Shmulik Froimovich <[email protected]>
Signed-off-by: Shmulik Froimovich <[email protected]>
Signed-off-by: Shmulik Froimovich <[email protected]>
Signed-off-by: Shmulik Froimovich <[email protected]>
Signed-off-by: Shmulik Froimovich <[email protected]>
Signed-off-by: Shmulik Froimovich <[email protected]>
@shmfr shmfr requested a review from adisos June 22, 2023 12:59
docs/SchemeFileFormat.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
docs/SchemeFileFormat.md Outdated Show resolved Hide resolved
shmfr added 10 commits June 26, 2023 18:33
Signed-off-by: Shmulik Froimovich <[email protected]>
Signed-off-by: Shmulik Froimovich <[email protected]>
Signed-off-by: Shmulik Froimovich <[email protected]>
Signed-off-by: Shmulik Froimovich <[email protected]>
Signed-off-by: Shmulik Froimovich <[email protected]>
Signed-off-by: Shmulik Froimovich <[email protected]>
Signed-off-by: Shmulik Froimovich <[email protected]>
Signed-off-by: Shmulik Froimovich <[email protected]>
@shmfr shmfr merged commit 7335253 into master Jul 5, 2023
@shmfr shmfr deleted the explainability_with_HCS branch July 6, 2023 06:40
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