opentdf / platform

Persistent data centric security that extends owner control wherever data travels
BSD 3-Clause Clear License
18 stars 9 forks source link

Policy: GetAttributesByValueFqns RPC request validation should happen in protovalidate rules #1651

Open ryanulit opened 4 days ago

ryanulit commented 4 days ago

Background

Originally brought up in a separate PR: https://github.com/opentdf/platform/pull/1633/files/e34689983f9be1b52af49254f5ccfa7eb8baf5f9#r1801590942

The request validation checks at the beginning of the RPC method should be moved to protovalidate rules. Additionally, see comments below for other changes.

Acceptance Criteria

ryanulit commented 3 days ago

After further discussion with @jakedoublev and @jrschumacher, we've decided the FQN /value/ format validation is no longer necessary and can be removed since the request will return Not Found if any of the FQNs are invalid. Additionally, r.GetWithValue() is not even used anywhere in the GetAttributesByValueFqns DB layer function except for required request validation, so this will be made optional now but remain on the request proto for future use. The description will be updated accordingly.