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 8151081
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T15:15:44+00:00 2026-06-06T15:15:44+00:00

I am trying to add authentication to a xmlrpc server (which will be running

  • 0

I am trying to add authentication to a xmlrpc server (which will be running on nodes of a P2P network) without using user:password@host as this will reveal the password to all attackers. The authentication is so to basically create a private network, preventing unauthorised users from accessing it.

My solution to this was to create a challenge response system very similar to this but I have no clue how to add this to the xmlrpc server code.
I found a similar question (Where custom authentication was needed) here.

So I tried creating a module that would be called whenever a client connected to the server. This would connect to a challenge-response server running on the client and if the client responded correctly would return True. The only problem was that I could only call the module once and then I got a reactor cannot be restarted error. So is there some way of having a class that whenever the “check()” function is called it will connect and do this?

Would the simplest thing to do be to connect using SSL? Would that protect the password? Although this solution would not be optimal as I am trying to avoid having to generate SSL certificates for all the nodes.

  • 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-06T15:15:46+00:00Added an answer on June 6, 2026 at 3:15 pm

    For anyone that was looking for a full example below is mine (thanks to Rakis for pointing me in the right direction). In this the user and password is stored in a file called ‘passwd’ (see the first useful link for more details and how to change it).

    Server:

    #!/usr/bin/env python
    import bjsonrpc
    from SRPSocket import SRPSocket
    import SocketServer
    from bjsonrpc.handlers import BaseHandler
    import time
    
    class handler(BaseHandler):
        def time(self):
            return time.time()
    
    class SecureServer(SRPSocket.SRPHost):
        def auth_socket(self, socket):
            server = bjsonrpc.server.Server(socket, handler_factory=handler)
            server.serve()
    
    s = SocketServer.ForkingTCPServer(('', 1337), SecureServer)
    s.serve_forever()
    

    Client:

    #! /usr/bin/env python
    import bjsonrpc
    from bjsonrpc.handlers import BaseHandler
    from SRPSocket import SRPSocket
    import time
    
    class handler(BaseHandler):
        def time(self):
            return time.time()
    
    socket, key = SRPSocket.SRPSocket('localhost', 1337, 'dht', 'testpass')
    
    connection = bjsonrpc.connection.Connection(socket, handler_factory=handler)
    
    test = connection.call.time()
    print test
    time.sleep(1)
    

    Some useful links:

    • http://members.tripod.com/professor_tom/archives/srpsocket.html
    • http://packages.python.org/bjsonrpc/tutorial1/index.html
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to add more security to my user authentication sessions. When the
Trying to add a class object into a List using reflection, but when invoking
I have a MVC application that I am now trying to add authentication and
I am trying to implement LDAP authentication on the ADAM LDAP server of my
I'm trying to understand Spring 3.0 authentication. In the code below, why is user.getRole()
I've been struggling with this all day. I am trying to add forms authentication
I'm trying to create an OData service that will use authentication & authorization provided
I have a ASP.Net site, in which I'm trying to use Windows Authentication and
I'm trying to add simple Authentication and Authorization to an ASP.NET MVC application. I'm
i have a Swing-client and a Server running on tomcat 7, which communicate with

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.