Is your feature request related to a specific problem?
For ethyca/fides#3315, we've discussed leveraging the meta
attribute on the System
model/class to pass in some arbitrary metadata. For that use case, it could be useful to specify nested JSON objects (ideally of arbitrary depth), rather than the "flat" (i.e. depth of 1) objects/dictionaries that are required currently based on the type annotation of Optional[Dict[str, str]]
.
@TheAndrewJackson also noted (in ethyca/fides#3315) that this was a requirement he needed for the webscanner demo.
Describe the solution you'd like
Could we allow for nested JSON objects of arbitrary depth for the meta
attributes (of System
and probably of Dataset
too, for consistency)?
e.g.
{
"saas_config": {
"type":"stripe",
"icon":"***",
}
}
or
{
"web_scan": {
"domains": [
{
"url": "***",
"cookies": [
"***",
"***",
"***",
]
}
]
}
}
I think this may be as simple as updating the type annotations to Optional[Dict[str, Any]]
?
Describe alternatives you've considered, if any
There may be some unforeseen implications of making this change -- is it possible that any dependent code (either in our, i.e. Ethcya's, code base or anyone else who uses fideslang
) is depending on the stricter typing that's in place, and if so, would this change be disruptive?
Additionally, it would be good to understand the original motivation behind the stricter typing, if that was a deliberate decision.
If we judge that updating the type annotation on the meta
property to be more permissive is not a good path forward, then we could create another property that allows for nested dictionaries (of arbitrary length) for arbitrary metadata. This feels pretty messy, though - especially considering we already have a fidesctl_meta
attribute (that holds more strictly-typed system metadata)...
Additional context
This is motivated by the work to more explicitly tie System
s to saas connector types. See ethyca/fides#3315 for some more detail on that use case.
cc @TheAndrewJackson @galvana