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

feat: security hardening guide #2150

Merged
merged 9 commits into from
Jun 30, 2023
2 changes: 2 additions & 0 deletions cmd/collectors/rest/plugins/certificate/certificate.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ func (my *Certificate) setCertificateIssuerType(instance *matrix.Instance) {
// Any verification exception means it is not signed with the give key. i.e. not self-signed
instance.SetLabel("certificateIssuerType", "ca_signed")
}
} else {
instance.SetLabel("certificateIssuerType", "ca_signed")
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ func (s *SecurityAccount) Run(dataMap map[string]*matrix.Matrix) ([]*matrix.Matr
)

data := dataMap[s.Object]

href := rest.BuildHref("", "applications", nil, "", "", "", "", s.query)

if result, err = collectors.InvokeRestCall(s.client, href, s.Logger); err != nil {
Expand Down Expand Up @@ -91,7 +90,7 @@ func (s *SecurityAccount) Run(dataMap map[string]*matrix.Matrix) ([]*matrix.Matr
}
}

securityAccountKey := username + svm
securityAccountKey := svm + username
if securityAccountInstance := data.GetInstance(securityAccountKey); securityAccountInstance != nil {
securityAccountInstance.SetExportable(false)

Expand Down
2 changes: 2 additions & 0 deletions cmd/collectors/zapi/plugins/certificate/certificate.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ func (my *Certificate) setCertificateIssuerType(instance *matrix.Instance, certi
// Any verification exception means it is not signed with the give key. i.e. not self-signed
instance.SetLabel("certificateIssuerType", "ca_signed")
}
} else {
instance.SetLabel("certificateIssuerType", "ca_signed")
}
}
}
Expand Down
1 change: 0 additions & 1 deletion cmd/tools/grafana/dashboard_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,6 @@ func checkTopKRange(t *testing.T, path string, data []byte) {
func TestOnlyHighlightsExpanded(t *testing.T) {
exceptions := map[string]int{
"cmode/shelf.json": 2,
"cmode/security.json": 3,
"cmode/fsa.json": 2,
"cmode/workload.json": 2,
"cmode/smb.json": 2,
Expand Down
51 changes: 33 additions & 18 deletions grafana/dashboards/cmode/compliance.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,32 @@
}
],
"panels": [
{
"datasource": "${DS_PROMETHEUS}",
"description": "",
"gridPos": {
"h": 2,
"w": 24,
"x": 0,
"y": 0
},
"id": 174,
"options": {
"content": "View ONTAP Security Hardening Guide https://www.netapp.com/media/10674-tr4569.pdf for more details.",
"mode": "markdown"
},
"pluginVersion": "8.1.8",
"title": "Important Information about Compliance dashboard",
"type": "text"
},
{
"collapsed": true,
"datasource": "${DS_PROMETHEUS}",
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 0
"y": 2
},
"id": 152,
"panels": [
Expand Down Expand Up @@ -177,7 +195,7 @@
"h": 3,
"w": 16,
"x": 0,
"y": 1
"y": 3
},
"id": 161,
"options": {
Expand Down Expand Up @@ -350,7 +368,7 @@
"h": 3,
"w": 4,
"x": 16,
"y": 1
"y": 3
},
"id": 166,
"links": [],
Expand Down Expand Up @@ -458,7 +476,7 @@
"h": 3,
"w": 4,
"x": 20,
"y": 1
"y": 3
},
"id": 167,
"links": [],
Expand Down Expand Up @@ -1343,7 +1361,7 @@
"h": 8,
"w": 24,
"x": 0,
"y": 4
"y": 6
},
"id": 170,
"options": {
Expand Down Expand Up @@ -1440,7 +1458,7 @@
},
{
"exemplar": false,
"expr": "count by (datacenter, cluster) (security_account_localuser{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"})",
"expr": "sum by (datacenter, cluster) (security_account_localuser{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"})",
"format": "table",
"hide": false,
"instant": true,
Expand All @@ -1450,7 +1468,7 @@
},
{
"exemplar": false,
"expr": "count by (datacenter, cluster) (security_account_samluser{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"})",
"expr": "sum by (datacenter, cluster) (security_account_samluser{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"})",
"format": "table",
"hide": false,
"instant": true,
Expand All @@ -1460,7 +1478,7 @@
},
{
"exemplar": false,
"expr": "count by (datacenter, cluster) (security_account_activediruser{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"})",
"expr": "sum by (datacenter, cluster) (security_account_activediruser{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"})",
"format": "table",
"hide": false,
"instant": true,
Expand All @@ -1470,7 +1488,7 @@
},
{
"exemplar": false,
"expr": "count by (datacenter, cluster) (security_account_ldapuser{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"})",
"expr": "sum by (datacenter, cluster) (security_account_ldapuser{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"})",
"format": "table",
"hide": false,
"instant": true,
Expand All @@ -1480,7 +1498,7 @@
},
{
"exemplar": false,
"expr": "count by (datacenter, cluster) (security_account_certificateuser{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"})",
"expr": "sum by (datacenter, cluster) (security_account_certificateuser{datacenter=~\"$Datacenter\",cluster=~\"$Cluster\"})",
"format": "table",
"hide": false,
"instant": true,
Expand Down Expand Up @@ -1597,7 +1615,6 @@
"Value #C": "Default Admin User",
"Value #D": "MD5 in use",
"Value #E": "Insecure SSH Settings",
"Value #F": "Login Banner",
"Value #G": "Network Time Protocol",
"Value #I": "Saml Users",
"Value #J": "Cluster Peering",
Expand Down Expand Up @@ -1644,7 +1661,7 @@
"h": 1,
"w": 24,
"x": 0,
"y": 1
"y": 3
},
"id": 15,
"panels": [
Expand Down Expand Up @@ -1702,7 +1719,7 @@
"h": 3,
"w": 16,
"x": 0,
"y": 2
"y": 4
},
"id": 165,
"options": {
Expand Down Expand Up @@ -1850,7 +1867,7 @@
"h": 3,
"w": 4,
"x": 16,
"y": 2
"y": 4
},
"id": 168,
"links": [],
Expand Down Expand Up @@ -1954,7 +1971,7 @@
"h": 3,
"w": 4,
"x": 20,
"y": 2
"y": 4
},
"id": 164,
"links": [],
Expand Down Expand Up @@ -2568,7 +2585,7 @@
"h": 13,
"w": 24,
"x": 0,
"y": 5
"y": 7
},
"id": 172,
"options": {
Expand Down Expand Up @@ -2733,10 +2750,8 @@
"renameByName": {
"Value #A": "Autosupport Https Transport",
"Value #B": "Compliant",
"Value #C": "Login Banner",
"Value #D": "MD5 in use",
"Value #E": "",
"Value #F": "Login Banner",
"Value #G": "LDAP Payload Signing",
"Value #I": "LDAP Encryption",
"activediruser": "Active Directory Users",
Expand Down
Loading