Skip to content
This repository has been archived by the owner on Feb 25, 2021. It is now read-only.

Return all policy validation errors on parse failure #29

Open
micahlee opened this issue Aug 19, 2020 · 0 comments
Open

Return all policy validation errors on parse failure #29

micahlee opened this issue Aug 19, 2020 · 0 comments

Comments

@micahlee
Copy link
Contributor

micahlee commented Aug 19, 2020

The policy parser currently errors and returns the first policy error encountered. We should evaluate the feasibility of returning all detectable violations in a policy document at once on failure to support fixing more than one at a time.

See as an example: https://github.com/cyberark/conjur-policy-parser/pull/28/files#diff-96c32d844ea28af01851870a8cf2454b

- !host
  id: a-host
  restricted_to: [ first_invalid_cidr, second_invalid_cidr ]

Currently this only fails with:

Error at ... Invalid IP address or CIDR range 'first_invalid_cidr'

Ideally this would fail with:

Error at ... Invalid IP address or CIDR range 'first_invalid_cidr'
Error at ... Invalid IP address or CIDR range 'second_invalid_cidr'
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

1 participant