You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: knowlege-content/MAP/security-fundamentals-dashboards/README.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,7 @@
1
1
# Security Fundamentals Dashboards for MAP
2
2
3
+
[](https://cloud.oracle.com/resourcemanager/stacks/create?zipUrl=https://github.com/jujufugh/oci-o11y-solutions/releases/download/security-fundamentals-dashboard/sfd-la-2.0.zip)
4
+
3
5
### Dashboards screenshots
4
6
* Identity Dashboard
5
7

[](https://cloud.oracle.com/resourcemanager/stacks/create?zipUrl=https://github.com/gsrz23/oci-iam-dashboard/archive/refs/heads/main.zip)
3
+
4
+
This repository provides an OCI Logging Analytics Dashboard with some sample widgets to monitor and visualize audit Events for OCI IAM Identity Domains. The Dashboard will only work in OCI Tenancies that [support IAM Identity Domains](https://docs.oracle.com/en-us/iaas/Content/Identity/getstarted/identity-domains.htm#identity_documentation__updated-identity-domains).
5
+
6
+
7
+
## Overview
8
+
9
+
The Audit Logs for OCI IAM Identity Domains can be obtained directly from the OCI Audit Service along with the events from other OCI Services. The IDCS Rest APIs can still be used, but the Audit Service is more convenient since Audit logs can be easily pushed to Streaming, Object Storage, etc. The solution in this repository deploys Service Connector Hub to send OCI Audit Logs to Logging Analytics. It also deploys a sample Dashboard to visualize the audit logs for OCI IAM Identity Domains.
10
+
11
+

12
+

13
+

14
+
15
+
16
+
## Resources
17
+
18
+
The following resources are provisioned with terraform or Resource Manager
19
+
20
+
-**Logging Analytics**: This is a regional service. It will be onboarded in the selected region if not available yet. This can incur some storage costs.
21
+
-**Custom Logging Analytics Fields**: Some custom fields are provisioned in Logging Analytics to support parsing and querying of the OCI Audit Logs. The fields include: IAM Domain Name, IAM Event ID, IAM Actor Name, IAM Actor Type, IAM Target Name, IAM CLIENT IP, IAM Identity Provider, etc.
22
+
-**Custom Logging Analytics Parser**: The parser *IAM Audit Log Format* is used to parse the additionalDetails field from the OCI Audit Logs for Identity Audit Logs.
23
+
-**OCI Audit Logs Source**: The OOB source *OCI Audit Logs* is modified to include the above parser.
24
+
-**Loggin Analytics Log Group**: A Log Group named *iam_identity_domain_audit_${var.iam_dashboard_domainname}* is provisioned as the target for Service Connector Hub.
25
+
-**Service Connector Hub**: A SCH named *IAM Identity Domain Audit to Logging Analytics* is provisioned to push OCI Audit Logs from a specific compartment to Logging Analytics.
26
+
-**IAM Policy**: A Policy named *IAM_Dashboard_ConnectorPolicy_LoggingAnalytics_${var.iam_dashboard_domainname}* that allows SCH to publish logs to the Logging Analytics Log Group.
27
+
-**IAM Dashboard**: A sample Loggin Analytics dashboard and with queries based on the custom fields.
28
+
29
+
## Deployment Notes
30
+
31
+
The following variables are used for deployment:
32
+
33
+
-**iam_dashboard_domain_ocid** is the OCID of the existing OCI IAM Identity Domain to be used in the Dashboard queries.
34
+
-**region** is Base Region of the IAM Identity Domain. Logging Analytics will be onboarded in this region if needed.
35
+
-**iam_dashboard_compartmentid** is the compartment ID where the OCI IAM Identity Domain resides and where the dashboard and saved queries are deployed.
36
+
-**create_service_connector_audit** set to true if a SCH is needed to push OCI Audit Logs to Logging Analytics. It's provisioned in the compartment *iam_dashboard_compartmentid*. The default is *false*
37
+
-**service_connector_audit_state** is the initial stated of the SCH if provisioned. Allowed values are *INACTIVE* (default) and *ACTIVE*
38
+
-**logging_analytics_log_group_name** is the name of the Logging Analytics Log Group that will have the Audit Logs.
39
+
-**am_dashboard_details** a template to import dashboards, it's based on the variables *iam_dashboard_domainname* and *iam_dashboard_compartmentid*
40
+
41
+
To deploy multiple Dashboards use a different stack for each one specifying the respective variables.
42
+
43
+
If multiple dashboards are created in the same compartment, there's no need to create a SCH for each. They can all share one SCH. The same goes for the Logging Analytics Log Group.
44
+
45
+
A provisioned Dashboard can't be modified with terraform, any modification to the variable *am_dashboard_details* will create a new dashboard and new saved queries.
46
+
47
+
Some considerations when using the terraform *destroy* command:
48
+
- The Logging Analytics dashboard and customizations are removed from the terraform state but not from Logging Analytics.
49
+
- A Dashboard and its Saved Queries have to be removed manually from the console or with API calls.
50
+
- The Logging Analytics Log Group won't be destroyed if it contains data.
51
+
- Logging Analytics service is not offboarded with the destroy command.
52
+
- To remove the Logging Analytics customizations do the following from the Logging Analytics Administration Menu:
53
+
- Edit the OOB Source *OCI Audit Logs* and in the Parser section click Default and then save the source
54
+
- Delete the custom Parser *IAM Audit Log Format*
55
+
- Delete all the custom fields with name that starts with IAM: IAM Domain Name, IAM EventID, IAM Actor Name, etc.
stackDescription: "A stack to deploy Logging Analytics Dashboards for OCI."
6
+
schemaVersion: 1.1.0
7
+
version: "0.0.1"
8
+
locale: "en"
9
+
10
+
variableGroups:
11
+
- title: "Dashboards Region and Compartment Information"
12
+
variables:
13
+
- "region"
14
+
- "sfd_compartment_ocid"
15
+
16
+
- title: "Service Connector for Logging Analytics"
17
+
variables:
18
+
- "create_service_connector_audit"
19
+
- "logging_analytics_log_group_name"
20
+
- "service_connector_audit_state"
21
+
22
+
- title: "Hidden Variables"
23
+
visible: false
24
+
variables:
25
+
- "tenancy_ocid"
26
+
- "user_ocid"
27
+
- "fingerprint"
28
+
- "private_key_path"
29
+
- "private_key_password"
30
+
- "iam_dashboard_import_custom_content_file"
31
+
32
+
variables:
33
+
region:
34
+
type: oci:identity:region:name
35
+
title: "Dashboards Region"
36
+
description: "Base Region of Dashboards. Note: Logging Analytics will be onboarded on this region"
37
+
required: true
38
+
39
+
sfd_compartment_ocid:
40
+
type: oci:identity:compartment:id
41
+
title: "Dashboard Compartment Name"
42
+
description: "Compartment where the dashboards and saved queries will be deployed"
43
+
required: true
44
+
45
+
create_service_connector_audit:
46
+
type: boolean
47
+
title: "Create Service Connector for IAM Identity Domain Audit?"
48
+
description: "Creates a Service Connector for IAM Identity Domain Audit logs with Logging Analytics as the Target. It's created in the same compartment as the Dashboard"
49
+
required: true
50
+
default: false
51
+
52
+
service_connector_audit_state:
53
+
type: enum
54
+
required: false
55
+
title: "Service Connector Hub State"
56
+
description: "Initial state in which to create the Service Connector Hub for Audit logs."
57
+
default: INACTIVE
58
+
visible: create_service_connector_audit
59
+
enum:
60
+
- INACTIVE
61
+
- ACTIVE
62
+
63
+
logging_analytics_log_group_name:
64
+
type: string
65
+
required: true
66
+
default: "sfd_identity_domain_audit"
67
+
description: "Name of the Logging Analytics Log Group that will have the Audit Logs"
description="Policy to allow Service Connector to upload logs to a Logging Analytics Log Group"
118
+
compartment_id=var.sfd_compartment_ocid
119
+
provider=oci.home
120
+
121
+
statements=[
122
+
"allow any-user to {LOG_ANALYTICS_LOG_GROUP_UPLOAD_LOGS} in compartment id ${var.sfd_compartment_ocid} where all {request.principal.type='serviceconnector', target.loganalytics-log-group.id='${data.oci_log_analytics_log_analytics_log_group.iam_dashboard_log_group_details[count.index].id}', request.principal.compartment.id='${var.sfd_compartment_ocid}'}"
tenancy_ocid = "ocid1.tenancy.oc1..aaaaaaaaa3qmjxr43tjexx75r6gwk6vjw22ermohbw2vbxyhczksgjir7xdq" # Get this from OCI Console (after logging in, go to top-right-most menu item and click option "Tenancy: <your tenancy name>").
6
+
user_ocid = "ocid1.user.oc1..aaaaaaaaag3xbwgruyx5q6xlbpvdkgfhpe5l76lzy4wgaoji5wwrx6e7ha6a" # Get this from OCI Console (after logging in, go to top-right-most menu item and click option "My profile").
7
+
fingerprint = "93:13:4d:f4:74:86:91:5e:50:c5:6d:34:2c:af:7b:b0" # The fingerprint can be gathered from your user account. In the "My profile page, click "API keys" on the menu in left hand side).
8
+
private_key_path = "/Users/gsaurez/.oci/gs_oci_api_key.pem" # This is the full path on your local system to the API signing private key.
9
+
private_key_password = "" # This is the password that protects the private key, if any.
0 commit comments