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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support insecure flag on Config #59

Closed
wants to merge 1 commit into from
Closed

feat: support insecure flag on Config #59

wants to merge 1 commit into from

Conversation

mattrobenolt
Copy link
Member

  • Allows passing 'insecure' bool. This has no production ramifications,
    if someone were to do this, we don't even listen on port 80. The
    application is for local dev, or in other unique environments. This is
    a common pattern to have secure-by-default, but opt into insecure with
    an explicit flag, see grpc-go APIs.
  • Unifies a bit of url building, and adopt a more service/method
    pattern

If you can guide me on how to write a test for this, that'd be great. This is all foreign to me. 馃槆

* Allows passing 'insecure' bool. This has no production ramifications,
  if someone were to do this, we don't even listen on port 80. The
  application is for local dev, or in other unique environments. This is
  a common pattern to have secure-by-default, but opt into insecure with
  an explicit flag, see grpc-go APIs.
* Unifies a bit of url building, and adopt a more service/method
  pattern
@dgraham
Copy link
Member

dgraham commented Aug 24, 2022

When testing against the local development server we've been adding this to test script and accepting the self-signed certificate with a browser so it's added to the keychain.

process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = '0'

We can't publish a product with an insecure mode, so does this unblock you or is there another workaround needed?

@mattrobenolt
Copy link
Member Author

It doesn't unblock me because locally, I have a non-https server running, so I'll need to figure an alternative route or just keep this patch applied locally for myself.

I would still strongly say this isn't any insecurity for production since production servers don't even listen on 80, so a connection cannot be established and no data would be transmitted insecurely.

Tangentially, I'm exploring a building a local emulator/simulator https://github.com/mattrobenolt/ps-http-sim which has been nice for me to test with rather than a real edge environment.

@dgraham
Copy link
Member

dgraham commented Aug 24, 2022

I'm exploring a building a local emulator/simulator

Oh, cool! That could be useful for me too. I'll close this out for now.

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.

None yet

2 participants