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

Add requestCert support to the server #1029

Merged
merged 1 commit into from
Aug 30, 2017

Conversation

dbk91
Copy link
Contributor

@dbk91 dbk91 commented Aug 9, 2017

Add this configuration flag to request a client's certificate for 2-way PKI authentication.
Issue #1011

The motivation for this feature proposal is to allow create-react-app to enable the instance of webpack-dev-server to request the client certificate for 2-way PKI auth.

The issue actually doesn't lie in webpack-dev-server itself (configuration is much easier when using webpack-dev-server by itself), but rather that create-react-app only sends a boolean to webpack-dev-server. Here is the line I am referencing: https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/config/webpackDevServer.config.js#L81

From what I can tell, this means that the configuration options for webpack-dev-server are limited to the key, cert, ca, and passphrase when using create-react-app. Minimizing configuration seems to be create-react-app's goal (which I totally understand) but a feature like this would be nice to have in development.

I simply just added the requestCert field to the configuration if webpack-dev-server receives https as a boolean rather than an object. Defaults to false if it is no specified.

Add this configuartion flag to request a client's certificate for 2-way PKI authentication.
@jsf-clabot
Copy link

jsf-clabot commented Aug 9, 2017

CLA assistant check
All committers have signed the CLA.

@codecov
Copy link

codecov bot commented Aug 9, 2017

Codecov Report

Merging #1029 into master will decrease coverage by 0.15%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #1029      +/-   ##
=========================================
- Coverage   72.25%   72.1%   -0.16%     
=========================================
  Files           4       4              
  Lines         465     466       +1     
  Branches      139     140       +1     
=========================================
  Hits          336     336              
- Misses        129     130       +1
Impacted Files Coverage Δ
lib/Server.js 79.57% <ø> (-0.25%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update da188a6...f1af78e. Read the comment docs.

Copy link
Contributor

@shellscape shellscape left a comment

Choose a reason for hiding this comment

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

one metadata request and some conflicts to resolve and we should be good to go to get this into 2.8.0

@@ -145,6 +145,10 @@
"description": "The passphrase to a (SSL) PFX file.",
"type": "string"
},
"requestCert": {
"description": "Enables request for client certificate.",
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add "This is passed directly to the https server" to the description so folks know what the purpose is, since there are some mixed-use child properties in the https property.

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