Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8373811
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T14:46:25+00:00 2026-06-09T14:46:25+00:00

I am running the Akka 2.0.2 microkernel and want to implement an authentication scheme

  • 0

I am running the Akka 2.0.2 microkernel and want to implement an authentication scheme for untrusted remote actors.

The first thing that comes to mind is to set up an authentication actor which returns a reference to the work actor when authentication succeeds.

However, how should I protect the work actor from simply being directly looked up remotely via actorFor(), circumventing authentication altogether?

That is, I want to prevent remote actors from accessing actors in my microkernel actor system without authentication.

Not giving the work actor a name in actorOf() is not enough, because it will get an easily-guessed autogenerated name. Is there a way to disable remote lookup for actors, yet still be able to give out their ActorRef to remote systems?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T14:46:26+00:00Added an answer on June 9, 2026 at 2:46 pm

    I think you were on the right track with the authentication actor. Have the authentication actor return both the ActorRef and a token. The remote actors must include that token in messages to your local worker actor. The worker actor will validate the token before doing the work.

    trait AuthenticatingActor { this => Actor
      val authenticationService = //...
    
      def receive = {
        case UnauthenticatedRequest(token, msg) =>
          if (authenticationService.validate(token) 
            authenticatedRecieve(msg)
          else
            sender ! RequestNotAuthenticated(token, "token invalid")
    
      def authenticatedReceive: Receive
    }
    
    class Worker extends AuthenticatingActor with Actor {
      def authenticatedReceive: Receive = //..
    }
    
    class AuthenticationActor extends Actor {
      val authenticationService = //..
      var worker: ActorRef = _
    
      def receive = {
        case Authenticate(username, password) =>
          val token = authenticationService.authenticate(username, password)
          sender ! token.map(AuthenticationSuccess(_, worker).
                         getOrElse(AuthenticationFailure)
        //..
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a currently running PHP application that I want to add real-time feed
I'm running into some deployment issues using Akka remoting to implement a small search
I am trying to implement a long running background process that is spawned when
I have an application, that uses akka and now I want to connect to
Running my script through Devel::NYTProf showed that the following portion of code took up
Running SQL Server 2008 (not R2). I have a few reports that have URLs
Running an MVC web site that calls a WCF service. Site and service on
So I've been playing with Akka Actors for a while now, and have written
Running zookeeper 3.3.3. I have a znode that I am just trying to list,
Running jetty server with ant script that starts it. I keep getting this exception

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.