Liberty 프로파일의 SCIM 조작

SCIM(System for Cross-domain Identity Management) 1.1 스펙은 Liberty에서 지원됩니다.

자원 검색

WebSphere Application Server Liberty는 SCIM 1.1 스펙을 지원합니다. 스펙에 대한 자세한 정보는 http://www.simplecloud.info/의 내용을 참조하십시오.

알려진 자원을 검색하려면 GET 요청을 구성된 HTTP 엔드포인트로 전송해야 합니다. 예: /Users/{id} 또는 /Groups/{id}.

다음 예는 LDAP 레지스트리에 대한 조작을 표시합니다.
    <ldapRegistry id="LDAP1" realm="SampleLdapIDSRealm" host="9.127.1.90" port="1389" ignoreCase="true"
        baseDN="o=ibm,c=us" ldapType="IBM Tivoli Directory Server" searchTimeout="8m" recursiveSearch="true"
        bindDN="xxxxxx" bindPassword="xxxxxxx">
	    	<ldapEntityType name="PersonAccount">
	        <rdnProperty name="uid" objectClass="inetOrgPerson"/>
                		<objectClass>inetOrgPerson</objectClass>
            	</ldapEntityType>
            	<ldapEntityType name="Group">
	        <objectClass>groupofnames</objectClass>
		<objectClass>ibm-nestedGroup</objectClass>
		  <rdnProperty name="cn" objectClass="groupofnames"/>
	    	</ldapEntityType>
    	<attributeConfiguration>
        <attribute name="title" propertyName="honorificPrefix" syntax="String" entityType="PersonAccount">
        </attribute>
	<attribute name="initials" propertyName="middleName" syntax="String" entityType="PersonAccount">
        </attribute>
	<attribute name="st" propertyName="honorificSuffix" syntax="String" entityType="PersonAccount">
        </attribute>
	<attribute name="l" propertyName="homeStateOrProvinceName" syntax="String" entityType="PersonAccount">
        </attribute>
	<attribute name="street" propertyName="homeStreet" syntax="String" entityType="PersonAccount">
        </attribute>
	<attribute name="postalAddress" propertyName="homeCity" syntax="String" entityType="PersonAccount">
        </attribute>
	<attribute name="postalCode" propertyName="homePostalCode" syntax="String" entityType="PersonAccount">
        </attribute>
       <attribute name="postOfficeBox" propertyName="homeCountryName" syntax="String" entityType="PersonAccount">
        </attribute>
        <attribute name="departmentNumber" propertyName="photoURLThumbnail" syntax="String" entityType="PersonAccount">
        </attribute>
	<attribute name="description" propertyName="photoURL" syntax="String" entityType="PersonAccount">
        </attribute>
    	</attributeConfiguration>
    	<groupProperties>
        		<memberAttribute name="member" dummyMember="uid=dummy" objectClass="groupOfNames" scope="direct"/>
	<memberAttribute name="ibm-memberGroup" objectClass="ibm-nestedGroup" scope="direct"/>
    	</groupProperties>
</ldapRegistry>
LDAP에서 자원을 검색하려면 GET 요청을 https://localhost:9090/ibm/api/scim/Users/uid=jsmith,o=ibm,c=us로서 전송해야 합니다.

자원 조회

