Documentation ¶
Overview ¶
Package authorizer implements access control helpers for tailsql.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Map ¶
A Map maps source labels to lists of usernames who are granted access to issue queries against that source.
func (Map) Authorize ¶
Authorize returns an authorization function suitable for tailsql.Options.
If a source label is not present in the map, all logged-in users are permitted to query the source. If a source label is present in the map, only logged-in users in the list are permitted to query the source. Tagged nodes are not permitted to query any source.
If logf == nil, logs are sent to log.Printf.
Click to show internal directories.
Click to hide internal directories.