Skip to content

Commit f402ace

Browse files
committed
Added ssl document
1 parent b40d124 commit f402ace

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

docs/src/main/mdoc/en/tutorial/Connection.md

+16
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,8 @@ val program = provider.use { connection =>
146146

147147
You can add SSL configuration to establish a secure connection:
148148

149+
※ Note that Trusted accepts all certificates. This is a setting for development environments.
150+
149151
```scala
150152
import cats.effect.IO
151153
import ldbc.connector.*
@@ -160,6 +162,20 @@ val program = provider.use { connection =>
160162
}
161163
```
162164

165+
ldbc supports all TLS modes provided by fs2. Below is a list of available SSL modes:
166+
167+
| Mode | Platform | Details |
168+
|--------------------------------|-----------------|--------------------------------------------------------------------------------------------------------------------------------------------|
169+
| `SSL.None` | `JVM/JS/Native` | `ldbc will not request SSL. This is the default.` |
170+
| `SSL.Trusted` | `JVM/JS/Native` | `Connect via SSL and trust all certificates.` `Use this if you're running with a self-signed certificate, for instance.` |
171+
| `SSL.System` | `JVM/JS/Native` | `Connect via SSL and use the system default SSLContext to verify certificates.` `Use this if you're running with a CA-signed certificate.` |
172+
| `SSL.fromSSLContext(…)` | `JVM` | `Connect via SSL using an existing SSLContext.` |
173+
| `SSL.fromKeyStoreFile(…)` | `JVM` | `Connect via SSL using a specified keystore file.` |
174+
| `SSL.fromKeyStoreResource(…)` | `JVM` | `Connect via SSL using a specified keystore classpath resource.` |
175+
| `SSL.fromKeyStore(…)` | `JVM` | `Connect via SSL using an existing Keystore.` |
176+
| `SSL.fromSecureContext(...)` | `JS` | `Connect via SSL using an existing SecureContext.` |
177+
| `SSL.fromS2nConfig(...)` | `Native` | `Connect via SSL using an existing S2nConfig.` |
178+
163179
### Connection with Advanced Configuration
164180

165181
You can leverage many more configuration options:

docs/src/main/mdoc/ja/tutorial/Connection.md

+16
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,8 @@ val program = provider.use { connection =>
146146

147147
セキュアな接続を確立するためにSSL設定を追加できます:
148148

149+
※ Trustedは全ての証明書を受け入れることに注意してください。これは開発環境向けの設定です。
150+
149151
```scala
150152
import cats.effect.IO
151153
import ldbc.connector.*
@@ -160,6 +162,20 @@ val program = provider.use { connection =>
160162
}
161163
```
162164

165+
ldbcはfs2が提供するすべてのTLSモードをサポートしています。以下は、利用可能なSSLモードのリストです:
166+
167+
| モード | プラットフォーム | 詳細 |
168+
|--------------------------------|-----------------|------------------------------------------------------------------------------------|
169+
| `SSL.None` | `JVM/JS/Native` | `ldbcはSSLを要求しません。これがデフォルトです。` |
170+
| `SSL.Trusted` | `JVM/JS/Native` | `SSL経由で接続し、すべての証明書を信頼する。``自己署名証明書を使用している場合などに使用する。` |
171+
| `SSL.System` | `JVM/JS/Native` | `SSL経由で接続し、システムデフォルトのSSLContextを使用して証明書を検証する。``CAで署名された証明書を使用している場合は、これを使用してください。` |
172+
| `SSL.fromSSLContext(…)` | `JVM` | `既存のSSLContextを使ってSSLで接続する。` |
173+
| `SSL.fromKeyStoreFile(…)` | `JVM` | `指定したキーストア・ファイルを使ってSSLで接続する。` |
174+
| `SSL.fromKeyStoreResource(…)` | `JVM` | `指定されたキーストア・クラスパス・リソースを使用して SSL 接続します。` |
175+
| `SSL.fromKeyStore(…)` | `JVM` | `既存のキーストアを使用してSSL経由で接続する。` |
176+
| `SSL.fromSecureContext(...)` | `JS` | `既存の SecureContext を使用して SSL 経由で接続します。` |
177+
| `SSL.fromS2nConfig(...)` | `Native` | `既存のS2nConfigを使用して、SSL経由で接続します。` |
178+
163179
### 高度な設定を使用したコネクション
164180

165181
さらに多くの設定オプションを活用することができます:

0 commit comments

Comments
 (0)