자원을 조회하려면, GET 요청을 구성된 HTTP 엔드포인트로 전송하고 검색을 위한 필터를 지정해야 합니다. 또한 리턴된 자원의 값의 서브세트를 리턴하기 위한 속성 매개변수를 지정할 수 있으며, 리턴된 자원을 구성하기 위한 페이징 및 정렬 매개변수를 지정할 수 있습니다. 다음 예에서는 필터 옵션 중 일부를 표시합니다.
  • 값의 서브세트를 검색하기 위한 매개변수를 지정하십시오. 예를 들어, https://localhost:9090/ibm/api/scim/Users?filter=givenname sw "Jo"는 해당 이름이 “Jo”로 시작되는 모든 사용자를 검색합니다.
  • 값의 서브세트를 검색하기 위한 속성 매개변수를 지정하십시오. 예를 들어, https://localhost:9090/ibm/api/scim/Users?filter=givenname sw "Jo"&attributes=username,emails&filter=name.familyname eq "Smith"“Jo”로 시작되며 해당 성이 “Smith”인 사용자 이름의 이메일 주소를 검색합니다.
  • 구성된 자원을 검색하기 위한 페이징 및 정렬 매개변수를 지정하십시오. 예를 들어, https://localhost:9090/ibm/api/scim/Users?filter=givenname sw "Jo"&attributes=username&sortBy=username&startIndex=3&count=5는 각 페이지마다 “Jo”로 시작되며 해당 성이 “Smith”인 다섯 개의 사용자 이름이 포함된 정렬 결과 중 세 번째 페이지를 검색합니다.
참고:
  • 기본 연합 저장소는 필터에 지정된 값이 대소문자를 구분하는지 여부를 판별합니다. LDAP의 경우, 값은 속성이 대소문자를 구분하는 LDAP 속성에 맵핑되지 않는 한 기본적으로 대소문자를 구분하지 않습니다.
  • 사용자 이름은 검색 필터에서 사용될 수 없습니다.
  • SCIM 속성을 지원하지 않는 기본, SAF 또는 사용자 정의 레지스트리를 연합하는 경우, 사용자 이름에 대해 첫 번째 필터 패턴이 항상 검색되며 사용자 이름 속성만 리턴됩니다.

자원 작성

새 자원을 작성하려면 POST 요청을 자원 엔드포인트(즉, Users 또는 Groups)로 전송해야 합니다. POST 컨텐츠에는 사용자 json 오브젝트가 포함되어야 하며, HTTP 헤더 컨텐츠 유형은 application/json으로 설정되어야 합니다.
참고: application/xml 컨텐츠 유형은 지원되지 않습니다.
사용자를 작성하려면 다음 요청이 https://localhost:9090/ibm/api/scim/Users Content-Type에 게시되어야 합니다.
Content-Type: application/json
Content-Length: ...

{
  "schemas":["urn:scim:schemas:core:1.0"],
  "userName":"bjensen",
  "externalId": "uid=bjensen,o=ibm,c=us",
  "name":{
    "familyName":"Jensen",
    "givenName":"Barbara"
  }
}

요청에는 사용자 레지스트리의 사용자 또는 그룹을 성공적으로 작성하기 위해 필요한 모든 속성이 포함되어야 합니다. 예를 들어, 백엔드 Tivoli Directory Server LDAP에서 사용자 작성에 필요한 최소 LDAP 속성 세트는 uid, sn, and cn입니다. 따라서 사용자 작성을 위한 요청에는 userName, givenNamefamilyName이 포함되어야 합니다. 사용자 레지스트리에서 스키마 위반이 있는 경우에는 작성 조작이 실패합니다.

externalId 속성은 ID처럼 작동하며 반드시 지정되어야 합니다. 속성 형식은 백엔드 사용자 레지스트리의 스펙에 따라 다릅니다. 이전 예에서 백엔드는 baseEntry가 o=ibm,c=us인 LDAP 서버이며 사용자의 RDN 특성은 UID로 설정되어 있습니다. 따라서 externalIduid=bjensen,o=ibm,c=us가 됩니다.

