Skip to content

Commit 82db3f7

Browse files
Merge pull request #1 from OpenCTI-Platform/dev-1.0.1
Dev 1.0.1
2 parents e87079b + 106cafc commit 82db3f7

File tree

11 files changed

+20
-51
lines changed

11 files changed

+20
-51
lines changed

.github/img/addon_settings.png

-4.37 KB
Loading

README.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,19 @@ The OpenCTI Add-on for Splunk allows users to interconnect Splunk with OpenCTI p
99

1010
## Installation
1111

12-
### Installation from Splunkbase (not ready, waiting for App publication)
12+
### Installation from Splunkbase
1313

1414
1. Log in to the Splunk Web UI and navigate to "Apps" and click on "Find more Apps"
15-
2. Search for OpenCTI
15+
2. Search for "OpenCTI Add-on for Splunk"
1616
3. Click Install
1717
The app is installed
1818

1919
### Installing from file
2020

21-
1. Download latest version of the Splunk App: [TA-opencti-add-on-1.0.0.spl](https://github.com/OpenCTI-Platform/splunk-add-on/releases/download/1.0.0/TA-opencti-add-on-1.0.0.spl)
21+
1. Download latest version of the Splunk App: [TA-opencti-add-on-1.0.1.spl](https://github.com/OpenCTI-Platform/splunk-add-on/releases/download/1.0.1/TA-opencti-add-on-1.0.1.spl)
2222
2. Log in to the Splunk Web UI and navigate to "Apps" and click on "Manage Apps"
2323
3. Click "Install app from file"
24-
4. Choose file and select the "TA-opencti-add-on-1.0.0.spl" file
24+
4. Choose file and select the "TA-opencti-add-on-1.0.1.spl" file
2525
5. Click on Upload
2626
The app is installed
2727

@@ -46,11 +46,10 @@ Proceed as follows to enable the "stateless mode" option:
4646
1. Navigate to Splunk Web UI home page, open the "OpenCTI add-on for Splunk" and navigate to "Configuration" page.
4747
2. Click on "Add-on settings" tab and complete the form with the required settings:
4848

49-
| Parameter | Description |
50-
|----------------------------|----------------------------------------------|
51-
| `OpenCTI URL` | The URL of the OpenCTI platform |
52-
| `OpenCTI API Key` | The API Token of the previously created user |
53-
| `Disable SSL verification` | Enable or disable SSL verification |
49+
| Parameter | Description |
50+
|----------------------------|-----------------------------------------------------------------|
51+
| `OpenCTI URL` | The URL of the OpenCTI platform (A HTTPS connection is required |
52+
| `OpenCTI API Key` | The API Token of the previously created user |
5453

5554
![](./.github/img/addon_settings.png "Add-on settings")
5655

TA-opencti-add-on/README/ta_opencti_add_on_settings.conf.spec

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,3 @@ loglevel =
1313
[additional_parameters]
1414
opencti_url =
1515
opencti_api_key =
16-
disable_ssl_verification =

TA-opencti-add-on/appserver/static/js/build/globalConfig.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -181,11 +181,6 @@
181181
"errorMsg": "Max length of password is 8192"
182182
}
183183
]
184-
},
185-
{
186-
"field": "disable_ssl_verification",
187-
"label": "Disable SSL verification",
188-
"type": "checkbox"
189184
}
190185
]
191186
}

TA-opencti-add-on/appserver/static/openapi.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,6 @@
127127
"opencti_api_key": {
128128
"type": "string",
129129
"format": "password"
130-
},
131-
"disable_ssl_verification": {
132-
"type": "string"
133130
}
134131
}
135132
},
@@ -142,9 +139,6 @@
142139
"opencti_api_key": {
143140
"type": "string",
144141
"format": "password"
145-
},
146-
"disable_ssl_verification": {
147-
"type": "string"
148142
}
149143
}
150144
},

