Skip to content

Commit e4e89d6

Browse files
Merge pull request #9 from ait-testbed/api_server
add remote server to configs
2 parents 4699b6e + 8be0e5a commit e4e89d6

File tree

4 files changed

+37
-2
lines changed

4 files changed

+37
-2
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ It is further possible to roll out playbooks.
3333
| attackmate_msf_passwd | password | **None** | Password for the Metasploit rpcd. (only needed for msf-commands) |
3434
| attackmate_playwright | bool | True | Whether to install Playwright and its dependencies |
3535
| command_delay | float | **None** | delay in seconds before commands for the CommandConfig |
36+
| attackmate_remote_config | dict | {} | Optional map of named remote AttackMate connections. Each entry requires url, username, password, and optionally cafile. If empty, no remote_config section is written to the config file. |
3637

3738
## Example Playbook
3839

@@ -52,6 +53,12 @@ It is further possible to roll out playbooks.
5253
- upgradeshell.j2
5354
- attackchain.j2
5455
command_delay: 2
56+
attackmate_remote_config:
57+
primary_node:
58+
url: "https://10.0.0.5:5000"
59+
username: admin
60+
password: securepassword
61+
cafile: "/path/to/cert.pem"
5562
```
5663
5764
This role installs to executables:

defaults/main.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,18 @@ attackmate_playwright_pip_packages: # Python packages to install into the Attac
3737
- playwright
3838

3939
grpc_download_base_url: "https://aecidimages.ait.ac.at/EXTRA/grpc"
40-
distribution_lower: "{{ ansible_distribution | lower }}"
40+
distribution_lower: "{{ ansible_distribution | lower }}"
41+
42+
# Remote AttackMate connections (optional)
43+
# attackmate_remote_config:
44+
# remote_server:
45+
# url: "https://10.0.0.5:5000"
46+
# username: admin
47+
# password: securepassword
48+
# cafile: "/path/to/cert.pem"
49+
# another_server:
50+
# url: "https://10.0.0.6:5000"
51+
# username: user
52+
# password: anotherpassword
53+
# cafile: "/path/to/another_cert.pem"
54+
attackmate_remote_config: {}

molecule/default/molecule.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ platforms:
2727
pre_build_image: true
2828
provisioner:
2929
name: ansible
30-
ANSIBLE_ROLES_PATH: "/home/ubuntu/aecid_roles/"
30+
env:
31+
ANSIBLE_ALLOW_BROKEN_CONDITIONALS: "True"
3132
verifier:
3233
name: ansible
3334
scenario:

templates/attackmate.yml.j2

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,17 @@ msf_config:
2020

2121
cmd_config:
2222
command_delay: {{ command_delay }}
23+
{% endif %}
24+
25+
{% if attackmate_remote_config %}
26+
remote_config:
27+
{% for name, conn in attackmate_remote_config.items() %}
28+
{{ name }}:
29+
url: "{{ conn.url }}"
30+
username: {{ conn.username }}
31+
password: {{ conn.password }}
32+
{% if conn.cafile is defined %}
33+
cafile: "{{ conn.cafile }}"
34+
{% endif %}
35+
{% endfor %}
2336
{% endif %}

0 commit comments

Comments
 (0)