Ensure partition is defaulted in authz

This commit is contained in:
freddygv 2021-09-16 14:36:57 -06:00
parent b5a8935bb8
commit cf56be7d8d
1 changed files with 2 additions and 2 deletions

View File

@ -18,7 +18,7 @@ func AuthorizeIntentionTarget(
switch matchType {
case structs.IntentionMatchDestination:
if ixn.DestinationPartition != targetAP {
if structs.PartitionOrDefault(ixn.DestinationPartition) != structs.PartitionOrDefault(targetAP) {
return false, false
}
@ -33,7 +33,7 @@ func AuthorizeIntentionTarget(
}
case structs.IntentionMatchSource:
if ixn.SourcePartition != targetAP {
if structs.PartitionOrDefault(ixn.SourcePartition) != structs.PartitionOrDefault(targetAP) {
return false, false
}