我正在开发一种使用节俭的系统.我希望客户端身份被检查,操作被ACL. Thrift是否提供任何支持? 不直接执行此操作的唯一方法是具有在服务器上创建(临时)密钥的身份验证方法,然后更改
exception NotAuthorisedException {
1: string errorMessage,
}
exception AuthTimeoutException {
1: string errorMessage,
}
service MyAuthService {
string authenticate( 1:string user, 2:string pass )
throws ( 1:NotAuthorisedException e ),
string mymethod( 1:string authstring, 2:string otherargs, ... )
throws ( 1:AuthTimeoutException e, ... ),
}
我们使用这种方法,并将密钥保存到一个安全的memcached实例,30分钟的超时时间可以保持一切“snappy”.收到AuthTimeoutException的客户端将被重新授权并重试,并且我们有一些防火墙规则来阻止暴力攻击.
