tailcfg: add AcceptEnv field to SSHRule (#13523)
Add an `AcceptEnv` field to `SSHRule`. This will contain the collection of environment variable names / patterns that are specified in the `acceptEnv` block for the SSH rule within the policy file. This will be used in the tailscale client to filter out unacceptable environment variables. Updates: https://github.com/tailscale/corp/issues/22775 Signed-off-by: Mario Minardi <mario@tailscale.com>
This commit is contained in:
@@ -1126,6 +1126,7 @@ func (v SSHRuleView) Principals() views.SliceView[*SSHPrincipal, SSHPrincipalVie
|
||||
|
||||
func (v SSHRuleView) SSHUsers() views.Map[string, string] { return views.MapOf(v.ж.SSHUsers) }
|
||||
func (v SSHRuleView) Action() SSHActionView { return v.ж.Action.View() }
|
||||
func (v SSHRuleView) AcceptEnv() views.Slice[string] { return views.SliceOf(v.ж.AcceptEnv) }
|
||||
|
||||
// A compilation failure here means this code must be regenerated, with the command at the top of this file.
|
||||
var _SSHRuleViewNeedsRegeneration = SSHRule(struct {
|
||||
@@ -1133,6 +1134,7 @@ var _SSHRuleViewNeedsRegeneration = SSHRule(struct {
|
||||
Principals []*SSHPrincipal
|
||||
SSHUsers map[string]string
|
||||
Action *SSHAction
|
||||
AcceptEnv []string
|
||||
}{})
|
||||
|
||||
// View returns a readonly view of SSHAction.
|
||||
|
||||
Reference in New Issue
Block a user