Skip to content

Commit e7e53d4

Browse files
committed
docs: gateway & self-signed certs
1 parent b80756e commit e7e53d4

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

docs/ides/gateway.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,44 @@ explaining this IDE specification.
7474
![Gateway IDE Opened](../images/gateway/gateway-intellij-opened.png)
7575

7676
> Note the JetBrains IDE is remotely installed into `~/.cache/JetBrains/RemoteDev/dist`
77+
78+
## Configuring Gateway to use self-signed certificates
79+
80+
When attempting to connect to a Coder deployment that uses self-signed certificates,
81+
you may receive the following error in Gateway:
82+
83+
```console
84+
Failed to configure connection to https://coder.internal.enterprise/: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
85+
```
86+
87+
To resolve this issue, you will need to add Coder's certificate to the Java trust store
88+
present on your local machine. Here is the default location of the trust store for
89+
each OS:
90+
91+
```console
92+
# Linux
93+
$JAVA_HOME/lib/security/cacerts
94+
/etc/pki/java/cacerts
95+
/etc/ssl/certs/java/cacerts
96+
97+
# macOS
98+
$(/usr/libexec/java_home)/lib/security/cacerts
99+
$(/usr/libexec/java_home)/jre/lib/security/cacerts
100+
101+
# Windows
102+
C:\Program Files (x86)\Java\jre<version>\lib\security\cacerts
103+
```
104+
105+
To add the certificate to the keystore, you can use the `keytool` utility that ships
106+
with Java:
107+
108+
```console
109+
keytool -import -alias coder -file <certificate> -keystore /path/to/trust/store
110+
```
111+
112+
On Windows, you can use `keytool` that ships with the JetBrains Gateway installation.
113+
For example:
114+
115+
```powershell
116+
& 'C:\Program Files\JetBrains\JetBrains Gateway <version>/jbr/bin/keytool.exe' 'C:\Program Files\JetBrains\JetBrains Gateway <version>/jbr/lib/security/cacerts' -import -alias coder -file <cert>
117+
```

0 commit comments

Comments
 (0)