OpenNMS RADIUS身份验证

时间:2018-09-05 13:29:20

标签: linux radius opennms

使用RADIUS(Microsoft NPS)服务器进行OpenNMS 22.0.3身份验证时,我们遇到了问题。问题是,我们有一台旧的OpenNMS服务器,该服务器已成功使用RADIUS身份验证进行Web登录,但是即使我们从旧的工作计算机上复制conf文件,我们仍然无法使其在22.0.3上正常工作。

我们所做的:

  1. 已安装opennms-plugin-protocols-radius,
  2. applicationContext-spring-security.xml:

将其更改为使用spring-security.d /

中的文件radius.xml
<!-- use our custom authentication provider; to use RADIUS instead, change this to "radiusAuthenticationProvider" an
d uncomment below -->
  <authentication-manager alias="authenticationManager">
    <!-- If a user is pre-authenticated, make sure their user details are populated correctly. -->
    <authentication-provider ref="preauthAuthProvider" />
    <!-- Use our custom authentication provider -->
    <authentication-provider ref="hybridAuthenticationProvider" />
    <!-- To enable external (e.g. LDAP, RADIUS) authentication, uncomment the following.
         You must also rename and customize exactly ONE of the example files in the
         spring-security.d subdirectory. -->
    <authentication-provider ref="externalAuthenticationProvider" /> 
  </authentication-manager>

3。在radius.xml中:

<beans:bean id="externalAuthenticationProvider" class="org.opennms.protocols.radius.springsecurity.RadiusAuthenticationProvider">
    <beans:constructor-arg value="ip.ip.ip.ip"/>
    <beans:constructor-arg value="SECRET"/>
    <beans:property name="port" value="1812"/>
    <beans:property name="timeout" value="5"/>
    <beans:property name="retries" value="3"/>
    <beans:property name="authTypeClass" value="net.jradius.client.auth.MSCHAPv2Authenticator"/>
    <beans:property name="defaultRoles" value="ROLE_USER"/>
    <beans:property name="rolesAttribute" value="Unknown-VSAttribute(5813:1)"/>
  </beans:bean>

当我们然后重新启动opennms(它重新启动而没有错误)并转到网页时,我们只会被空白页打招呼。

日志什么也没说。

2 个答案:

答案 0 :(得分:1)

空白页的症状表示安装RADIUS协议时出现问题。您可以验证它是否正确安装吗?

cd ${OPENNMS_HOME}/lib
find . -iname "*radius*"

您应该具有以下文件:

./jradius-core-1.1.5.jar
./org.opennms.dependencies.jradius-extended-22.0.3.jar
./jradius-dictionary-1.1.5.jar
./org.opennms.protocols.radius-22.0.3.jar

答案 1 :(得分:0)

在22.0.2中,我们引入了一种标准化时间表示方式的方法,并且可以在opennms.properties中对其进行配置,请参见此处:

# Choose the format how the date is displayed in the UI. It needs to follow the pattern in DateTimeFormatter:
# see https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html
# org.opennms.ui.datettimeformat=yyyy-MM-dd'T'HH:mm:ssxxx

这是引入此增强功能的问题:https://issues.opennms.org/browse/NMS-10231

还有其他一些地方,它在即将发布的22.0.4版本中已经完成。以下是与表示Web UI中的时间问题有关的部分以及每个版本中的情况:https://issues.opennms.org/browse/NMS-10072