Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added documentation for SSL support
see #43
  • Loading branch information
Mart-Bogdan committed May 9, 2017
commit 8839376b9c4305d5ad4969cf9a0d70d0433adfc5
15 changes: 13 additions & 2 deletions src/main/asciidoc/groovy/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,9 @@ Both the PostgreSql and MySql clients take the same configuration:
"password" : <your-password>,
"database" : <name-of-your-database>,
"charset" : <name-of-the-character-set>,
"queryTimeout" : <timeout-in-milliseconds>
"queryTimeout" : <timeout-in-milliseconds>,
"sslmode" : <"disable"|"prefer"|"require"|"verify-ca"|"verify-full">,
"sslrootcert" : <path to file with certificate>
}
----

Expand All @@ -239,4 +241,13 @@ Both the PostgreSql and MySql clients take the same configuration:
`password`:: The password to connect to the database. Default is not set, i.e. it uses no password.
`database`:: The name of the database you want to connect to. Defaults to `testdb`.
`charset`:: The name of the character set you want to use for the connection. Defaults to `UTF-8`.
`queryTimeout`:: The timeout to wait for a query in milliseconds. Defaults to `10000` (= 10 seconds).
`queryTimeout`:: The timeout to wait for a query in milliseconds. Defaults to `10000` (= 10 seconds).
`sslmode` :: If you want to enable SSL support you should enable this parameter.
For example to connect Heroku you will need to use *prefer*.

"disable" ::: only try a non-SSL connection
"prefer" ::: first try an SSL connection; if that fails, try a non-SSL connection
"require" ::: only try an SSL connection, but don't verify Certificate Authority
"verify-ca" ::: only try an SSL connection, and verify that the server certificate is issued by a trusted certificate authority (CA)
"verify-full" ::: only try an SSL connection, verify that the server certificate is issued by a trusted CA and that the server host name matches that in the certificate
`sslrootcert` :: Path to SSL root certificate file. Is used if you want to verify privately issued certificate.
15 changes: 13 additions & 2 deletions src/main/asciidoc/java/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,9 @@ Both the PostgreSql and MySql clients take the same configuration:
"password" : <your-password>,
"database" : <name-of-your-database>,
"charset" : <name-of-the-character-set>,
"queryTimeout" : <timeout-in-milliseconds>
"queryTimeout" : <timeout-in-milliseconds>,
"sslmode" : <"disable"|"prefer"|"require"|"verify-ca"|"verify-full">,
"sslrootcert" : <path to file with certificate>
}
----

Expand All @@ -207,4 +209,13 @@ Both the PostgreSql and MySql clients take the same configuration:
`password`:: The password to connect to the database. Default is not set, i.e. it uses no password.
`database`:: The name of the database you want to connect to. Defaults to `testdb`.
`charset`:: The name of the character set you want to use for the connection. Defaults to `UTF-8`.
`queryTimeout`:: The timeout to wait for a query in milliseconds. Defaults to `10000` (= 10 seconds).
`queryTimeout`:: The timeout to wait for a query in milliseconds. Defaults to `10000` (= 10 seconds).
`sslmode` :: If you want to enable SSL support you should enable this parameter.
For example to connect Heroku you will need to use *prefer*.

"disable" ::: only try a non-SSL connection
"prefer" ::: first try an SSL connection; if that fails, try a non-SSL connection
"require" ::: only try an SSL connection, but don't verify Certificate Authority
"verify-ca" ::: only try an SSL connection, and verify that the server certificate is issued by a trusted certificate authority (CA)
"verify-full" ::: only try an SSL connection, verify that the server certificate is issued by a trusted CA and that the server host name matches that in the certificate
`sslrootcert` :: Path to SSL root certificate file. Is used if you want to verify privately issued certificate.
15 changes: 13 additions & 2 deletions src/main/asciidoc/js/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,9 @@ Both the PostgreSql and MySql clients take the same configuration:
"password" : <your-password>,
"database" : <name-of-your-database>,
"charset" : <name-of-the-character-set>,
"queryTimeout" : <timeout-in-milliseconds>
"queryTimeout" : <timeout-in-milliseconds>,
"sslmode" : <"disable"|"prefer"|"require"|"verify-ca"|"verify-full">,
"sslrootcert" : <path to file with certificate>
}
----

Expand All @@ -245,4 +247,13 @@ Both the PostgreSql and MySql clients take the same configuration:
`password`:: The password to connect to the database. Default is not set, i.e. it uses no password.
`database`:: The name of the database you want to connect to. Defaults to `testdb`.
`charset`:: The name of the character set you want to use for the connection. Defaults to `UTF-8`.
`queryTimeout`:: The timeout to wait for a query in milliseconds. Defaults to `10000` (= 10 seconds).
`queryTimeout`:: The timeout to wait for a query in milliseconds. Defaults to `10000` (= 10 seconds).
`sslmode` :: If you want to enable SSL support you should enable this parameter.
For example to connect Heroku you will need to use *prefer*.

"disable" ::: only try a non-SSL connection
"prefer" ::: first try an SSL connection; if that fails, try a non-SSL connection
"require" ::: only try an SSL connection, but don't verify Certificate Authority
"verify-ca" ::: only try an SSL connection, and verify that the server certificate is issued by a trusted certificate authority (CA)
"verify-full" ::: only try an SSL connection, verify that the server certificate is issued by a trusted CA and that the server host name matches that in the certificate
`sslrootcert` :: Path to SSL root certificate file. Is used if you want to verify privately issued certificate.
15 changes: 13 additions & 2 deletions src/main/asciidoc/kotlin/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,9 @@ Both the PostgreSql and MySql clients take the same configuration:
"password" : <your-password>,
"database" : <name-of-your-database>,
"charset" : <name-of-the-character-set>,
"queryTimeout" : <timeout-in-milliseconds>
"queryTimeout" : <timeout-in-milliseconds>,
"sslmode" : <"disable"|"prefer"|"require"|"verify-ca"|"verify-full">,
"sslrootcert" : <path to file with certificate>
}
----

