首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何使用SSL支持配置akkacluster

如何使用SSL支持配置akkacluster
EN

Stack Overflow用户
提问于 2015-06-25 14:00:40
回答 1查看 1.1K关注 0票数 2

我正在寻找集群设置使用akka为我的游戏框架项目。我想知道如何支持plugable传输支持。我看着http://doc.akka.io/docs/akka/snapshot/scala/remoting.html,厌倦了一些配置。

下面是我的示例配置:

代码语言:javascript
复制
  akka {

  loglevel = ERROR

  actor.provider = "akka.cluster.ClusterActorRefProvider"

  remote {
    enabled-transports = ["akka.remote.netty.tcp"]
    enabled-transports = [akka.remote.netty.ssl]
    netty.ssl.tcp {
      hostname = "127.0.0.1"
      enable-ssl = true
    }
        netty.ssl.security {
      key-store = "mykeystore"
      trust-store = "mytruststore"
      key-store-password = "changeme"
      key-password = "changeme"
      trust-store-password = "changeme"
      protocol = "TLSv1"
      random-number-generator = "AES128CounterSecureRNG"
      enabled-algorithms = [TLS_RSA_WITH_AES_128_CBC_SHA]
    }
  }

  cluster {    
    auto-down = on
    akka.cluster.auto-down-unreachable-after = 5s

  }

}

我像这样启动服务器:

激活剂-Dnode.id=1 -Dhttp.port=9000 -Dakka.remote.netty.tcp.port=2551

我不知道我还错过了什么。当我的会员起床时,我看不到我的活动

我引用了以下实现:https://github.com/zarinfam/play-akka-cluster-pub-sub

请建议一下。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-07-01 14:13:44

我使用了后续configuration.Also生成了适当的证书如下:http://docs.oracle.com/cd/E19528-01/819-4733/6n6s6u1gl/index.html还注意:您需要设置密钥存储库和信任存储库,定义要使用的SSL/TLS版本并设置启用的算法。这些设置直接对应于JSSE配置,这些配置记录在这里:http://docs.oracle.com/javase/7/docs/technotes/guides/security/jsse/JSSERefGuide.html

这是我的配置:

代码语言:javascript
复制
 akka {
  log-dead-letters = on
  loglevel = INFO
  actor.provider = "akka.cluster.ClusterActorRefProvider"
  remote {
    #enabled-transports = ["akka.remote.netty.tcp"]
    enabled-transports = [akka.remote.netty.ssl]    
    log-remote-lifecycle-events =on
    netty.tcp { 
      hostname = "core06"
      enable-ssl = true 
    }
    netty.ssl = ${akka.remote.netty.tcp}
     netty.ssl = {
  # Enable SSL/TLS encryption.
  # This must be enabled on both the client and server to work.
  enable-ssl = true
  security {
  # This is the Java Key Store used by the server connection
   key-store = "keystore.jks"

   # This password is used for decrypting the key store
   key-store-password = "changeit"

   # This password is used for decrypting the key
   key-password = "changeit"

   # This is the Java Key Store used by the client connection
   trust-store = "cacerts.jks"

   # This password is used for decrypting the trust store
   trust-store-password = "changeit"

   # Protocol to use for SSL encryption, choose from:
        # Java 6 & 7:
        #   'SSLv3', 'TLSv1'
        # Java 7:
        #   'TLSv1.1', 'TLSv1.2'        
   protocol = "TLSv1"

           # Example: ["TLS_RSA_WITH_AES_128_CBC_SHA", "TLS_RSA_WITH_AES_256_CBC_SHA"]
        # You need to install the JCE Unlimited Strength Jurisdiction Policy
        # Files to use AES 256.
        # More info here:
        # http://docs.oracle.com/javase/7/docs/technotes/guides/security/SunProviders.html#SunJCEProvider       
   enabled-algorithms = ["TLS_RSA_WITH_AES_128_CBC_SHA"]

   random-number-generator = "AES128CounterSecureRNG"
        }
    }
 }

  cluster {      
  seed-nodes = [
  "akka.ssl.tcp://application@core06:2551",
  "akka.ssl.tcp://application@core06:2552"
  ]
    #auto-down = on
    auto-down-unreachable-after = 5s
  }

}

希望这对将来的任何人都有帮助。

干杯!

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/31052582

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档