Re: [PR] Add sslMode to require in PostgresqlConnectionConfiguration [james-project]

2024-03-14 Thread via GitHub


Arsnael merged PR #2109:
URL: https://github.com/apache/james-project/pull/2109


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org



Re: [PR] Add sslMode to require in PostgresqlConnectionConfiguration [james-project]

2024-03-13 Thread via GitHub


Arsnael commented on code in PR #2109:
URL: https://github.com/apache/james-project/pull/2109#discussion_r1524198622


##
backends-common/postgres/src/main/java/org/apache/james/backends/postgres/PostgresConfiguration.java:
##
@@ -40,6 +42,8 @@ public class PostgresConfiguration {
 public static final String NON_RLS_USERNAME = "database.non-rls.username";
 public static final String NON_RLS_PASSWORD = "database.non-rls.password";
 public static final String RLS_ENABLED = "row.level.security.enabled";
+public static final String SSL_MODE = "ssl.mode";
+public static final String SSL_MODE_DEFAULT_VALUE = "disable";

Review Comment:
   Actually makes sense. Will give it a shot thanks



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org



Re: [PR] Add sslMode to require in PostgresqlConnectionConfiguration [james-project]

2024-03-13 Thread via GitHub


quantranhong1999 commented on code in PR #2109:
URL: https://github.com/apache/james-project/pull/2109#discussion_r1524154414


##
backends-common/postgres/src/main/java/org/apache/james/backends/postgres/PostgresConfiguration.java:
##
@@ -40,6 +42,8 @@ public class PostgresConfiguration {
 public static final String NON_RLS_USERNAME = "database.non-rls.username";
 public static final String NON_RLS_PASSWORD = "database.non-rls.password";
 public static final String RLS_ENABLED = "row.level.security.enabled";
+public static final String SSL_MODE = "ssl.mode";
+public static final String SSL_MODE_DEFAULT_VALUE = "disable";

Review Comment:
   Ok, it makes sense.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org



Re: [PR] Add sslMode to require in PostgresqlConnectionConfiguration [james-project]

2024-03-13 Thread via GitHub


vttranlina commented on code in PR #2109:
URL: https://github.com/apache/james-project/pull/2109#discussion_r1524150273


##
backends-common/postgres/src/main/java/org/apache/james/backends/postgres/PostgresConfiguration.java:
##
@@ -40,6 +42,8 @@ public class PostgresConfiguration {
 public static final String NON_RLS_USERNAME = "database.non-rls.username";
 public static final String NON_RLS_PASSWORD = "database.non-rls.password";
 public static final String RLS_ENABLED = "row.level.security.enabled";
+public static final String SSL_MODE = "ssl.mode";
+public static final String SSL_MODE_DEFAULT_VALUE = "disable";

Review Comment:
   I think disabled by default is better, 
   Similar to what r2dbc did
   
   // I think because in the production environment, the database server and 
application should be run in a same private network, with no need SSL, less 
cost for encryption



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org



Re: [PR] Add sslMode to require in PostgresqlConnectionConfiguration [james-project]

2024-03-13 Thread via GitHub


quantranhong1999 commented on code in PR #2109:
URL: https://github.com/apache/james-project/pull/2109#discussion_r1524146401


##
backends-common/postgres/src/main/java/org/apache/james/backends/postgres/PostgresConfiguration.java:
##
@@ -40,6 +42,8 @@ public class PostgresConfiguration {
 public static final String NON_RLS_USERNAME = "database.non-rls.username";
 public static final String NON_RLS_PASSWORD = "database.non-rls.password";
 public static final String RLS_ENABLED = "row.level.security.enabled";
+public static final String SSL_MODE = "ssl.mode";
+public static final String SSL_MODE_DEFAULT_VALUE = "disable";

Review Comment:
   Maybe `ALLOW` / `PREFER` would be better?
   
   Support the SSL if needed, while still supporting no SSL in our test I guess.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org



Re: [PR] Add sslMode to require in PostgresqlConnectionConfiguration [james-project]

2024-03-13 Thread via GitHub


chibenwa commented on code in PR #2109:
URL: https://github.com/apache/james-project/pull/2109#discussion_r1522769321


##
backends-common/postgres/src/main/java/org/apache/james/backends/postgres/PostgresConfiguration.java:
##
@@ -70,6 +74,7 @@ public static class Builder {
 private Optional nonRLSUser = Optional.empty();
 private Optional nonRLSPassword = Optional.empty();
 private Optional rowLevelSecurityEnabled = Optional.empty();
+private Optional sslMode = Optional.empty();

Review Comment:
   Enough



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org