パスワードの RESTful API を使用すると、changeProperties 承認を持っているユーザーがすべてのローカルユーザーのパスワード複雑性規則を設定できます。ユーザー承認の詳細は、RESTful API ロールサービスを参照してください。
ローカルユーザーがパスワードを変更する際に、パスワードの要件が強制されます。パスワードの規則が変更されても、既存のパスワードは影響を受けません。
変更可能なプロパティーを表示するには、次のコマンドを使用します。
リクエストの例:
GET /api/setting/v2/password HTTP/1.1 Host: zfs-storage.example.com:215 Authorization: Basic Tm8gcGVla2luZyE= Accept: application/json
結果例:
HTTP/1.1 200 OK Date: Fri, 14 May 2021 17:07:39 GMT Content-Type: application/json; charset=utf-8 X-Zfssa-Api-Version: 2.0 X-Zfssa-Setting-Api: 2.0 Content-Length: 196 { "complexity": { "href": "/api/setting/v2/password", "passlength": 8, "min_letters": 0, "min_upper": 0, "min_lower": 0, "min_digit": 0, "min_punctuation": 0, "max_repeats": 0, "namecheck": true } }
これらのプロパティーの説明については、Oracle ZFS Storage Appliance 管理ガイド、Release OS8.8.x の パスワード複雑性のプロパティー を参照してください。
次の例では、大文字、小文字、数字、句読文字がそれぞれ 1 つ以上必要になるようにパスワードの規則を変更します。min_letters の値は、min_upper および min_lower の新しい値に合せて更新する必要があります。
リクエストの例:
PUT /api/setting/v2/password HTTP/1.1 Host: zfs-storage.example.com:215 Content-Type: application/json {"min_letters": 2, "min_upper": 1, "min_lower": 1, "min_digit": 1, "min_punctuation": 1}
結果例:
HTTP/1.1 202 Accepted Date: Fri, 14 May 2021 17:38:40 GMT Content-Type: application/json; charset=utf-8 X-Zfssa-Api-Version: 2.0 X-Zfssa-Setting-Api: 2.0 Content-Length: 196 { "complexity": { "href": "/api/setting/v2/password", "passlength": 8, "min_letters": 2, "min_upper": 1, "min_lower": 1, "min_digit": 1, "min_punctuation": 1, "max_repeats": 0, "namecheck": true } }