작성 요청을 기반으로, 작성된 사용자 오브젝트가 리턴됩니다.
{
    "schemas":["urn:scim:schemas:core:1.0"],
    "id":"uid=bjensen,o=ibm,c=us",
    "userName":"bjensen",
    "externalId":"uid=bjensen,o=ibm,c=us",
    "name":{
          "formatted":"Barbara Jensen",
          "familyName":"Jensen",
          "givenName":"Barbara"
    },
    "meta":{
         "lastModified":"2015-09-15T14:30:11",        "location":"https:\\localhost:9090\ibm\api\scim\Users\uid=bjensen,o=ibm,c=us",
         "created":"2015-09-15T14:30:11"
    }
}
둘 이상의 LDAP가 구성되어 있으며 작성 조작을 호출해야 하는 경우에는 엔티티의 기본 상위가 정의되어야 합니다. 정의된 상위는 기본 항목을 지정하며, 그 아래에 새 엔티티가 작성될 수 있습니다. 다음 예는 PersonAccount에 대한 기본 상위의 구성을 표시합니다.
<federatedRepository>
    <primaryRealm name="WIMRegistry">
        <participatingBaseEntry name="o=ibm,c=us"/>
        <participatingBaseEntry name="o=ldap"/>
    	</primaryRealm>
    <supportedEntityType>
        <defaultParent>o=ldap</defaultParent>
        <name>PersonAccount</name>
    </supportedEntityType>
</federatedRepository>

자원 수정

자원을 수정하려면, PUT 요청을 자원 엔드포인트(즉, /Users 또는 /Groups)로 전송해야 합니다. PUT 요청은 자원의 전체 업데이트를 완료합니다. 입력에 지정되지 않은 속성은 삭제되지 않습니다.
참고: PATCH의 부분 업데이트는 지원되지 않습니다.
이전에 작성된 자원을 수정하려면, 다음 요청을 https://localhost:9090/ibm/api/scim/Users/uid=bjensen,o=ibm,c=us에 게시해야 합니다.
Content-Type: application/json
Content-Length: ...

{
  "schemas":["urn:scim:schemas:core:1.0"],
  "userName":"bjensen",
  "externalId":"uid=bjensen,o=ibm,c=us",
  "name":{
    "familyName":"Jensen",
    "givenName":"Barb"
  }
}
이 요청은 오브젝트의 주어진 이름을 Barbara에서 Barb로 수정합니다. URL에 지정된 ID는 사용자 오브젝트에 지정된 externalId와 일치해야 합니다.
그룹 cn=employeeGroup,o=ibm,c=us를 수정하고 그룹 멤버십을 변경하려면 멤버 속성을 지정해야 합니다.
Content-Type: application/json
Content-Length: ...
{
    "id":"cn=employeeGroup,o=ibm,c=us",
    "schemas":["urn:scim:schemas:core:1.0"],
    "displayName":"employeeGroup",
    "externalId":"cn=employeeGroup,o=ibm,c=us",
    "members":[{"value":"uid=bjensen,o=ibm,c=us", "type":"User"},{"value":"cn=consultants,o=ibm,c=us", "type":"Group"}]
}
그룹 cn=employeeGroup,o=ibm,c=us를 수정하고 그룹에서 모든 멤버를 제거하려면, 비어 있는 멤버 속성이 지정되어야 합니다.
Content-Type: application/json
Content-Length: ...
{
    "id":"cn=employeeGroup,o=ibm,c=us",
    "schemas":["urn:scim:schemas:core:1.0"],
    "displayName":"employeeGroup",
    "externalId":"cn=employeeGroup,o=ibm,c=us",
    "members":[]
}

자원 삭제

자원을 삭제하려면, DELETE 요청을 자원 엔드포인트(즉, /Users 또는 /Groups)로 전송해야 합니다. 예를 들어, 이전 예에서 작성된 사용자 uid=bjensen,o=ibm,c=us를 삭제하려면 요청을 https://localhost:9090/ibm/api/scim/Users/uid=bjensen,o=ibm,c=us로 전송하십시오.
참고: SCIM은 Java 7 이상에서만 실행됩니다.

주제의 유형을 표시하는 아이콘 참조 주제



시간소인 아이콘 마지막 업데이트 날짜: Tuesday, 6 December 2016
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=rwlp_sec_scim_operations
파일 이름: rwlp_sec_scim_operations.html