在FreeRadius中configurationrlm_rest模块

使用FreeRADIUS我需要对Web后端进行身份validation,并尝试使用rlm_rest模块进行身份validation。 看到这里 。

在我的网站configuration我有这样的事情:

authorize { rest } 

并在身份validation部分我尝试过这样的事情:

 authenticate { Auth-Type REST { rest } } 

要么

 authenticate { rest } 

无论哪种情况,我都会收到以下错误: (2) ERROR: No Auth-Type found: rejecting the user via Post-Auth-Type = Reject

在我的Web服务器上,我返回了204 code因为它似乎应该validation用户而不需要额外的进程。 看到这里 。 授权似乎工作正常,但是一旦达到validation部分,则返回错误。

我需要知道的是“用户”文件条目和站点可用条目的组合,我需要允许rlm_rest模块完成请求的validation部分。 谢谢,

Rest没有设置Auth-Type,你必须手动完成。

 authorize { rest if (ok) { update control { Auth-Type := rest } } } authenticate { rest } 

authentication中列出的模块会自动创buildauthenticationtypes(您实际上不需要authenticationtypes节)。

你不需要在授权中调用rest,如果你不需要,像这样的事情也可以正常工作:

 authorize { if (User-Password) { update control { Auth-Type := rest } } } 

编辑:

注意:在版本3.0.4之前,REST模块使用control:Cleartext-Password来获取用户密码,所以为了使模块正常工作,您需要从request:User-Password复制值request:User-Password

 authorize { if (User-Password) { update control { Cleartext-Password := &User-Password Auth-Type := rest } } } 

版本3.0.4和更高版本寻找request:User-Password ,而应该在大多数情况下工作。