Skip to content

Commit 8c7ca20

Browse files
Update MIGRATION-GUIDE: document accessControl changes and router configuration updates
1 parent 1caeacd commit 8c7ca20

1 file changed

Lines changed: 45 additions & 4 deletions

File tree

docs/MIGRATION-GUIDE.md

Lines changed: 45 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,35 @@ The following legacy interceptors have been removed:
3333

3434
Remove these elements from your configuration and replace them with modern equivalents.
3535

36-
## 4. Internal Routing
36+
## 4. AccessControl
37+
38+
* The ACL for `accessControl` is now defined inline in the YAML/XML configuration (no external `acl.xml`).
39+
* ACL rules do not match URIs/paths anymore. Use separate API entries for different paths and define `accessControl` per API.
40+
* Rules match only the peer IP/CIDR (IPv4/IPv6) or hostname (regex). First match wins. If nothing matches, access is denied.
41+
42+
Example:
43+
44+
```yaml
45+
api:
46+
port: 2000
47+
path:
48+
uri: /foo
49+
flow:
50+
- accessControl:
51+
- allow: "^localhost$"
52+
---
53+
api:
54+
port: 2000
55+
path:
56+
uri: /bar
57+
flow:
58+
- accessControl:
59+
- deny: 127.0.0.1
60+
- allow: ::1
61+
```
62+
63+
64+
## 5. Internal Routing
3765
3866
Instead of:
3967
@@ -47,19 +75,19 @@ use:
4775
<target url="internal://a"/>
4876
```
4977

50-
## 5. Logging
78+
## 6. Logging
5179

5280
Instead of `<log headerOnly="true"/>` use `<log body="false"/>`.
5381

54-
## 6. Scripting
82+
## 7. Scripting
5583

5684
### 6.1 Groovy Expressions
5785

5886
`${header}` now returns a `Map<String,String>` instead of an object of class `Header`. Use `$header['x-foo']` instead of `$header.getFirstValue('x-foo')`.
5987

6088
Instead of:
6189

62-
```
90+
```groovy
6391
headers.getFirst("X-My-Header")
6492
```
6593

@@ -93,6 +121,19 @@ The JMX ObjectName format has changed to: `io.membrane-api:00=routers, name=`
93121
```
94122
- `HttpClientInterceptor.setAdjustHeader(boolean)` has been removed. Header adjustment is now configured via `HttpClientConfiguration`.
95123

124+
## 9. Router Configuration
125+
Router settings are now configured via the `configuration` element.
126+
127+
Example:
128+
```xml
129+
<!-- before -->
130+
<router production="true" />
131+
132+
<!-- now -->
133+
<router>
134+
<configuration production="true" />
135+
</router>
136+
```
96137

97138
# Migration from 5.X to 6
98139

0 commit comments

Comments
 (0)