Skip to content

Commit

Permalink
feat: use more generic names for certs and add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ikheifets-splunk committed Feb 20, 2024
1 parent 647dd31 commit b123bda
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 3 deletions.
18 changes: 18 additions & 0 deletions docs/edge_processor.md
@@ -0,0 +1,18 @@
# SC4S + EP guide (Experimental)

## Basic Setup:

* Use IP of EP instance as HEC URL: `SC4S_DEST_SPLUNK_HEC_DEFAULT_URL=http://x.x.x.x:8088`
* Use token from EP Global Settings: `SC4S_DEST_SPLUNK_HEC_DEFAULT_TOKEN=secret`
* Use EP API format: `SC4S_HEC_TEMPLATE=t_edge_hec`

## TLS:

* Switch to HTTPS at HEC: `SC4S_DEST_SPLUNK_HEC_DEFAULT_URL=https://x.x.x.x:8088`
* [Generate certificates](https://docs.splunk.com/Documentation/SplunkCloud/9.1.2308/EdgeProcessor/SecureForwarders)
* Upload certs at Edge Processor TLS settings
* Rename `Client cert` to `cert.pem`
* Rename `Client key` to `key.pem`
* Rename `CA Cert` to `ca_cert.pem`
* Mount dir with certs to `/etc/syslog-ng/tls/hec`
* Set path for TLS dir: `SC4S_DEST_TLS_MOUNT=/etc/syslog-ng/tls/hec`
1 change: 1 addition & 0 deletions mkdocs.yml
Expand Up @@ -57,6 +57,7 @@ nav:
- SC4S Lite (Experimental):
- Intro: "lite.md"
- Pluggable modules: "pluggable_modules.md"
- Edge Processor (Experimental): "edge_processor.md"
- Troubleshooting:
- SC4S Startup and Validation: "troubleshooting/troubleshoot_SC4S_server.md"
- SC4S Logging and Troubleshooting Resources: "troubleshooting/troubleshoot_resources.md"
Expand Down
4 changes: 2 additions & 2 deletions package/etc/conf.d/destinations/dest_hec/plugin.jinja
Expand Up @@ -35,8 +35,8 @@ destination d_hec{{ dest_mode }}{{ altname }}{
tls(
peer-verify({{ peer_verify }})
{% if tls_mount %}
key-file("{{ tls_mount }}/data_source_client_key.pem")
cert-file("{{ tls_mount }}/data_source_client_cert.pem")
key-file("{{ tls_mount }}/key.pem")
cert-file("{{ tls_mount }}/cert.pem")
ca-dir("{{ tls_mount }}")
{% endif %}
{%- if cipher_suite %}
Expand Down
2 changes: 1 addition & 1 deletion package/sbin/entrypoint.sh
Expand Up @@ -172,7 +172,7 @@ then
if [ "${SC4S_DEST_SPLUNK_HEC_DEFAULT_TLS_VERIFY}" == "no" ]; then export NO_VERIFY=-k ; fi

if [ -n "${SC4S_DEST_TLS_MOUNT}" ]; then
export HEC_TLS_OPTS="--cert ${SC4S_DEST_TLS_MOUNT}/data_source_client_cert.pem --key ${SC4S_DEST_TLS_MOUNT}/data_source_client_key.pem";
export HEC_TLS_OPTS="--cert ${SC4S_DEST_TLS_MOUNT}/cert.pem --key ${SC4S_DEST_TLS_MOUNT}/key.pem --cacert ${SC4S_DEST_TLS_MOUNT}/ca_cert.pem";
else
export HEC_TLS_OPTS="";
fi
Expand Down

0 comments on commit b123bda

Please sign in to comment.