암호 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 } }
이러한 등록 정보에 대한 설명은 Password Complexity Properties in Oracle ZFS Storage Appliance Administration Guide, Release OS8.8.x를 참조하십시오.
다음 예제는 대문자, 소문자, 숫자, 문장 부호 문자를 최소 하나 이상 요구하도록 암호 규칙을 변경합니다. 새 min_upper 및 min_lower 값을 고려하도록 min_letters 값을 업데이트해야 합니다.
요청 예:
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 } }