DXCDT-537: Removing minor validation to enable easier importing of auth0_guardian
#820
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🔧 Changes
When importing
auth0_guardian
with a config-driven import, it is possible that generated configuration be invalid. In particular if thephone
block is disabled or not defined. The result is this error:We investigated this issue pretty thoroughly and there is not a simple way of addressing in a more idiomatic way, through the flattens or expands. This is made more difficult by the Management API which can return empty phone providers and empty-set message types.
An important note – in practical terms, it would be rare to configure the message types without a provider but it is technically possible because they are administered with separate endpoints. Because of this, this validation is lax but still correct.
📚 References
🔬 Testing
All tests should pass. Also manually verified with config-driven imports.
📝 Checklist