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
79
80
81
82
83
84
# CPEX Plugin Demo Configuration
#
# Three plugins, policy groups with tag-based activation,
# and routes that map tools to different plugin combinations.
plugin_settings:
routing_enabled: true
plugin_timeout: 30
global:
policies:
# "all" is reserved — these plugins fire on every invocation
all:
plugins:
# "pii" group — activated when a route has the "pii" tag
pii:
plugins:
# "external_authz" group — activated when a route has the
# "needs_remote_authz" tag. Fires the async RemoteAuthz plugin.
external_authz:
plugins:
plugins:
- name: identity-resolver
kind: builtin/identity
hooks:
mode: sequential
priority: 10
on_error: fail
- name: pii-guard
kind: builtin/pii
hooks:
mode: sequential
priority: 20
on_error: fail
config:
clearance_level: confidential
# Awaiting plugin — its `handle` body uses `.await` for a
# (simulated) remote authz call on cache miss. Wired in exactly
# the same way as plugins whose `handle` body has no `.await`;
# registration is identical either way.
- name: remote-authz
kind: builtin/remote_authz
hooks:
mode: sequential
priority: 30
on_error: fail
- name: audit-logger
kind: builtin/audit
hooks:
mode: fire_and_forget
priority: 100
on_error: ignore
routes:
# HR compensation tool — contains PII, gets full security stack
- tool: get_compensation
meta:
tags:
plugins:
- audit-logger
# Public department listing — standard security only
- tool: list_departments
plugins:
- audit-logger
# Tool that requires remote authz — triggers the async plugin
# on top of the standard "all" policy stack. The "external_authz"
# tag matches the policy group of the same name, which fires
# remote-authz.
- tool: query_external_data
meta:
tags:
plugins:
- audit-logger
# Wildcard — catch-all for unmatched tools
- tool: "*"
plugins:
- audit-logger