组网及说明
不涉及
告警信息
https方式登录web时报错“登录失败”
问题描述
登录web时报错“登录失败”,日志中提示“登录失败”
%Aug9 20:13:10:644 2023 H3C WEB/5/LOGIN_FAILED: admin 从 172.31.5.106 登录失败.
过程分析
<H3C>debugging local-server all
This command is CPU intensive and might affect ongoing services. Are you sure you want to continue? [Y/N]:y
<H3C>
<H3C>terminal monitor
The current terminal is enabled to display logs.
<H3C>terminal debugging
The current terminal is enabled to display debugging logs.
<H3C>*Aug9 20:37:59:665 2023 H3C LOCALSER/7/EVENT: Received authentication request message.
*Aug9 20:37:59:666 2023 H3C LOCALSER/7/EVENT: Authentication failed, unexpected user service type 1024 (expected = 2208).
%Aug9 20:37:59:668 2023 H3C WEB/5/LOGIN_FAILED: admin 从 172.31.5.106 登录失败.
debugging local-server all 显示认证失败,unexpected user service type 1024 (expected = 2208).表示未被授权。
分析设备实现,为保护http访问过程中的用户名密码安全,在进行http方式登录时在验证用户名密码环节会跳转至https,即访问http://172.31.5.77跳转至https://172.31.5.77/web/frame/login.html?ssl=false 直接进行https访问时URL为https://172.31.5.76/web/frame/login.html,可见,跳转的连接增加了?ssl=false
虽然看到的是https类型的链接,但由于是从http跳转过来的,需要校验http权限。 现场账号没有配置service-typehttp,因为没有http权限而登录失败。
解决方法
1、登录设备时直接通过https方式,不通过http跳转https的方式。
2、账号下面添加http权限