Skip to content
Snippets Groups Projects
Commit 9b8dfe43 authored by Václav Bartoš's avatar Václav Bartoš
Browse files

MISP - use different API key

Use API key of the predefined admin user, instead of the first soctools user (which can be easily removed).
parent 7bc8a042
No related branches found
No related tags found
No related merge requests found
...@@ -42,6 +42,12 @@ ...@@ -42,6 +42,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"
...@@ -56,16 +62,6 @@ ...@@ -56,16 +62,6 @@
with_items: with_items:
- "{{soctools_users}}" - "{{soctools_users}}"
- name: Get user API key
shell: '/var/www/MISP/app/Console/cake Admin getAuthkey {{soctools_users[0].email}} | /usr/bin/tail -n1'
register: user_key
- name: Store user API key
copy:
content: "{{ user_key.stdout }}"
dest: "{{playbook_dir}}/secrets/tokens/misp"
delegate_to: 127.0.0.1
- name: Enable feed - name: Enable feed
uri: uri:
url: "https://{{soctoolsproxy}}:6443/feeds/edit/1" url: "https://{{soctoolsproxy}}:6443/feeds/edit/1"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment