james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From btell...@apache.org
Subject [james-project] 02/06: JAMES-2708 enable JWT in linshare & make backend can connect to smtp server
Date Thu, 11 Apr 2019 10:15:41 GMT
This is an automated email from the ASF dual-hosted git repository.

btellier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit 0089c3c3947634aba2730d70ddbc7a54899db0bc
Author: Tran Tien Duc <dtran@linagora.com>
AuthorDate: Mon Apr 8 11:55:40 2019 +0700

    JAMES-2708 enable JWT in linshare & make backend can connect to smtp server
    
    Otherwise, sharing always fails if backend cannot connect to smtp server
---
 .../java/org/apache/james/linshare/Linshare.java   |  2 +
 .../linshare/src/test/resources/backend/Dockerfile |  2 +
 .../src/test/resources/backend/conf/id_rsa         | 27 +++++++++++
 .../src/test/resources/backend/conf/id_rsa.pub     |  1 +
 .../linshare/src/test/resources/docker-compose.yml |  2 +
 third-party/linshare/src/test/resources/ssl/id_rsa | 54 +++++++++++-----------
 .../linshare/src/test/resources/ssl/id_rsa.pub     |  2 +-
 7 files changed, 62 insertions(+), 28 deletions(-)

diff --git a/third-party/linshare/src/test/java/org/apache/james/linshare/Linshare.java b/third-party/linshare/src/test/java/org/apache/james/linshare/Linshare.java
index f9a128f..3bd4f47 100644
--- a/third-party/linshare/src/test/java/org/apache/james/linshare/Linshare.java
+++ b/third-party/linshare/src/test/java/org/apache/james/linshare/Linshare.java
@@ -111,6 +111,8 @@ public class Linshare {
             new ImageFromDockerfile()
                 .withFileFromClasspath("conf/log4j.properties", "backend/conf/log4j.properties")
                 .withFileFromClasspath("conf/catalina.properties", "backend/conf/catalina.properties")
+                .withFileFromClasspath("conf/id_rsa", "backend/conf/id_rsa")
+                .withFileFromClasspath("conf/id_rsa.pub", "backend/conf/id_rsa.pub")
                 .withFileFromClasspath("Dockerfile", "backend/Dockerfile"))
             .withNetworkAliases("backend")
             .withEnv("SMTP_HOST", "linshare_smtp")
diff --git a/third-party/linshare/src/test/resources/backend/Dockerfile b/third-party/linshare/src/test/resources/backend/Dockerfile
index f583d57..63d6a6a 100644
--- a/third-party/linshare/src/test/resources/backend/Dockerfile
+++ b/third-party/linshare/src/test/resources/backend/Dockerfile
@@ -2,3 +2,5 @@ FROM linagora/linshare-backend:2.2
 
 COPY conf/catalina.properties /usr/local/tomcat/conf/catalina.properties
 COPY conf/log4j.properties /etc/linshare/log4j.properties
+COPY conf/id_rsa /etc/linshare/id_rsa
+COPY conf/id_rsa.pub /etc/linshare/id_rsa.pub
\ No newline at end of file
diff --git a/third-party/linshare/src/test/resources/backend/conf/id_rsa b/third-party/linshare/src/test/resources/backend/conf/id_rsa
new file mode 100644
index 0000000..24dd555
--- /dev/null
+++ b/third-party/linshare/src/test/resources/backend/conf/id_rsa
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEowIBAAKCAQEA18mc6QTlSdwFqVUzLPr4h9Wpw8qOQ+MhU0fzNIqKHFZ5zwP+
+TEi5iqAoj8tSkBG5SeQFMNzYo/Botd2JkOO6rGaIaNZzTZXg9kjZ9YxtZoM+LX0f
+Jm5Ts9bLWgA3rRTK1NDhpCKkUoHIfelqjOCVuCBkmL7s9UwRmAdZ9YI4jw6HOLT1
+72QhOj4Z21iD1F3JAKy4gs0H7vGQZBYxWE3NqUGlx0pb6v7N5qh4DkIKulo+QJDz
+AHQeiOgCm0ZcZUu7kcVU+GbCgPyjk0l6McIG55/G8t672Krrc5HiRqvSIxqsOYt+
+NR0HBo51mXVitS+tAyFMGhGk2Z9S/mCmNeKNPQIDAQABAoIBAA9Va0n/qA9sjBZx
+UHakyt5UJ4EbNqrKTAbv+O9F3PSQjI1SWlKvZEfeg6NcLlzAdaszgc7sEpTrs3Ug
+7fKWzCAOFSll+8GKofa+TIavWOLM9rEi0ADaHCaOX9rgYxRwgs1GnpIcSBL41/di
+i8jA+MKhwqQ8BPiVVDa6ZwEUJNK9cxPlenwSZOl12/aAPW6DATftdL7xv+fjw9Bz
+BexEPHklbphHGwoTxvQfiCmTN96CGn1/W99xABKTH70tprAFgOZ78klQjXYwtxVW
+rQiXmvgOTEhbrqBMxpRIzFgP+ryrEgcn02jbaq8Aa4BNbD96PJsMIo0psuTHSsnZ
+Tcqe2MECgYEA+nVL50qSGlXSvPNTrnjYJHt6mkifke5clmLgX4HegjQqi2+wBjlR
+QM1M+1neqB53ueJrlxS8+fZR00SyaUg7ANub5jkqiK5YsVUJk9CvlhUfDlXEW1Ce
+quYvuYWr2LX7K8sh+mXDCwttDms/aaJASSvTExMV/GeWFeJpsBs8QJECgYEA3I/t
+S+gAbGByUirMKXoP2sfIl3inApU93SIXgpvFnRF87GcC30bE95VYZJ8X8MdsYmro
+UiWbWq/8P7PzxYFukbQw+etUs0SV6eJ2FLR7n9dTWfj2Juw86HxERoA57L9Qt6os
+d0tEBWm5+ZVlRdGoavi+ADnRRbD3ugzz2QdR1+0CgYEAhxBmRG6UZ5tMsBTQVdBZ
+TyM/tJ/hXYMbbwYXVanlYnXbU6KBXHngdX/BOfL2/dagXh/aQXkvh+Trr3DmfZw0
+JXxIkFjXtSnALrFbHtl1Nwxg2Qwrfcr2JddIeVW6nH1W3AEJa80g533b6+CuK7sR
+y+PUSf8K5ji+WULmF9A4J+ECgYBEurzROHxZSTyWiiuQiS7DmBnTyY8RaPwcGnGF
+C5FqvnZVHExy0xSxqeIfiMvnBd2qVXILlxhwDALovuSpmQmhcasJVeHQ8wBcH2t4
+TD1xs6GPmdrqihb4wzBrX62tLniyot60VcneffGr6nfiZ9C5dMWQQHQL6XdojHy4
+FmXUiQKBgBk1nTlnmeS2CRbKakc1IqVqGeyZDbEpYG7pc79T1/5Hdw/TOfH36W7H
+5OapRlEgny+snw8UmkeWghg3+QgfMDY+d6iXaBcTr0tGlqEinff81EyJfuWNCUQJ
+a5XfnKtGwsEEOLyD3qEK2QABKvML1BgzGOJFENDeQ8euHMIy9SF4
+-----END RSA PRIVATE KEY-----
diff --git a/third-party/linshare/src/test/resources/backend/conf/id_rsa.pub b/third-party/linshare/src/test/resources/backend/conf/id_rsa.pub
new file mode 100644
index 0000000..98eae24
--- /dev/null
+++ b/third-party/linshare/src/test/resources/backend/conf/id_rsa.pub
@@ -0,0 +1 @@
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDXyZzpBOVJ3AWpVTMs+viH1anDyo5D4yFTR/M0ioocVnnPA/5MSLmKoCiPy1KQEblJ5AUw3Nij8Gi13YmQ47qsZoho1nNNleD2SNn1jG1mgz4tfR8mblOz1staADetFMrU0OGkIqRSgch96WqM4JW4IGSYvuz1TBGYB1n1gjiPDoc4tPXvZCE6PhnbWIPUXckArLiCzQfu8ZBkFjFYTc2pQaXHSlvq/s3mqHgOQgq6Wj5AkPMAdB6I6AKbRlxlS7uRxVT4ZsKA/KOTSXoxwgbnn8by3rvYqutzkeJGq9IjGqw5i341HQcGjnWZdWK1L60DIUwaEaTZn1L+YKY14o09
duc@duc-HP-ProBook-450-G4
diff --git a/third-party/linshare/src/test/resources/docker-compose.yml b/third-party/linshare/src/test/resources/docker-compose.yml
index f0508a4..226116b 100644
--- a/third-party/linshare/src/test/resources/docker-compose.yml
+++ b/third-party/linshare/src/test/resources/docker-compose.yml
@@ -16,9 +16,11 @@ services:
         links:
             - database:linshare_database
             - mongodb:linshare_mongodb
