feat: update review parsing and serialization #22
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.
Resolves #20
Resolves #18
Resolves #11
Resolves #10
Minimum STIG Manager API version is updated from 1.1.0 => 1.2.7
Adds support for the
resultEngine
property of ReviewThe serializers now attempt to fetch configuration options from
Collection.metadata.importOptions
. If this metadata property is absent, a default configuration object which mimics previous serialization behavior is used. Support for configuring custom options will be considered in future PRs. See the STIG Manager API definition for property descriptions.The serializers now reference Collection field and status settings when calculating whether an
autoStatus
setting can be honored.Watcher now requests scope
stig-manager:user:read
from the OIDC Provider. If Watcher's token does not include this scope, Watcher is unable to honor the Collection propertymetadata.importOptions.autoStatus = 'accepted'
(See below).The serializers will optionally reference Collection Grant settings in order to calculate whether an
autoStatus = "accepted"
setting can be honored. Watcher now attempts to call API endpoint/user
to learn the Watcher userId. If Watcher is denied access to this endpoint (most likely because Watcher's token is missing scopestig-manager:user:read
) it will not attempt to setaccepted
status on any Reviews.To avoid Collection settings and metadata from becoming excessively stale, Watcher now makes calls to
/collection/{collectionId}
and/user
at ten minute intervals. Support for configuring this interval will be considered in future PRs, as will alternative approaches to polling.