Skip to content
Merged
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
43 changes: 43 additions & 0 deletions HANDOVER_SANCTIFY.md
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,49 @@ From this integration:

---

## Related Project: indieweb2-bastion

The [indieweb2-bastion](https://github.com/hyperpolymath/indieweb2-bastion) repository provides infrastructure-layer security that complements php-aegis and sanctify-php at the application layer.

### What indieweb2-bastion Does

| Feature | Purpose |
|---------|---------|
| Hardened bastion ingress | Secure network entry points |
| Oblivious DNS (IPv6) | Privacy-preserving DNS resolution |
| GraphQL DNS APIs | Programmable domain resolution |
| SurrealDB provenance graphs | Audit trails & data lineage |

### Relationship to IndieWeb Security

While **not** implementing IndieWeb protocols (Micropub, IndieAuth, Webmention), indieweb2-bastion provides foundational security patterns applicable to IndieWeb infrastructure:

| indieweb2-bastion | IndieWeb Application |
|-------------------|---------------------|
| Provenance graphs | Track Webmention verification chains |
| Audit capabilities | Log IndieAuth token usage |
| Bastion pattern | Rate limit Webmention endpoints |
| Policy controls (Nickel) | Define allowed Micropub content |

### Recommended Stack Architecture

```
┌─────────────────────────────────────────────────────────┐
│ Full IndieWeb Stack │
├─────────────────────────────────────────────────────────┤
│ indieweb2-bastion │ Infrastructure layer │
│ (network, DNS, audit)│ (bastion, provenance) │
├───────────────────────┼─────────────────────────────────┤
│ php-aegis │ Application layer │
│ (validation, escaping)│ (Micropub, IndieAuth, Webmention)│
├───────────────────────┼─────────────────────────────────┤
│ sanctify-php │ Analysis layer │
│ (static analysis) │ (find vulnerabilities) │
└─────────────────────────────────────────────────────────┘
```

---

## Final Summary: Integration Value Matrix

| Tool | WordPress Value | Non-WP Value | Unique Capability |
Expand Down
28 changes: 28 additions & 0 deletions ROADMAP_PRIORITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,27 @@ Sanitizer::jsonEncode(mixed $input): string // Safe JSON with flags

**Goal**: First-class support for IndieWeb/semantic web patterns.

### Related Project: indieweb2-bastion

The [indieweb2-bastion](https://github.com/hyperpolymath/indieweb2-bastion) repository provides infrastructure-layer security (bastion ingress, oblivious DNS, provenance graphs) that complements php-aegis at the application layer.

**Architectural relationship**:
```
┌────────────────────────────────────────────────┐
│ indieweb2-bastion │ Infrastructure layer │
│ (network, audit) │ Rate limiting, logging │
├─────────────────────┼──────────────────────────┤
│ php-aegis │ Application layer │
│ (this module) │ Micropub, IndieAuth, │
│ │ Webmention validation │
└────────────────────────────────────────────────┘
```

**Lessons from indieweb2-bastion**:
- Use provenance-style tracking for Webmention verification chains
- Apply bastion patterns for rate limiting endpoints
- Consider audit logging as a first-class feature

### 5.1 Micropub Content Sanitizer
```php
Micropub::sanitizeContent(string $html, array $allowedTags = []): string
Expand All @@ -167,6 +188,13 @@ Webmention::validateSource(string $url): bool // Not internal IP
Webmention::validateTarget(string $url, string $domain): bool
```

### 5.4 SSRF Prevention
```php
// Prevent Webmention SSRF attacks
Webmention::isInternalIp(string $ip): bool
Webmention::resolveAndValidate(string $url): ValidationResult
```

---

## Phase 6: Rate Limiting (v0.6.0)
Expand Down
Loading