Skip to content

Commit fe2a439

Browse files
committed
authorizer: remove now-obsolete migration code
1 parent c87590b commit fe2a439

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

authorizer/peercaps.go renamed to authorizer/aclgrant.go

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,6 @@ import (
1616
// tailsqlCap is the default name of the tailsql capability.
1717
const tailsqlCap = "tailscale.com/cap/tailsql"
1818

19-
// PeerCaps is a temporary migration alias for ACLGrants.
20-
// Deprecated: Use ACLGrants directly for new code.
21-
func PeerCaps(logf logger.Logf) func(string, *apitype.WhoIsResponse) error {
22-
return ACLGrants(logf)
23-
}
24-
2519
// ACLGrants returns an authorization function that uses ACL grants from the
2620
// tailnet to check access for query sources.
2721
// If logf == nil, logs are sent to log.Printf.
@@ -41,16 +35,8 @@ func ACLGrants(logf logger.Logf) func(string, *apitype.WhoIsResponse) error {
4135
DataSrc []string `json:"src"`
4236
}
4337
rules, err := tailcfg.UnmarshalCapJSON[rule](who.CapMap, tailsqlCap)
44-
45-
// TODO(creachadair): As a temporary measure to allow us to migrate
46-
// capability names away from the https:// prefix, if we don't get a
47-
// result without the prefix, try again with it. Remove this once the
48-
// policy has been updated on the server side.
49-
if err == nil && len(rules) == 0 {
50-
rules, err = tailcfg.UnmarshalCapJSON[rule](who.CapMap, "https://"+tailsqlCap)
51-
}
5238
if err != nil || len(rules) == 0 {
53-
return errors.New("not authorized for access tailsql")
39+
return errors.New("not authorized for access to tailsql")
5440
}
5541
for _, rule := range rules {
5642
for _, s := range rule.DataSrc {

0 commit comments

Comments
 (0)