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

Fix browser prompting ERR_CERT_INVALID for direct HTTPS access #4860

Merged
merged 4 commits into from
Feb 6, 2020

Conversation

oneoneonepig
Copy link
Contributor

The notBefore and notAfter x509 field is missing when creating the certificate, causing the certificate to have no valid date information. The notBefore and notAfter decodes to "00010101000000Z", which seems like a "GeneralizedTime" according to RFC5280 and decodes to something like 0001/1/1, eventually causing the browser to prompt certificate error.

If the self-signed certificate is invalid because of the duration, subject name, insecure algorithm or EKU, user should be able to skip the certificate invalid prompt since most of the self-signed certificate are for developing.

Also I've modified the deployment YAMLs so that the self-signed certificates can show proper subject name instead of leaving it empty.

Signed-off-by: Jeffrey Chu <peihuachu1112@gmail.com>
Signed-off-by: Jeffrey Chu <peihuachu1112@gmail.com>
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Feb 4, 2020
@k8s-ci-robot
Copy link
Contributor

Welcome @oneoneonepig!

It looks like this is your first PR to kubernetes/dashboard 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/dashboard has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Feb 4, 2020
@oneoneonepig
Copy link
Contributor Author

Fixes #2947

aio/deploy/recommended.yaml Outdated Show resolved Hide resolved
Signed-off-by: Jeffrey Chu <peihuachu1112@gmail.com>
@floreks
Copy link
Member

floreks commented Feb 5, 2020

/lgtm

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Feb 5, 2020
Signed-off-by: Jeffrey Chu <peihuachu1112@gmail.com>
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 6, 2020
@codecov
Copy link

codecov bot commented Feb 6, 2020

Codecov Report

Merging #4860 into master will increase coverage by <.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #4860      +/-   ##
=========================================
+ Coverage   45.39%   45.4%   +<.01%     
=========================================
  Files         214     214              
  Lines        9978    9983       +5     
  Branches       94      94              
=========================================
+ Hits         4530    4533       +3     
- Misses       5184    5185       +1     
- Partials      264     265       +1
Impacted Files Coverage Δ
src/app/backend/cert/ecdsa/creator.go 15% <0%> (-1%) ⬇️
src/app/backend/sync/secret.go 73.26% <0%> (+2.97%) ⬆️

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 922a761...cd05d10. Read the comment docs.

@shu-mutou
Copy link
Contributor

/lgtm
Thanks!! I could confirm that NET::ERR_CERT_INVALID was changed to NET::ERR_CERT_AUTHORITY_INVALID and we can proceed anyway, i.e. using link Proceed to localhost (unsafe).

Screenshot from 2020-02-06 15-52-32

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 6, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: floreks, oneoneonepig, shu-mutou

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 9847fec into kubernetes:master Feb 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants