-
Notifications
You must be signed in to change notification settings - Fork 4
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
[Azure] Checking allow rules for GetPermitList #494
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: J-467 <[email protected]>
1696a70
to
2cf6856
Compare
Signed-off-by: J-467 <[email protected]> Signed-off-by: J-467 <[email protected]> Signed-off-by: J-467 <[email protected]>
2cf6856
to
c6c5abe
Compare
@smcclure20 If you could check this out, that'll be great |
Signed-off-by: J-467 <[email protected]>
pkg/azure/plugin.go
Outdated
@@ -90,7 +89,8 @@ func (s *azurePluginServer) GetPermitList(ctx context.Context, req *paragliderpb | |||
|
|||
// get the NSG rules | |||
for _, rule := range nsg.Properties.SecurityRules { | |||
if !strings.HasPrefix(*rule.Name, denyAllNsgRulePrefix) && strings.HasPrefix(*rule.Name, paragliderPrefix) { | |||
// Ignore default Azure rules with priority above maxPriority | |||
if *rule.Properties.Access == allowRule && *rule.Properties.Priority <= maxPriority { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There shouldn't be any deny rules, right? So is the first part of this check even necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's the deny-all rule for inbound and outbound rules
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing the <= maxPriority because Rules doesn't contain the default Azure rules, so no need for that
Signed-off-by: Julian Tweneboa Kodua <[email protected]> Signed-off-by: Julian Tweneboa Kodua <[email protected]>
9fc418e
to
61f2a96
Compare
GetPermitList
checks if a rule is an allow rule before converting to Permit List