Expand All @@ -239,4 +241,13 @@ Both the PostgreSql and MySql clients take the same configuration:
`password`:: The password to connect to the database. Default is not set, i.e. it uses no password.
`database`:: The name of the database you want to connect to. Defaults to `testdb`.
`charset`:: The name of the character set you want to use for the connection. Defaults to `UTF-8`.
`queryTimeout`:: The timeout to wait for a query in milliseconds. Defaults to `10000` (= 10 seconds).
`queryTimeout`:: The timeout to wait for a query in milliseconds. Defaults to `10000` (= 10 seconds).
`sslmode` :: If you want to enable SSL support you should enable this parameter.
For example to connect Heroku you will need to use *prefer*.

"disable" ::: only try a non-SSL connection
"prefer" ::: first try an SSL connection; if that fails, try a non-SSL connection
"require" ::: only try an SSL connection, but don't verify Certificate Authority
"verify-ca" ::: only try an SSL connection, and verify that the server certificate is issued by a trusted certificate authority (CA)
"verify-full" ::: only try an SSL connection, verify that the server certificate is issued by a trusted CA and that the server host name matches that in the certificate
`sslrootcert` :: Path to SSL root certificate file. Is used if you want to verify privately issued certificate.
15 changes: 13 additions & 2 deletions src/main/asciidoc/ruby/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,9 @@ Both the PostgreSql and MySql clients take the same configuration:
"password" : <your-password>,
"database" : <name-of-your-database>,
"charset" : <name-of-the-character-set>,
"queryTimeout" : <timeout-in-milliseconds>
"queryTimeout" : <timeout-in-milliseconds>,
"sslmode" : <"disable"|"prefer"|"require"|"verify-ca"|"verify-full">,
"sslrootcert" : <path to file with certificate>
}
----

Expand All @@ -245,4 +247,13 @@ Both the PostgreSql and MySql clients take the same configuration:
`password`:: The password to connect to the database. Default is not set, i.e. it uses no password.
`database`:: The name of the database you want to connect to. Defaults to `testdb`.
`charset`:: The name of the character set you want to use for the connection. Defaults to `UTF-8`.
`queryTimeout`:: The timeout to wait for a query in milliseconds. Defaults to `10000` (= 10 seconds).
`queryTimeout`:: The timeout to wait for a query in milliseconds. Defaults to `10000` (= 10 seconds).
`sslmode` :: If you want to enable SSL support you should enable this parameter.
For example to connect Heroku you will need to use *prefer*.

"disable" ::: only try a non-SSL connection
"prefer" ::: first try an SSL connection; if that fails, try a non-SSL connection
"require" ::: only try an SSL connection, but don't verify Certificate Authority
"verify-ca" ::: only try an SSL connection, and verify that the server certificate is issued by a trusted certificate authority (CA)
"verify-full" ::: only try an SSL connection, verify that the server certificate is issued by a trusted CA and that the server host name matches that in the certificate
`sslrootcert` :: Path to SSL root certificate file. Is used if you want to verify privately issued certificate.
13 changes: 12 additions & 1 deletion src/main/java/io/vertx/ext/asyncsql/package-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,9 @@
* "password" : <your-password>,
* "database" : <name-of-your-database>,
* "charset" : <name-of-the-character-set>,
* "queryTimeout" : <timeout-in-milliseconds>
* "queryTimeout" : <timeout-in-milliseconds>,
* "sslmode" : <"disable"|"prefer"|"require"|"verify-ca"|"verify-full">,
* "sslrootcert" : <path to file with certificate>
Copy link
Contributor

Choose a reason for hiding this comment

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

sslMode and sslRootCert would be more appropriate names (maxPoolSize and queryTimeout are camel cased as well)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Seems reasonable.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But I won't change "verify-ca" and "verify-full" as it's direct values passed to underlying library.

* }
* ----
*
Expand All @@ -197,6 +199,15 @@
* `database`:: The name of the database you want to connect to. Defaults to `testdb`.
* `charset`:: The name of the character set you want to use for the connection. Defaults to `UTF-8`.
* `queryTimeout`:: The timeout to wait for a query in milliseconds. Defaults to `10000` (= 10 seconds).
* `sslmode` :: If you want to enable SSL support you should enable this parameter.
* For example to connect Heroku you will need to use *prefer*.
*
* "disable" ::: only try a non-SSL connection
* "prefer" ::: first try an SSL connection; if that fails, try a non-SSL connection
* "require" ::: only try an SSL connection, but don't verify Certificate Authority
* "verify-ca" ::: only try an SSL connection, and verify that the server certificate is issued by a trusted certificate authority (CA)
* "verify-full" ::: only try an SSL connection, verify that the server certificate is issued by a trusted CA and that the server host name matches that in the certificate
* `sslrootcert` :: Path to SSL root certificate file. Is used if you want to verify privately issued certificate.
*/
@Document(fileName = "index.adoc")
@ModuleGen(name = "vertx-mysql-postgresql", groupPackage = "io.vertx") package io.vertx.ext.asyncsql;
Expand Down