メインコンテンツへスキップ

ONTAPはSHA2ハッシュを使用したLDAPサーバ認証をサポートしていますか?

Views:
Visibility:
Public
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}"という接頭辞が付き、文字列の残りの部分("337wv58eeI9vU")は /etc/shadow など Linux システムにあるものです。
 

ONTAPは、linuxの/etc/shadowファイルに格納されているSHA2パスワードをサポートします。例えば、

  • SHA256(ソルトなし):{CRYPT}$5$$6G6fqh7JbmWoA0UDAV4a9AWvIITTJX3z13yUnMs2/S9
  • SHA256(ソルト付き):{CRYPT}$5$D8I8YSb5qp1JuR/M$WU3tC8sJEplhzjPdAGomBIEnWNIEAMlvWhx1UhbIXw
  • SHA512(ソルトなし): {CRYPT}$6$$VCSoGjn22d.ifTNEaijGbMMSqajTedh/HYPnOkuj0ky3sAiCCIx.rMZj8d20v2qil5zCOZF21zmm959VQVcEl0
  • SHA512(ソルト付き):{CRYPT}$6$rJx0V8y2xj6CsMiL$gu.wruOPQV/Dw0PI4CQv1gCwRbN/.2cKszer2mPX3td5x9qf.l9s.i6MVEmhOLdi/JmRVMMQ0

ドル記号の間の5または6は、それぞれSHA256とSHA512を示し、2番目と3番目のドル記号の間にソルトが含まれます。

ハッシュは、/etc/shadowに適切な値を出力できる任意のプログラムで生成できます。
以下は、linuxシステム上で実行されるPython 3を使用して、ローカルの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 9.7P9以降、ONTAPは、たとえば{SHA512} や{SSHA512}などのプレフィックスを持つLDAPハッシュ値をサポートします。

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.