Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,7 @@ http-client.private.env.json

# All idea files
.idea/**

# Docs
docs/node_modules/
docs/_site/
57 changes: 0 additions & 57 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,64 +26,7 @@ Zen operates autonomously on the same server as your PHP app to:

## Install

Zen for PHP comes as a single package that needs to be installed on the system to be protected.

Prerequisites:
* Ensure you have sudo privileges on your system.
* Check that you have a supported PHP version installed (PHP version >= 7.2 and tested up to 8.5).
* Make sure to use the appropriate commands for your system or cloud provider.

### Manual install

#### For Red Hat-based Systems (RHEL, CentOS, Fedora)

##### x86_64
```
rpm -Uvh --oldpackage https://github.com/AikidoSec/firewall-php/releases/download/v1.4.11/aikido-php-firewall.x86_64.rpm
```

##### arm64 / aarch64
```
rpm -Uvh --oldpackage https://github.com/AikidoSec/firewall-php/releases/download/v1.4.11/aikido-php-firewall.aarch64.rpm
```

#### For Debian-based Systems (Debian, Ubuntu)

##### x86_64
```
curl -L -O https://github.com/AikidoSec/firewall-php/releases/download/v1.4.11/aikido-php-firewall.x86_64.deb
dpkg -i -E ./aikido-php-firewall.x86_64.deb
```

##### arm64 / aarch64
```
curl -L -O https://github.com/AikidoSec/firewall-php/releases/download/v1.4.11/aikido-php-firewall.aarch64.deb
dpkg -i -E ./aikido-php-firewall.aarch64.deb
```

We support Debian >= 11 and Ubuntu >= 20.04.
You can run on Debian 10, by doing this setup before install: [Debian10 setup](./docs/debian10.md)

#### Deployment setup
- [Caddy & PHP-FPM](./docs/caddy.md)
- [Apache mod_php](./docs/apache-mod-php.md)

#### Managed platforms
- [Laravel Forge](./docs/laravel-forge.md)
- [AWS Elastic beanstalk](./docs/aws-elastic-beanstalk.md)
- [Fly.io](./docs/fly-io.md)

#### Aikido Token setup
- The standard way of setting the Aikido Token is via environment variables -> `AIKIDO_TOKEN="your token"`.
- Another way of doing that, is adding the `AIKIDO_TOKEN` variable in your `.env` file.
- If you are unable to set any of the above, there's an alternative way of doing that from PHP, by following the ["Token setup from PHP code"](./docs/token-setup-php.md).

### Troubleshooting

[Read our troubleshooting documentation.](./docs/troubleshooting.md)

> [!IMPORTANT]
> If you switch PHP versions after installing Zen, you will need to reinstall the firewall. See [Switching PHP versions](./docs/troubleshooting.md#switching-php-versions) in the troubleshooting documentation for detailed instructions.

## Supported libraries and frameworks

Expand Down
Binary file added docs/.DS_Store
Binary file not shown.
12 changes: 12 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---

---
# README for building docs

## Build and run locally

```
npm install
npm run watch
```
Open http://localhost:8080/
71 changes: 71 additions & 0 deletions docs/_includes/default.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>{% if title %}{{ title }} · {% endif %}Aikido Zen Firewall for PHP</title>
<meta name="color-scheme" content="light dark" />

<link
href="https://unpkg.com/[email protected]/themes/prism-okaidia.css"
rel="stylesheet"
/>
<link rel="stylesheet" href="/styles.css" />
</head>

<body>
<div class="shell">
<aside>
<div class="brand">
<a class="brand-row" href="{{ "/" | url }}">
<span class="brand-icon">{% include "logo-icon.svg" %}</span>
<div>
<strong>Aikido Zen Firewall</strong>
<span>{{ agent }}</span>
</div>
</a>
</div>

{% set navItems = collections.all | eleventyNavigation | navWithActive(page.url) %}
<nav class="sidebar-nav">
{% include "nav.njk" %}
</nav>
</aside>

<main>
{% set crumbs = navItems | navBreadcrumb(page.url) %}
<div class="topline">
<div class="crumb">
{% if crumbs.length %}
{% for item in crumbs %}
{% set label = item.title or item.key %}
{% if not loop.first %} / {% endif %}
{% if loop.last %}
<span aria-current="page">{{ label }}</span>
{% else %}
<a href="{{ item.url | url }}">{{ label }}</a>
{% endif %}
{% endfor %}
{% else %}
{{ page.url }}
{% endif %}
</div>
<a class="edit-link" href="https://github.com/AikidoSec/firewall-{{ agent | lower }}/edit/main/docs/{{ page.inputPath | replace('./', '') }}" target="_blank">Edit on Github</a>
</div>
<div class="content">
{{ content | safe }}
{% if showNavChildren %}
{% set currentNav = navItems | navFind(page.url) %}
{% if currentNav and currentNav.children and currentNav.children.length %}
<div class="child-links">
<h2>In this section</h2>
{% set childItems = currentNav.children %}
{% include "nav-children.njk" %}
</div>
{% endif %}
{% endif %}
</div>
</main>
</div>
</body>
</html>
4 changes: 4 additions & 0 deletions docs/_includes/logo-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions docs/_includes/nav-children.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{% macro render(items, isRoot) %}
<ul{% if isRoot %} class="content-nav"{% endif %}>
{% for item in items %}
{% set label = item.title or item.key %}
<li>
<a href="{{ item.url | url }}">{{ label }}</a>
{% if item.children and item.children.length %}
{{ render(item.children, false) }}
{% endif %}
</li>
{% endfor %}
</ul>
{% endmacro %}

{{ render(childItems, true) }}
24 changes: 24 additions & 0 deletions docs/_includes/nav.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{% macro render(items) %}
<ul class="nav-list">
{% for item in items %}
{% set hasChildren = item.children and item.children.length %}
{% set label = item.title or item.key %}
{% if hasChildren %}
<li class="nav-item nav-item--parent">
<details class="nav-group" {% if item.isOpen %}open{% endif %}>
<summary class="nav-summary">
<a class="nav-link{% if item.isCurrent %} is-current{% endif %}" href="{{ item.url | url }}"{% if item.isCurrent %} aria-current="page"{% endif %}>{{ label }}</a>
</summary>
{{ render(item.children) }}
</details>
</li>
{% else %}
<li class="nav-item">
<a class="nav-link{% if item.isCurrent %} is-current{% endif %}" href="{{ item.url | url }}"{% if item.isCurrent %} aria-current="page"{% endif %}>{{ label }}</a>
</li>
{% endif %}
{% endfor %}
</ul>
{% endmacro %}

{{ render(navItems) }}
Loading
Loading