Skip to content

Commit

Permalink
[CRE-44] Add restricted_config and restricted_keys to capability regi…
Browse files Browse the repository at this point in the history
…stry config
  • Loading branch information
cedric-cordenier committed Jan 15, 2025
1 parent 4e61572 commit 10744a9
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 15 deletions.
8 changes: 7 additions & 1 deletion pkg/capabilities/capabilities.go
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,13 @@ func (c *RemoteExecutableConfig) ApplyDefaults() {
}

type CapabilityConfiguration struct {
DefaultConfig *values.Map
DefaultConfig *values.Map
// RestrictedKeys is a list of keys that can't be provided by users in their
// configuration; we'll remove these fields before passing them to the capability.
RestrictedKeys []string
// RestrictedConfig is configuration that can only be set by us; this
// takes precedence over any user-provided config.
RestrictedConfig *values.Map
RemoteTriggerConfig *RemoteTriggerConfig
RemoteTargetConfig *RemoteTargetConfig
RemoteExecutableConfig *RemoteExecutableConfig
Expand Down
51 changes: 37 additions & 14 deletions pkg/capabilities/pb/registry.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions pkg/capabilities/pb/registry.proto
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,8 @@ message CapabilityConfig {
RemoteTargetConfig remote_target_config = 3;
RemoteExecutableConfig remote_executable_config = 4;
}

values.Map restricted_config = 5;
repeated string restricted_keys = 6;
}

0 comments on commit 10744a9

Please sign in to comment.