(ctx context.Context, agentID uuid.UUID)
| 300 | } |
| 301 | |
| 302 | func (r *rbacAuthorizer) AuthorizeTunnel(ctx context.Context, agentID uuid.UUID) error { |
| 303 | ws, err := r.db.GetWorkspaceByAgentID(ctx, agentID) |
| 304 | if err != nil { |
| 305 | return xerrors.Errorf("get workspace by agent ID: %w", err) |
| 306 | } |
| 307 | // Authorizes against `ActionSSH` |
| 308 | return r.sshPrep.Authorize(ctx, ws.RBACObject()) |
| 309 | } |
| 310 | |
| 311 | var _ tailnet.TunnelAuthorizer = (*rbacAuthorizer)(nil) |
nothing calls this directly
no test coverage detected