Firewall policy in InitialPolicy-checkpoint-gaia,secureplatform

Firewall policy in InitialPolicy-checkpoint-gaia,secureplatform
0

Firewall policy in InitialPolicy-checkpoint-gaia,secureplatform

Vendor: checkpoint

OS: gaia,secureplatform

Description:
indeni will alert when a Check Point firewall is running with the InitialPolicy policy.

Remediation Steps:
Ensure a valid policy is installed.

How does this work?
An MD5 hash is calculated along with the policy name.

Why is this important?
If all members of a cluster do not have the same security policy installed, unexpected issues can arise after a failover.

Without Indeni how would you find this?
An administrator could login and manually check which policy is installed, and when it was installed, comparing between all cluster members.

chkp-policy-fingerprint-novsx

name: chkp-policy-fingerprint-novsx
description: Retrieve policy name and unique identifier
type: monitoring
monitoring_interval: 5 minutes
requires:
    vendor: checkpoint
    or:
    -   os.name: gaia
    -   os.name: secureplatform
    vsx:
        neq: true
    role-firewall: 'true'
comments:
    policy-installed-fingerprint:
        why: |
            If all members of a cluster do not have the same security policy installed, unexpected issues can arise after a failover.
        how: |
            An MD5 hash is calculated along with the policy name.
        without-indeni: |
            An administrator could login and manually check which policy is installed, and when it was installed, comparing between all cluster members.
        can-with-snmp: false
        can-with-syslog: false
        vendor-provided-management: This is only accessible from the command line
            interface.
steps:
-   run:
        type: SSH
        command: ${nice-path} -n 15 fw stat && ${nice-path} -n 15 md5sum $FWDIR/state/local/FW1/local.str
    parse:
        type: AWK
        file: policy-fingerprint-novsx.parser.1.awk

chkp_initial_policy_vsx

// Deprecation warning : Scala template-based rules are deprecated. Please use YAML format rules instead.

package com.indeni.server.rules.library.templatebased.checkpoint

import com.indeni.ruleengine.expressions.conditions.{Equals => RuleEquals, Not => RuleNot, Or => RuleOr}
import com.indeni.ruleengine.expressions.data.SnapshotExpression
import com.indeni.server.rules.RuleContext
import com.indeni.server.rules.library.templates.SingleSnapshotValueCheckTemplateRule
import com.indeni.server.rules.library.RuleHelper

/**
  *
  */
case class chkp_initial_policy_vsx() extends SingleSnapshotValueCheckTemplateRule(
  ruleName = "chkp_initial_policy_vsx",
  ruleFriendlyName = "Check Point Firewalls (VSX): Firewall policy in InitialPolicy",
  ruleDescription = "indeni will alert when a Check Point firewall is running with the InitialPolicy policy.",
  metricName = "policy-installed-fingerprint",
  applicableMetricTag = "vs.name",
  alertItemsHeader = "VS's in InitialPolicy",
  alertDescription = "It appears the firewall is in InitialPolicy. This may result in traffic disruption.",
  baseRemediationText = "Ensure a valid policy is installed.",
  complexCondition = RuleEquals(RuleHelper.createComplexStringConstantExpression("InitialPolicy"), SnapshotExpression("policy-installed-fingerprint").asSingle().mostRecent().value().noneable)
)()