Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add universal resolver #1866

Merged

Conversation

dbluhm
Copy link
Contributor

@dbluhm dbluhm commented Jul 19, 2022

This PR merges the universal resolver plugin into main ACA-Py. This PR adds a couple new CLI args to configure usage of the universal resolver.

By default, the universal resolver is NOT loaded. If the --universal-resolver flag is given, without arguments, it will default to using https://dev.uniresolver.io for convenience. We might want to add language somewhere discouraging people from using this endpoint all the time. We should encourage people to use --universal-resolver https://my.universal.resolver.com to point to their own deployed universal resolver instance.

By default, if the resolver is loaded, it will retrieve properties from the universal resolver and use that to compile a regex that matches all supported DIDs. This regex will be used to determine if a given DID is supported by the resolver. Alternatively, the user can specify --universal-resolver-regex regex-one regex-two regex-three to manually configure what DIDs should be supported by the universal resolver. This is useful when you want to limit usage of the universal resolver to a known "trustworthy" set of DIDs or similar. The arguments to --universal-resolver-regex are compiled into a single regex on startup.

cc @swcurran

Signed-off-by: Daniel Bluhm <dbluhm@pm.me>
Signed-off-by: Daniel Bluhm <dbluhm@pm.me>
Signed-off-by: Daniel Bluhm <dbluhm@pm.me>
Signed-off-by: Daniel Bluhm <dbluhm@pm.me>
@codecov-commenter
Copy link

codecov-commenter commented Jul 20, 2022

Codecov Report

Merging #1866 (1c7af93) into main (b6c1f1f) will decrease coverage by 0.05%.
The diff coverage is 62.50%.

@@            Coverage Diff             @@
##             main    #1866      +/-   ##
==========================================
- Coverage   93.72%   93.66%   -0.06%     
==========================================
  Files         536      537       +1     
  Lines       34043    34107      +64     
==========================================
+ Hits        31907    31947      +40     
- Misses       2136     2160      +24     

@dbluhm
Copy link
Contributor Author

dbluhm commented Jul 20, 2022

I'll put some time into covering those missed lines

@swcurran swcurran merged commit 4b1fa13 into openwallet-foundation:main Jul 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants