NAS-138422 / 25.10.1 / Auditing "get" optimization and test fixes (by anodos325) (#17558)
This commit allows audit.query consumers to specify `get` without
providing a `limit` and adjusts backend query-options construction so
that `git` implies `limit = 1`. We can safely do this now because all
filtering / ordering is now handled by the SQL statement we construct.
The commit also introduces some minor test fixes.
Original PR: https://github.com/truenas/middleware/pull/17550
Co-authored-by: Andrew Walker <awalker at ixsystems.com>
NAS-138427 / 25.10.1 / auditing: maintain proper typing during json_extract (by anodos325) (#17560)
This commit ensures type consistency after audit result rows have been
shifted. This is primarily concerned with JSON data that was extracted
from keys within a nested JSON structure. For example moving
service_data["credentials"] to credentials like when we're generating
report of audited methods in ixdiagnose.
Original PR: https://github.com/truenas/middleware/pull/17555
Co-authored-by: Andrew Walker <andrew.walker at truenas.com>
NAS-138431 / 25.10.1 / Fix up some typos in jsonpath module (by mgrimesix) (#17559)
A typo in a string and a cut-n-paste typo in an exception handler
Original PR: https://github.com/truenas/middleware/pull/17557
Co-authored-by: Mark Grimes <mark.grimes at ixsystems.com>
NAS-138427 / 26.04 / auditing: maintain proper typing during json_extract (#17555)
This commit ensures type consistency after audit result rows have been
shifted. This is primarily concerned with JSON data that was extracted
from keys within a nested JSON structure. For example moving
service_data["credentials"] to credentials like when we're generating
report of audited methods in ixdiagnose.
NAS-138422 / 26.04 / Auditing "get" optimization and test fixes (#17550)
This commit allows audit.query consumers to specify `get` without
providing a `limit` and adjusts backend query-options construction so
that `git` implies `limit = 1`. We can safely do this now because all
filtering / ordering is now handled by the SQL statement we construct.
The commit also introduces some minor test fixes.
NAS-138389 / 25.10.1 / Fix tests for audit backend changes (by anodos325) (#17536)
This commit fixes a variety of CI tests that are now failing because the
`limit` query-option is now mandatory for audit.query
Original PR: https://github.com/truenas/middleware/pull/17526
Co-authored-by: Andrew Walker <awalker at ixsystems.com>
NAS-138389 / 26.04 / Fix tests for audit backend changes (#17526)
This commit fixes a variety of CI tests that are now failing because the
`limit` query-option is now mandatory for audit.query
(cherry picked from commit e13ba694d473541312156ee527654cda96bc6c03)
NAS-138406 / 25.10.1 / Add optimized select and select as for audit db (by anodos325) (#17538)
This commit re-adds ability to SELECT AS for audit queries and ensures
that sqlalchemy is only selecting the requested columns. The same logic
is not copied to datastore plugin since we aren't handling such a large
volume of data there.
Original PR: https://github.com/truenas/middleware/pull/17535
Co-authored-by: Andrew Walker <awalker at ixsystems.com>
audit - maintain proper types during SELECT AS
This commit ensures type consistency after audit result rows have
been shifted. This is primarily concerned with JSON data that was
extracted from keys within a nested JSON structure. For example
moving service_data["credentials"] to credentials.
NAS-138423 / 25.10.1 / Convert a DNS Resolver error into ValidationError (by anodos325) (#17554)
This commit changes a messy looking error into something that the UI can
handle and gives the user something more to work with than a generic
explanation of lifetime timeout details.
Original PR: https://github.com/truenas/middleware/pull/17551
---------
Co-authored-by: Andrew Walker <andrew.walker at truenas.com>
Have sqlalchemy recast extracted JSON into JSON type
This commit has sqlalchemy recast extract JSON into proper
type so that the generated response is properly typed (for
example credentials extracted are a dictionary rather than
a JSON string).
Convert a DNS Resolver error into ValidationError
This commit changes a messy looking error into something that the
UI can handle and gives the user something more to work with than
a generic explanation of lifetime timeout details.
(cherry picked from commit f17879f5a56c6efb508a08fed9fc34a8ba8db8e3)
NAS-138423 / 26.04 / Convert a DNS Resolver error into ValidationError (#17551)
This commit changes a messy looking error into something that the UI can
handle and gives the user something more to work with than a generic
explanation of lifetime timeout details.