This repository was archived by the owner on Feb 4, 2026. It is now read-only.
Fix request logging middleware#84
Closed
kentbull wants to merge 99 commits intohyperledger-labs:mainfrom
Closed
Conversation
Signed-off-by: Kevin Griffin <griffin.kev@gmail.com>
Signed-off-by: Kevin Griffin <griffin.kev@gmail.com>
Signed-off-by: Kevin Griffin <griffin.kev@gmail.com>
Signed-off-by: Kevin Griffin <griffin.kev@gmail.com>
Signed-off-by: Kevin Griffin <griffin.kev@gmail.com>
Signed-off-by: Kevin Griffin <griffin.kev@gmail.com>
Signed-off-by: Kevin Griffin <griffin.kev@gmail.com>
Signed-off-by: Kevin Griffin <griffin.kev@gmail.com>
wip - updating to 1.2+ fixing tests and build
Signed-off-by: Kevin Griffin <griffin.kev@gmail.com>
Signed-off-by: Kevin Griffin <griffin.kev@gmail.com>
Fix KERIpy iterators, logging, docker build, constants imports
PEP 3333 compatibility requires the URL path be URL encoded which breaks resolution. So we will have to detect URL encoded paths, decode them, and construct a DID string with the port properly URL encoded while the rest of the colons in the DID remain unencoded.
Using the inner self.resolve_oobi requires use of yield from in order to direct the HIO Doist to run the sub-generator.
We should not be using the OOBI parameter to resolve keystate to then allow for DID artifact resolution. Instead we should only be generating did.json and keri.cesr artifacts for KELs, TELs, and ACDCs from only the local keystore. Building a did:webs DID artifact generator for any resolved KERI AID is a separate project and is out of scope for this resolver. Many tests were added in this commit which caused many small refactorings to make things more testable and to make consistent APIs.
Refactored to make testing easier and to ensure consistent Regery and Reger database usage. Moved requote to didding where it belongs. Made a few more small functions for testability.
it was determined that OOBI resolution is critical for did:keri resolution because there is not enough information in a did:keri to know where to resolve it from, thus an OOBI is required for anything that is non-local.
… gen ends This adds integration tests for the endpoints that dynamically generate did.json and keri.cesr files. It also adds a feature for auto-wrapping a did.json document in did resolution metadata when the metadata is requested, which is useful and avoids unnecessary error responses when static did.json files do not have resolution metadata. This also adds request logging for did.json and keri.cesr file resolution for log monitoring usability.
The delegation chain is necessary when using delegated identifiers. This fixes that. The missing ACDC anchor was a long-standing bug that prevented generation of both equivalentIds and alsoKnownAs based on the keri.cesr since the anchor tieing the designated aliases ACDC to the KEL for the AID being resolved was missing from the keri.cesr CESR stream.
…ead of 'null' for None And this commit has many related testing and slight refactoring additions.
The Docker Compose setup uses the test-resolutions.sh script to show sample usage of this repo. This is added to make it clear how to use the did:webs resolver.
The spec says to use https, not http, for the did.json and keri.cesr files. This corrects that mistake and also adds a fallback from https to http for local testing and for a nice feature for those who do not want to set up https.
Refactor to non-hardcoded controller use small functions
Getting the port from X-Forwarded-Port allows the DIDWebsResourceEnd to generate the correct did:webs did for proxied deployments of this resource. This does depend on the proxy sending the X-Forwarded-Port through.
…esolution-content-type feat: application/did-resolution for DID HTTP Binding and X-Forwarded-Port for proxy config
The Revery was not added to the Kevery prior to parsing and as such was dropping reply messages. This reordering of instantiation and passing of rvy to Kevery fixes that.
Use of the requests library is temporarily employed since the exception handling is there and tested. Moving to HIO for simple URL requests will occur in the future.
It was decided that the name "dws" is more in line with what people would expect from this repository so the package name was changed from "dkr", which was a holdover from the did:keri work, to "dws" to illustrate the primary nature of the repository of serving as a did:webs DID resolver.
…ve-bug fix: loc scheme record save bug
The prior version of the RequestLoggerMiddleware would consume the request body stream with req.stream.read() which broke things because the stream is a one-shot IO read meaning that the stream must be reset in order to be later consumed by the Falcon HTTP request handler. The logging was also updated to use placeholders rather than f-strings for performance.
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
The prior version of the RequestLoggerMiddleware would consume the request body stream with req.stream.read() which broke things because the stream is a one-shot IO read meaning that the stream must be reset in order to be later consumed by the Falcon HTTP request handler. The logging was also updated to use placeholders rather than f-strings for performance.