sdx token, path validation and activity update - #270
Merged
Merged
Conversation
- implemented validation methods and unit tests - added validation check to endpoints
APS-3732 Path-level validation for sdx related routes
* cleanup the action type * fix sonarqube for pr
| except Exception as ex: | ||
| traceback.print_exc() | ||
| log.error("%s - %s" % (namespace, " Route Path Validation Errors: %s" % ex)) | ||
| abort_early(event_id, 'publish', namespace, jsonify(error="Validation Errors:\n%s" % ex)) |
| except Exception as ex: | ||
| traceback.print_exc() | ||
| log.error("%s - %s" % (namespace, " Route Path Validation Errors: %s" % ex)) | ||
| abort_early(event_id, 'publish', namespace, jsonify(error="Validation Errors:\n%s" % ex)) |
|
Co-authored-by: Russell Vinegar <russell.vinegar@gov.bc.ca>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.


Summary
This PR introduces route path-level validation for the Gateway API and brings the sdxStepTokenApi
OpenAPI spec into compliance with CSIT API governance standards.
Changes
Gateway API — Route Path Validation (APS-3732)
validate_route_paths/validate_route_pathtoutils/validators.py, enforcing that every route pathin a published config matches a namespace's allowed
perm-route-paths(error codee7).v1andv2write_configflows, gated by a per-data-planeenforce-route-pathsflag.published→publishon sync completion.tests/routes/v1/test_sdx.py,tests/routes/v2/test_sdx.py, andtests/utils/test_validate_route_paths.py, plus test package__init__.pyfiles and updatedconftest.py/config/test.json.sdxStepTokenApi — OpenAPI / Governance Compliance
models.py(TokenRequest,TokenResponse,HTTPValidationError)./token→/tokens, addedoperation_idand documented200/422responses.openapi.jsonspec and expandedapp.pyto support spec generation/serving.CI / Tooling
.spectral.yamlextending the BCGov CSIT API governance ruleset for spec linting.pr-build.ymlto usesonarqube-scan-action@v8.1.0and fixed YAML indentation.