-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathconfig.toml
More file actions
78 lines (68 loc) · 2.96 KB
/
Copy pathconfig.toml
File metadata and controls
78 lines (68 loc) · 2.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# Minimal rustbgpd configuration
#
# This is the smallest working config for a single eBGP peer.
# gRPC defaults to a Unix domain socket at <runtime_state_dir>/grpc.sock.
#
# "Minimal" includes policy. An eBGP session with no policy is not a
# smaller config, it is an unfiltered one, and leaving it out here would
# only teach the shape that `rustbgpd --check` exists to flag. The two
# chains below are the minimum: explicit, permit-all, and labeled.
#
# For local development, runtime_state_dir points to /tmp/rustbgpd so no
# root access is needed. For production, use /var/lib/rustbgpd with the
# systemd unit (examples/systemd/) which creates and owns that directory.
[global]
asn = 65001
router_id = "10.0.0.1"
listen_port = 179
runtime_state_dir = "/tmp/rustbgpd"
# RFC 8212: an eBGP neighbor with no explicit policy carries nothing in
# that direction, so deleting a chain below fails closed instead of
# silently reverting to permit-all. Startup-only — SIGHUP keeps the
# running value, so changing it takes a daemon restart.
ebgp_requires_policy = true
[global.telemetry]
prometheus_addr = "127.0.0.1:9179"
log_format = "json"
[global.telemetry.grpc_uds]
path = "/tmp/rustbgpd/grpc.sock"
# Audit principal for this local socket (UDS access is gated by file perms);
# mapped to a role in [security.grpc.roles] below.
principal = "operator"
[security.grpc]
# Per-principal gRPC authorization (ADR-0064; default since v0.24.0).
# Roles: observer (sensitive_read) | automation (mutating) | operator (operator_only)
enforcement = "tier"
[security.grpc.roles]
operator = "operator"
# ==========================================================================
# DELIBERATE DEVELOPMENT POSTURE: PERMIT ALL, BOTH DIRECTIONS.
# NOT A PRODUCTION EDGE POLICY.
# ==========================================================================
# Accept every route the peer sends, re-advertise every route selected for
# it, unchanged. Fine for a single peer on a dev box; wrong the moment this
# config faces a network you do not own. Replace both chains with real
# prefix / AS_PATH / community rules before then — see
# `rustbgpd --init-config edge --stdout` for a filtered starting point.
[policy.definitions.permit-all-import]
default_action = "permit"
[policy.definitions.permit-all-export]
default_action = "permit"
[policy]
import_chain = ["permit-all-import"]
export_chain = ["permit-all-export"]
# Import-decision explain, on. `rbgp policy explain --neighbor 10.0.0.2
# --prefix <cidr>` then answers "what did import policy do to this route?"
# — including for routes it denied, which never reach the RIB. It is
# opt-in daemon-wide because the cache is per session and its cost
# multiplies by peer count; with one peer that is a few MiB, so a
# single-peer starter takes it. Written out rather than left to the
# default so the posture is legible either way.
[policy.explain]
enabled = true
[[neighbors]]
address = "10.0.0.2"
remote_asn = 65002
description = "upstream"
hold_time = 90
families = ["ipv4_unicast"]