mirror of
https://github.com/status-im/consul.git
synced 2025-01-12 14:55:02 +00:00
server: add OSS stubs supporting validation of source namespaces in service-intentions config entries (#9527)
This commit is contained in:
parent
0af93a5dfc
commit
03790a1f91
3
.changelog/9527.txt
Normal file
3
.changelog/9527.txt
Normal file
@ -0,0 +1,3 @@
|
||||
```release-note:improvement
|
||||
server: **(Enterprise Only)** Validate source namespaces in service-intentions config entries.
|
||||
```
|
@ -567,6 +567,10 @@ func (e *ServiceIntentionsConfigEntry) validate(legacyWrite bool) error {
|
||||
return fmt.Errorf("Sources[%d].%v", i, err)
|
||||
}
|
||||
|
||||
if err := validateSourceIntentionEnterpriseMeta(&src.EnterpriseMeta); err != nil {
|
||||
return fmt.Errorf("Sources[%d].%v", i, err)
|
||||
}
|
||||
|
||||
// Length of opaque values
|
||||
if len(src.Description) > metaValueMaxLength {
|
||||
return fmt.Errorf(
|
||||
|
7
agent/structs/config_entry_intentions_oss.go
Normal file
7
agent/structs/config_entry_intentions_oss.go
Normal file
@ -0,0 +1,7 @@
|
||||
// +build !consulent
|
||||
|
||||
package structs
|
||||
|
||||
func validateSourceIntentionEnterpriseMeta(_ *EnterpriseMeta) error {
|
||||
return nil
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user