Noms des sites configurables (poc_fqdn_suffix) : www-bwpoc.vlab.bzh, un seul niveau sous le wildcard Traefik
Tests : 26 OK, 0 KO. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
04c8081215
commit
e395fae4c6
8 files changed
+33
-27
No files matched your search
@@ -20,10 +20,10 @@
|
||||
<h2>Sites du PoC</h2>
|
||||
<table>
|
||||
<tr><th>Site</th><th>Application</th><th>Fonctionnalités mises en avant</th></tr>
|
||||
<tr><td><a href="https://www.{{ poc_domain }}/">www</a></td><td>nginx statique</td><td>antibot, en-têtes de sécurité, HTTPS forcé</td></tr>
|
||||
<tr><td><a href="https://shop.{{ poc_domain }}/">shop</a></td><td>OWASP Juice Shop</td><td>ModSecurity + OWASP CRS 4, websockets, User-Agents malveillants</td></tr>
|
||||
<tr><td><a href="https://api.{{ poc_domain }}/get">api</a></td><td>go-httpbin</td><td>limitation de débit, méthodes, taille max, bad behavior, règle ModSecurity maison</td></tr>
|
||||
<tr><td><a href="https://bwui.{{ poc_domain }}/">bwui</a></td><td>UI BunkerWeb</td><td>rapports, bannissements, réglages</td></tr>
|
||||
<tr><td><a href="https://www{{ poc_fqdn_suffix }}/">www</a></td><td>nginx statique</td><td>antibot, en-têtes de sécurité, HTTPS forcé</td></tr>
|
||||
<tr><td><a href="https://shop{{ poc_fqdn_suffix }}/">shop</a></td><td>OWASP Juice Shop</td><td>ModSecurity + OWASP CRS 4, websockets, User-Agents malveillants</td></tr>
|
||||
<tr><td><a href="https://api{{ poc_fqdn_suffix }}/get">api</a></td><td>go-httpbin</td><td>limitation de débit, méthodes, taille max, bad behavior, règle ModSecurity maison</td></tr>
|
||||
<tr><td><a href="https://bwui{{ poc_fqdn_suffix }}/">bwui</a></td><td>UI BunkerWeb</td><td>rapports, bannissements, réglages</td></tr>
|
||||
</table>
|
||||
|
||||
<h2>Essais rapides dans le navigateur</h2>
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
ansible.builtin.uri:
|
||||
url: "https://{{ ansible_host }}/get"
|
||||
headers:
|
||||
Host: "api.{{ poc_domain }}"
|
||||
Host: "api{{ poc_fqdn_suffix }}"
|
||||
validate_certs: false
|
||||
status_code: 200
|
||||
register: bw_probe
|
||||
@@ -53,7 +53,7 @@
|
||||
dest: "{{ playbook_dir }}/../credentials/ACCES.txt"
|
||||
mode: "0600"
|
||||
content: |
|
||||
UI BunkerWeb : https://bwui.{{ poc_domain }}/ (WAF {{ ansible_host }})
|
||||
UI BunkerWeb : https://bwui{{ poc_fqdn_suffix }}/ (WAF {{ ansible_host }})
|
||||
Identifiant : {{ bw_ui_admin_user }}
|
||||
Mot de passe : {{ bw_ui_admin_password }}
|
||||
delegate_to: localhost
|
||||
@@ -61,4 +61,4 @@
|
||||
|
||||
- name: Rappel des accès
|
||||
ansible.builtin.debug:
|
||||
msg: "UI BunkerWeb : https://bwui.{{ poc_domain }}/ , identifiants dans credentials/ACCES.txt"
|
||||
msg: "UI BunkerWeb : https://bwui{{ poc_fqdn_suffix }}/ , identifiants dans credentials/ACCES.txt"
|
||||
@@ -48,13 +48,13 @@ services:
|
||||
environment:
|
||||
<<: [*db-env, *api-env]
|
||||
BUNKERWEB_INSTANCES: "bunkerweb"
|
||||
SERVER_NAME: {{ val(bw_sites.keys() | map('regex_replace', '$', '.' ~ poc_domain) | join(' ')) }}
|
||||
SERVER_NAME: {{ val(bw_sites.keys() | map('regex_replace', '$', poc_fqdn_suffix) | join(' ')) }}
|
||||
# --- Réglages globaux ---
|
||||
{% for k, v in bw_global_settings.items() %}
|
||||
{{ k }}: {{ val(v) }}
|
||||
{% endfor %}
|
||||
{% for name, site in bw_sites.items() %}
|
||||
{% set fqdn = name ~ '.' ~ poc_domain %}
|
||||
{% set fqdn = name ~ poc_fqdn_suffix %}
|
||||
# --- {{ fqdn }} ---
|
||||
{{ fqdn }}_USE_REVERSE_PROXY: "yes"
|
||||
{{ fqdn }}_REVERSE_PROXY_URL: "/"
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
# Généré par Ansible
|
||||
WAF_IP={{ waf_ip }}
|
||||
DOMAIN={{ poc_domain }}
|
||||
SUFFIX={{ poc_fqdn_suffix }}
|
||||
APPS_IP={{ apps_ip }}
|
||||
PORT_WWW={{ apps_ports.www }}
|
||||
PORT_SHOP={{ apps_ports.shop }}
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
path: /etc/hosts
|
||||
marker: "# {mark} PoC BunkerWeb"
|
||||
block: |
|
||||
{{ waf_ip }} www.{{ poc_domain }} shop.{{ poc_domain }} api.{{ poc_domain }} bwui.{{ poc_domain }}
|
||||
{{ waf_ip }} www{{ poc_fqdn_suffix }} shop{{ poc_fqdn_suffix }} api{{ poc_fqdn_suffix }} bwui{{ poc_fqdn_suffix }}
|
||||
|
||||
- name: Vérifier la présence du modèle hosts de cloud-init
|
||||
ansible.builtin.stat:
|
||||
@@ -50,5 +50,5 @@
|
||||
path: /etc/cloud/templates/hosts.debian.tmpl
|
||||
marker: "# {mark} PoC BunkerWeb"
|
||||
block: |
|
||||
{{ waf_ip }} www.{{ poc_domain }} shop.{{ poc_domain }} api.{{ poc_domain }} bwui.{{ poc_domain }}
|
||||
{{ waf_ip }} www{{ poc_fqdn_suffix }} shop{{ poc_fqdn_suffix }} api{{ poc_fqdn_suffix }} bwui{{ poc_fqdn_suffix }}
|
||||
when: ci_hosts_tmpl.stat.exists
|
||||
Reference in new issue
Block a user