+            - smtp:linshare_smtp
         depends_on:
             - database
             - mongodb
+            - smtp
         volumes:
             - ./conf/catalina.properties:/usr/local/tomcat/conf/catalina.properties
             - ./conf/log4j.properties:/etc/linshare/log4j.properties
diff --git a/third-party/linshare/src/test/resources/ssl/id_rsa b/third-party/linshare/src/test/resources/ssl/id_rsa
index b829322..24dd555 100644
--- a/third-party/linshare/src/test/resources/ssl/id_rsa
+++ b/third-party/linshare/src/test/resources/ssl/id_rsa
@@ -1,27 +1,27 @@
------BEGIN OPENSSH PRIVATE KEY-----
-b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAABFwAAAAdzc2gtcn
-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Bk1nTlnmeS2CRbKakc1IqVqGeyZDbEpYG7pc79T1/5Hdw/TOfH36W7H
+5OapRlEgny+snw8UmkeWghg3+QgfMDY+d6iXaBcTr0tGlqEinff81EyJfuWNCUQJ
+a5XfnKtGwsEEOLyD3qEK2QABKvML1BgzGOJFENDeQ8euHMIy9SF4
+-----END RSA PRIVATE KEY-----
diff --git a/third-party/linshare/src/test/resources/ssl/id_rsa.pub b/third-party/linshare/src/test/resources/ssl/id_rsa.pub
index d1666e1..98eae24 100644
--- a/third-party/linshare/src/test/resources/ssl/id_rsa.pub
+++ b/third-party/linshare/src/test/resources/ssl/id_rsa.pub
@@ -1 +1 @@
-ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDgH7ilLjddgVsIbzDywQZqjS48W6UvKoFFlvOrhFdzqUvgpXg6dBf3PH98vfg7+pAS+bC8eZtdje6/iPGW8L26iVCoQ/H3pvew5RhzfQvXJ6NA4Nbh1kJ1mOPv6fz6gAt7Ph5iRv8DtCqjcI/L9iAX5PQpKlwKjdTvabFJiVEEUtsZcX+FbI0uJe/ixrwgS+7UzL3LdYYnw4u9yU7+xK+9w9sx96ugf557OJzRdAZRRxiOzV0Vlei/fDAk/UnCDtFf9142Ci8NmGb6pdxWNPWl+aJvnpSr9n7ntk7IfQWHYDzu6tRhPRBVU8dOp2a0Y5LdlkksquvbbMADr8nz175r
benwa@horizon
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDXyZzpBOVJ3AWpVTMs+viH1anDyo5D4yFTR/M0ioocVnnPA/5MSLmKoCiPy1KQEblJ5AUw3Nij8Gi13YmQ47qsZoho1nNNleD2SNn1jG1mgz4tfR8mblOz1staADetFMrU0OGkIqRSgch96WqM4JW4IGSYvuz1TBGYB1n1gjiPDoc4tPXvZCE6PhnbWIPUXckArLiCzQfu8ZBkFjFYTc2pQaXHSlvq/s3mqHgOQgq6Wj5AkPMAdB6I6AKbRlxlS7uRxVT4ZsKA/KOTSXoxwgbnn8by3rvYqutzkeJGq9IjGqw5i341HQcGjnWZdWK1L60DIUwaEaTZn1L+YKY14o09
duc@duc-HP-ProBook-450-G4


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message