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 instructions for self signed certicate #618

Merged
merged 1 commit into from
Jul 16, 2018

Conversation

velo
Copy link
Contributor

@velo velo commented Jul 14, 2018

Create doc with the workaround discuessed on #543 (comment)

@coollog
Copy link
Contributor

coollog commented Jul 15, 2018

Hi @velo , thanks for writing up this extensive documentation! We'll take a look at this soon :)

@coollog coollog requested a review from a team July 15, 2018 03:25
Copy link

@Hi-Fi Hi-Fi left a comment

Choose a reason for hiding this comment

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

Maybe just adding the default password (changeit) to document, too?

I think it should also work with -D argument, but I didn't tested that.

@velo
Copy link
Contributor Author

velo commented Jul 15, 2018

just adding the default password

What password? Not sure what you mean.

@Hi-Fi
Copy link

Hi-Fi commented Jul 16, 2018

Default password for Java keystore, that is "changeit". I think it should be in document.

@velo
Copy link
Contributor Author

velo commented Jul 16, 2018

Mine was not password protected, which step was that?

@Hi-Fi
Copy link

Hi-Fi commented Jul 16, 2018

At the end of step one it can mentioned, that

By default Oracle Java's keystore is password protected. If that's the case (and password hasn't been changed), the password Keystrore explorer asks is "changeit".

@kaikramer
Copy link

To help with the confusion about the password protection of cacerts: Since version 5.2 KeyStore Explorer automatically tries to open cacerts with the default password ("changeit"). It only prompts for a password if this fails.

Copy link
Member

@briandealwis briandealwis left a comment

Choose a reason for hiding this comment

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

Thanks @velo for this contribution! I made a couple of suggestions.

@@ -0,0 +1,51 @@
# Accessing private docker registry with self signed certificate

Currently, `jib` do not support docker registries with self signed `https` certificate.
Copy link
Member

Choose a reason for hiding this comment

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

do not -> does not
self signed certificate -> self-signed certificates


## Using KeyStore Explorer

The easiest way to import the self signed certificate into jvm is using the [KeyStore Explorer](http://keystore-explorer.org/).
Copy link
Member

Choose a reason for hiding this comment

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

the self signed -> a self-signed
jvm -> JVM


Currently, `jib` do not support docker registries with self signed `https` certificate.

The only way to get `jib` working is to import the self signed certificate into jvm `CA Certificates Keystore`.
Copy link
Member

Choose a reason for hiding this comment

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

How about:

Jib uses the JRE's list of approved CA Certificates to validate SSL certificates. The following instructions describe how to add a registry's self-signed certificate to the JRE's approved CAs.

Copy link
Member

Choose a reason for hiding this comment

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

How about also adding

"The certificate will be trusted at the JRE level, affecting all Java applications running on it. You will also need to re-import the certificate when you use a different JRE or upgrade it."


### Import certificate

* Launch `KeyStore Explorer`
Copy link
Member

Choose a reason for hiding this comment

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

My 2¢: it would be easier to have the user use Open an existing KeyStore and navigate to the cacerts file (with default password changeit).

Then there are two approaches:

  • if the user has the self-signed certificate, they can import it.
  • if they don't have the self-signed certificate, they can import it from the running service with the Examine SSL option. It allows importing the certificate directly into the keystone.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess this import process has multiple possible ways to be done.... I describe the one I used

@velo velo force-pushed the self_sign_cert branch from 207443e to 85cb0ba Compare July 16, 2018 21:15
@velo velo force-pushed the self_sign_cert branch from 85cb0ba to 5a9bf61 Compare July 16, 2018 21:15
@velo
Copy link
Contributor Author

velo commented Jul 16, 2018

@chanseokoh @briandealwis changes applied

Copy link
Member

@chanseokoh chanseokoh left a comment

Choose a reason for hiding this comment

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

Thanks! This looks good and will work.

@coollog coollog merged commit 097d21f into GoogleContainerTools:master Jul 16, 2018
@velo velo deleted the self_sign_cert branch July 16, 2018 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants