implement untrusted mode, see #2573
This commit is contained in:
parent
a684f006b6
commit
3efa0c96e9
8 changed files with 103 additions and 48 deletions
|
|
@ -21,7 +21,12 @@ private[akka] case class DaemonMsgCreate(props: Props, deploy: Deploy, path: Str
|
|||
*
|
||||
* INTERNAL USE ONLY!
|
||||
*/
|
||||
private[akka] class RemoteSystemDaemon(system: ActorSystemImpl, _path: ActorPath, _parent: InternalActorRef, _log: LoggingAdapter)
|
||||
private[akka] class RemoteSystemDaemon(
|
||||
system: ActorSystemImpl,
|
||||
_path: ActorPath,
|
||||
_parent: InternalActorRef,
|
||||
_log: LoggingAdapter,
|
||||
val untrustedMode: Boolean)
|
||||
extends VirtualPathContainer(system.provider, _path, _parent, _log) {
|
||||
|
||||
/**
|
||||
|
|
@ -53,6 +58,7 @@ private[akka] class RemoteSystemDaemon(system: ActorSystemImpl, _path: ActorPath
|
|||
case message: DaemonMsg ⇒
|
||||
log.debug("Received command [{}] to RemoteSystemDaemon on [{}]", message, path.address)
|
||||
message match {
|
||||
case DaemonMsgCreate(_, _, path, _) if untrustedMode ⇒ log.debug("does not accept deployments (untrusted) for {}", path)
|
||||
case DaemonMsgCreate(props, deploy, path, supervisor) ⇒
|
||||
path match {
|
||||
case ActorPathExtractor(address, elems) if elems.nonEmpty && elems.head == "remote" ⇒
|
||||
|
|
@ -65,7 +71,7 @@ private[akka] class RemoteSystemDaemon(system: ActorSystemImpl, _path: ActorPath
|
|||
addChild(subpath.mkString("/"), actor)
|
||||
this.sendSystemMessage(Watch(actor, this))
|
||||
case _ ⇒
|
||||
log.error("remote path does not match path from message [{}]", message)
|
||||
log.debug("remote path does not match path from message [{}]", message)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue