GrpcMethodAllowlist

Type Alias GrpcMethodAllowlist 

Source
pub type GrpcMethodAllowlist = Arc<HashSet<String>>;
Expand description

Set of /package.Service/Method paths that are safe to use as metric labels.

Services are mounted with the wildcard route /{ServiceName}/{*rest}, so any path under a registered prefix matches a route and would otherwise be taken verbatim as a path label. Bounding the labels to known methods prevents an unauthenticated attacker from inflating Prometheus label maps (which the prometheus crate retains for the lifetime of the process) by streaming requests with random method suffixes.

Aliased Typeยง

pub struct GrpcMethodAllowlist { /* private fields */ }