diff --git a/stores/yaml/store.go b/stores/yaml/store.go index 5d5c41d8d..3bdefcea3 100644 --- a/stores/yaml/store.go +++ b/stores/yaml/store.go @@ -329,12 +329,6 @@ func (store *Store) LoadPlainFile(in []byte) (sops.TreeBranches, error) { if err != nil { return nil, fmt.Errorf("Error unmarshaling input YAML: %s", err) } - // Prevent use of reserved keywords - for _, item := range branch { - if item.Key == stores.SopsMetadataKey { - return nil, fmt.Errorf("YAML doc used reserved word '%v'", item.Key) - } - } branches = append(branches, branch) } return branches, nil diff --git a/stores/yaml/store_test.go b/stores/yaml/store_test.go index 5c8a59953..13db5cbfe 100644 --- a/stores/yaml/store_test.go +++ b/stores/yaml/store_test.go @@ -418,14 +418,3 @@ rootunique: assert.Equal(t, `yaml: unmarshal errors: line 3: mapping key "hello" already defined at line 2`, err.Error()) } - -func TestReservedAttributes(t *testing.T) { - data := ` -hello: Sops config file -sops: The attribute 'sops' must be rejected, otherwise the file cannot be opened later on -` - s := new(Store) - _, err := s.LoadPlainFile([]byte(data)) - assert.NotNil(t, err) - assert.Equal(t, `YAML doc used reserved word 'sops'`, err.Error()) -}