Skip to content
Snippets Groups Projects
Commit 5c60d0c3 authored by Arne Øslebø's avatar Arne Øslebø
Browse files

add misp token to nifi

parent d689674c
No related branches found
No related tags found
No related merge requests found
...@@ -33,6 +33,12 @@ ...@@ -33,6 +33,12 @@
misp_api_key: "{{ get_output.stdout }}" misp_api_key: "{{ get_output.stdout }}"
when: '"initialised" in init_output.stdout' when: '"initialised" in init_output.stdout'
- name: Store API key
copy:
content: "{{misp_api_key}}"
dest: "{{playbook_dir}}/secrets/tokens/misp"
delegate_to: 127.0.0.1
- name: add users - name: add users
uri: uri:
url: "https://{{soctoolsproxy}}:6443/admin/users/add/1" url: "https://{{soctoolsproxy}}:6443/admin/users/add/1"
......
...@@ -12909,7 +12909,7 @@ ...@@ -12909,7 +12909,7 @@
<name>Timestamp Format</name> <name>Timestamp Format</name>
</property> </property>
</controllerService> </controllerService>
<variable name="misp_token" value="{{ misp_token }}" /> <variable name="misp_token" value="{{lookup('file','{{playbook_dir}}/secrets/tokens/misp')}}" />
<variable name="maxmind_key" value="{{ maxmind_key }}" /> <variable name="maxmind_key" value="{{ maxmind_key }}" />
<variable name="misp_ip_first_interval" value="60d" /> <variable name="misp_ip_first_interval" value="60d" />
<variable name="elastic_username" value="{{ elastic_username }}" /> <variable name="elastic_username" value="{{ elastic_username }}" />
......
...@@ -13,7 +13,7 @@ et = xml.etree.ElementTree.parse(f) ...@@ -13,7 +13,7 @@ et = xml.etree.ElementTree.parse(f)
for v in et.findall(".//variable"): for v in et.findall(".//variable"):
a=v.attrib a=v.attrib
if a['name']=="misp_token": if a['name']=="misp_token":
a['value']="{{ misp_token }}" a['value']="{{lookup('file','{{playbook_dir}}/secrets/tokens/misp')}}"
elif a['name']=="misp_url": elif a['name']=="misp_url":
a['value']="{{ misp_url }}" a['value']="{{ misp_url }}"
elif a['name']=="maxmind_key": elif a['name']=="maxmind_key":
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment