我如何使用Python中的XML-RPC实现安全认证? [英] How do I implement secure authentication using xml-rpc in python?

查看:870
本文介绍了我如何使用Python中的XML-RPC实现安全认证?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个基本的 XML-RPC Web服务服务运行。结果
什么是最简单的方法(我是一个新手)实行安全认证?

I have a basic xml-rpc web service service running.
What is the simplest way(I'm a newbie) to implement secure authentication?

我只是需要一些方向。

推荐答案

您可以检出的这code为通过HTTPS 一个简单的XML-RPC服务器。认证可以在任何你希望的方式工作......他们可以做一些凭​​证进行身份验证和您提供的会话的其余部分的cookie。

You could checkout This code for a simple XML-RPC server over HTTPS. Authentication can work in any way you wish ... they could authenticate with some credentials and you provide a cookie for the rest of the session.

借助 Python文档为XMLRPC 包括使用HTTP授权报头的细节传递凭据。

The Python docs for xmlrpc include details of using the HTTP 'Authorization' header for passing in credentials.

<一个href=\"http://$c$c.activestate.com/recipes/526625-twisted-xml-rpc-server-with-basic-http-authenticat/\"相对=nofollow>下面是一些code使用的扭曲 实施xmlrpc的身份验证机制,它可以很容易地使用HTTPS而不是HTTP。

Here is some code that uses Twisted to implement a xmlrpc auth mechanism, which could easily use HTTPS instead of HTTP.

这家伙写了一个HTTPS XML-RPC设置与授权,你可以下载。
有吨资源,这样做这是容易googleable的方法。这一切都取决于如果你正在使用的mod_wsgi例如,或写入使用双绞线一个独立的服务器。

This guy has written a HTTPS XML-RPC setup with authorization which you can download. There are tons of resources, and ways of doing this which are easily googleable. This all depends on if you are using mod_wsgi for example, or writing a standalone server using Twisted.

底线:

A)使用SSL通信结果
B)使用HTTP授权机制

a) Use SSL for communication
b) Use the HTTP authorization mechanism

这篇关于我如何使用Python中的XML-RPC实现安全认证?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