Skip to content

Commit

Permalink
Add in check for access monitoring rule version
Browse files Browse the repository at this point in the history
  • Loading branch information
EdwardDowling committed Apr 30, 2024
1 parent e985851 commit 2a28dd2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/services/access_monitoring_rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ func ValidateAccessMonitoringRule(accessMonitoringRule *accessmonitoringrulesv1.
if accessMonitoringRule.Metadata == nil {
return trace.BadParameter("accessMonitoringRule metadata is missing")
}
if accessMonitoringRule.Version != types.V1 {
return trace.BadParameter("accessMonitoringRule %q is not supported", accessMonitoringRule.Version)
}
if accessMonitoringRule.Spec == nil {
return trace.BadParameter("accessMonitoringRule spec is missing")
}
Expand Down

0 comments on commit 2a28dd2

Please sign in to comment.