跳转到主内容

ONTAP 是否支持使用 SHA2 哈希的 LDAP 身份验证?

Views:
3
Visibility:
Customer
Votes:
0
Category:
ontap-9
Specialty:
nas
Last Updated:

适用于

  • ONTAP 9

解答

当为管理员用户使用基于 LDAP 的身份验证时、 ONTAP 将从 LDAP 服务器检索已散列密码的用户。


ONTAP 当前支持以以下格式显示的哈希:

  • SHA1 哈希、例如 {SHA}Ib0S3Bg/dA7nbye3jrOcitlyp1c=
  • SHA1 散列和盐一起使用,例如 {SSHA}6kjRsXW28j3tI9QgAyqQZqMk5JF9baJA
  • UNIX /etc/Shadow 格式,例如 {CRYPT}337wv58eeI9vU

在后一个示例中、该值具有 "{CRYPT}" 前缀、而 THS 字符串的其余部分( "337WV58EEI9VU" )则是在 /etc/shadow 中(例如 Linux 系统上)可以找到的值。
 

ONTAP 支持存储在 Linux /etc/Shadow 文件中的 SHA2 密码,例如

  • 不含盐的 SHHA 256 : {CRYPT}$5$$6G6fqh7JbmWoA0UDAV4a9AWvIITTJX3z13yUnMs2/S9
  • 含盐的 SHHA 256 : {CRYPT}$5$D8I8YSb5qp1JuR/M$WU3tC8sJEplhzjPdAGomBIEnWNIEAMlvWhx1UhbIXw
  • 不含盐的 SHA 512 : {CRYPT}$6$$VCSoGjn22d.ifTNEaijGbMMSqajTedh/HYPnOkuj0ky3sAiCCIx.rMZj8d20v2qil5zCOZF21zmm959VQVcEl0
  • 含盐的 SHA 512 :{CRYPT}$6$rJx0V8y2xj6CsMiL$gu.wruOPQV/Dw0PI4CQv1gCwRbN/.2cKszer2mPX3td5x9qf.l9s.i6MVEmhOLdi/JmRVMMQ0

在 5 美元和 6 美元之间的标记上分别表示沙 256 和沙 512 、而盐则包括在第二美元和第三美元之间。

哈希可以由任何可以为 /etc/shadow 输出适当值的程序生成。
以下是使用 Python 3 、在 Linux 系统上运行、以便与本地 Crypt(3) 函数交互:

% python3
Python 3.6.8 (default, Apr 25 2019, 21:02:35)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import crypt, getpass
>>> passwd = getpass.getpass("Please enter password: ")
Please enter password:
>>> salt = crypt.mksalt(crypt.METHOD_SHA512)
>>> salted_hash = "{CRYPT}" + crypt.crypt(passwd, salt)
>>> print(salted_hash)
{CRYPT}$6$up5Ai00M1VGaFK6q$4yFNK.YUszogLFS.7IDiAW70RLC7BufwYhLEhPxTSSMRTJa2gFkWjhWBLvsdUGniYkTMmPmBu5SX4Y7tF7lys0
>>> unsalted_hash = "{CRYPT}" + crypt.crypt(passwd, "$6$")
>>> print(unsalted_hash)
{CRYPT}$6$$VCSoGjn22d.ifTNEaijGbMMSqajTedh/HYPnOkuj0ky3sAiCCIx.rMZj8d20v2qil5zCOZF21zmm959VQVcEl0


目前, ONTAP 不支持 LDAP 散列值、前缀为 "{SHA512}" 或 "{SHA 512}" 。

其他信息

附加信息 _text

 

NetApp provides no representations or warranties regarding the accuracy or reliability or serviceability of any information or recommendations provided in this publication or with respect to any results that may be obtained by the use of the information or observance of any recommendations provided herein. The information in this document is distributed AS IS and the use of this information or the implementation of any recommendations or techniques herein is a customer's responsibility and depends on the customer's ability to evaluate and integrate them into the customer's operational environment. This document and the information contained herein may be used solely in connection with the NetApp products discussed in this document.