TA-opencti-add-on/bin/TA_opencti_add_on_rh_settings.py

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,8 @@
9797
required=True,
9898
encrypted=False,
9999
default=None,
100-
validator=validator.String(
101-
min_len=0,
102-
max_len=8192,
100+
validator=validator.Pattern(
101+
regex=r"""^https://[0-9a-zA-Z\-\.]+(?:\:\d+)?""",
103102
)
104103
),
105104
field.RestField(
@@ -111,14 +110,7 @@
111110
min_len=0,
112111
max_len=8192,
113112
)
114-
),
115-
field.RestField(
116-
'disable_ssl_verification',
117-
required=False,
118-
encrypted=False,
119-
default=None,
120-
validator=None
121-
),
113+
)
122114
]
123115
model_additional_parameters = RestModel(fields_additional_parameters, name='additional_parameters')
124116

TA-opencti-add-on/bin/input_module_opencti_indicators.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -258,11 +258,6 @@ def collect_events(helper, ew):
258258
# get connection configuration
259259
opencti_url = helper.get_global_setting("opencti_url")
260260
opencti_api_key = helper.get_global_setting("opencti_api_key")
261-
disable_ssl_verification = helper.get_global_setting("disable_ssl_verification")
262-
verif_ssl = True
263-
if disable_ssl_verification == "1":
264-
verif_ssl = False
265-
helper.log_debug(f"Verify SSL: {verif_ssl}")
266261

267262
stream_id = helper.get_arg('stream_id')
268263
helper.log_info(f"going to fetch data of OpenCTI stream.id: {stream_id}")

TA-opencti-add-on/bin/ta_opencti_add_on/app_connector_helper.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import requests
22

33
from utils import get_proxy_config
4-
4+
from constants import VERIFY_SSL
55

66
class SplunkAppConnectorHelper:
77
def __init__(
@@ -22,13 +22,9 @@ def __init__(
2222
self.api_url = self.opencti_url + "/graphql"
2323

2424
# manage SSL verification
25-
disable_ssl_verification = splunk_helper.get_global_setting("disable_ssl_verification")
26-
verif_ssl = True
27-
if disable_ssl_verification == "1":
28-
verif_ssl = False
29-
splunk_helper.log_debug(f"verify SSL: {verif_ssl}")
30-
self.verify_ssl = verif_ssl
25+
splunk_helper.log_debug(f"verify SSL: {VERIFY_SSL}")
3126

27+
# manage proxies configuration
3228
self.proxies = get_proxy_config(splunk_helper)
3329

3430
def register(self):
@@ -77,7 +73,7 @@ def register(self):
7773
url=self.api_url,
7874
json={"query": query, "variables": input},
7975
headers=self.headers,
80-
verify=self.verify_ssl,
76+
verify=VERIFY_SSL,
8177
proxies=self.proxies
8278
)
8379

@@ -105,7 +101,7 @@ def send_stix_bundle(self, bundle):
105101
url=self.api_url,
106102
json={"query": query, "variables": variables},
107103
headers=self.headers,
108-
verify=self.verify_ssl,
104+
verify=VERIFY_SSL,
109105
proxies=self.proxies
110106
)
111107
if r.status_code != 200:
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
2-
CONNECTOR_ID = "a6edc906-2f9f-5fb2-a373-efac406f0ef2"
3-
CONNECTOR_NAME = "Splunk App"
1+
CONNECTOR_ID = "a6edc906-2f9f-5fb2-a373-efac406f0ef2" # hard-coded opencti connector Identifier
2+
CONNECTOR_NAME = "Splunk App" # hard-coded opencti connector name
3+
VERIFY_SSL = True # SSL verification by default

TA-opencti-add-on/default/app.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ build = 1
77

88
[launcher]
99
author = Filigran
10-
version = 1.0.0
10+
version = 1.0.1
1111
description = Add-on for OpenCTI
1212

1313
[ui]

0 commit comments

Comments
 (0)