Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var None = labeler.MustParseLabels("__=\"none\"")
None is a special LabelMatcher that matches for no metric, used to deny access to a metric
Functions ¶
This section is empty.
Types ¶
type ACL ¶
ACL holds the parsed Named and Regex metricName to LabelMatchers
func (*ACL) GetLabelMatchers ¶
GetLabelMatchers checks in order against exact the NamedACL, a RegexACL and the fallback '*' ACL and returns the corresponding LabelMatchers
func (*ACL) ParseAndStoreACL ¶
ParseAndStoreACL parses the metricName if its a NamedACL or a RegexACL and the query for all supported query types (see parseLabels)
type ACLMap ¶
ACLMap is used to look up OidcRole for its configures ACL
func (ACLMap) GetDenyACL ¶
GetDenyACL provides a empty ACL that deny access to any metric
type Config ¶
type Config struct { Listen string `envconfig:"LISTEN" default:":8080"` URL string `envconfig:"URL" default:"http://localhost:8080"` PrometheusURL string `envconfig:"PROMETHEUS_URL" default:"http://localhost:9090"` CookieSecret []byte `envconfig:"COOKIE_SECRET"` AuthProvider string `envconfig:"AUTH_PROVIDER" default:"oidc"` OidcIssuer string `envconfig:"OIDC_ISSUER" required:"true"` OidcClientID string `envconfig:"OIDC_CLIENT_ID" required:"true"` OidcClientSecret string `envconfig:"OIDC_CLIENT_SECRET" required:"true"` OidcRolesClaim string `envconfig:"OIDC_ROLES_CLAIM" default:"roles"` ACLFile string `envconfig:"ACL_FILE" default:"prometheus-acls.yml"` ACLMap ACLMap }
Config holds the configuration
type NamedACL ¶
type NamedACL map[MetricName][]*labels.Matcher
NamedACL hold the LabelMatchers for a specific MetricName
Click to show internal directories.
Click to hide internal directories.