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

(did:web) temporarily relax https requirement #147

Merged
merged 3 commits into from
May 13, 2024
Merged

(did:web) temporarily relax https requirement #147

merged 3 commits into from
May 13, 2024

Conversation

mistermoe
Copy link
Contributor

@mistermoe mistermoe commented May 13, 2024

Summary

resolving a did:web did containing localhost or an ipv4 address will use http as the scheme instead of https

Motivation

Local development is quite difficult with https. Adding a temporary workaround until i can set aside some time to find an easy way to set up local certs without requiring TLS termination at the application layer (will likely just put nginx in front of whatever service im testing, set it up with a cert and have it terminate)

Concretely, running into this error while working on DIDPay when testing from an actual device

image

Changes

  • refactored DecodeID to remove some duplicative parsing / checks between DecodeID and ResolveWithContext
  • renamed DecodeID -> TransformID.
  • added more test coverage

Copy link
Contributor

@KendallWeihe KendallWeihe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

Copy link
Contributor

@tomdaffurn tomdaffurn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if there's a way to keep the changes permanently, as a dev-only option. Insecure options for testing are fine, if they're not the default

@mistermoe mistermoe merged commit ac63881 into main May 13, 2024
5 checks passed
@mistermoe mistermoe deleted the didweb-http branch May 13, 2024 17:26
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.

3 participants