mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Merge pull request #3361 from Security-Onion-Solutions/nomorefeatures
Make saved objects less hacky
This commit is contained in:
@@ -14,14 +14,9 @@ cp /opt/so/conf/kibana/saved_objects.ndjson.template /opt/so/conf/kibana/saved_o
|
|||||||
# SOCtopus and Manager
|
# SOCtopus and Manager
|
||||||
sed -i "s/PLACEHOLDER/{{ MANAGER }}/g" /opt/so/conf/kibana/saved_objects.ndjson
|
sed -i "s/PLACEHOLDER/{{ MANAGER }}/g" /opt/so/conf/kibana/saved_objects.ndjson
|
||||||
|
|
||||||
## This hackery will be removed with Elastic Auth ##
|
## This hackery will be removed if using Elastic Auth ##
|
||||||
|
|
||||||
# Remove the cold cookie if its there
|
|
||||||
rm /tmp/cookie.txt
|
|
||||||
|
|
||||||
# Let's snag a cookie from Kibana
|
# Let's snag a cookie from Kibana
|
||||||
curl -c /tmp/cookie.txt -X GET http://localhost:5601/
|
THECOOKIE=$(curl -c - -X GET http://localhost:5601/ | grep sid | awk '{print $7}')
|
||||||
THECOOKIE=$(cat /tmp/cookie.txt | grep sid | awk '{print $7}')
|
|
||||||
|
|
||||||
# Load saved objects
|
# Load saved objects
|
||||||
curl -b "sid=$THECOOKIE" -L -X POST "localhost:5601/api/saved_objects/_import?overwrite=true" -H "kbn-xsrf: true" --form file=@/opt/so/conf/kibana/saved_objects.ndjson > /dev/null 2>&1
|
curl -b "sid=$THECOOKIE" -L -X POST "localhost:5601/api/saved_objects/_import?overwrite=true" -H "kbn-xsrf: true" --form file=@/opt/so/conf/kibana/saved_objects.ndjson > /dev/null 2>&1
|
||||||
|
|||||||
Reference in New Issue
Block a user