mirror of https://github.com/status-im/consul.git
server: add OSS stubs supporting validation of source namespaces in service-intentions config entries (#9527)
This commit is contained in:
parent
b1958e6933
commit
30c3af893a
|
@ -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(
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
// +build !consulent
|
||||
|
||||
package structs
|
||||
|
||||
func validateSourceIntentionEnterpriseMeta(_ *EnterpriseMeta) error {
|
||||
return nil
|
||||
}
|
Loading…
Reference in New Issue