웹 서비스 임포트 세트 보안 요구 사항

  • 릴리스 버전: Yokohama
  • 업데이트 날짜 2025년 01월 30일
  • 읽기12분
  • 웹 서비스 임포트 세트는 SOAP 웹 서비스와 동일한 보안 메커니즘을 사용합니다.

    • 기본 인증을 사용하려면 웹 서비스 사용자가 유효한 사용자 이름과 암호를 제공해야 합니다.
    • 상황별 보안을 사용하려면 웹 서비스 사용자가 쿼리된 테이블의 접근 제어 규칙을 충족해야 합니다.

    인스턴스에서 높은 보안 설정을 사용하는 경우 웹 서비스 사용자에게도 SOAP 역할이 필요할 수 있습니다.

    웹 서비스 임포트 세트 관련 링크

    매핑된 웹 서비스 테이블을 표시할 때 다음과 같은 관련 링크가 있습니다.

    • 임포트 세트 — 이 웹 서비스 임포트 세트와 관련된 임포트 세트입니다.
    • 변환 맵 — 이 웹 서비스와 관련된 변환 맵 목록입니다.
    • 변환 내역 — 변환 내역입니다.
    • 웹 서비스 편집 — 웹 서비스를 편집합니다.
    다음 이미지는 웹 서비스 임포트 세트 알림에 삽입된 기록을 보여줍니다. 대상 기록은 변환의 결과로 생성되는 인시던트 테이블 기록입니다.
    그림 1. SOAP 알림

    웹 서비스 임포트 세트 예시

    이 예제에서는 WSDL, SOAP 봉투 및 응답, Perl 호출 및 SOAP 웹 서비스 가져오기 결과를 보여줍니다.

    샘플 WSDL

    <?xmlversion="1.0"encoding="UTF-8"?><wsdl:definitions targetNamespace="http://www.service-now.com"  xmlns:tns="http://www.service-now.com/imp_notification"  xmlns:sncns="http://www.service-now.com"  xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"  xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"  xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"  xmlns:xsd="http://www.w3.org/2001/XMLSchema"  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"><wsdl:types><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"      elementFormDefault="unqualified"      targetNamespace="http://www.service-now.com/imp_notification"><xsd:element name="insert"><xsd:complexType><xsd:sequence><xsd:element maxOccurs="1" minOccurs="0" name="corrective_message" type="xsd:string"/><xsd:element maxOccurs="1" minOccurs="0" name="duration" type="xsd:string"/><xsd:element maxOccurs="1" minOccurs="0" name="expires_on" type="xsd:string"/><xsd:element maxOccurs="1" minOccurs="0" name="message" type="xsd:string"/><xsd:element maxOccurs="1" minOccurs="0" name="severity" type="xsd:string"/><xsd:element maxOccurs="1" minOccurs="0" name="source" type="xsd:string"/><xsd:element maxOccurs="1" minOccurs="0" name="timestamp" type="xsd:string"/><xsd:element maxOccurs="1" minOccurs="0" name="type" type="xsd:string"/><xsd:element maxOccurs="1" minOccurs="1" name="uuid" type="xsd:string"/></xsd:sequence></xsd:complexType></xsd:element><xsd:element name="insertResponse"><xsd:complexType><xsd:sequence><xsd:element maxOccurs="1" minOccurs="1" name="sys_id" type="xsd:string"/><xsd:element maxOccurs="1" minOccurs="1" name="table" type="xsd:string"/><xsd:element maxOccurs="1" minOccurs="1" name="display_name" type="xsd:string"/><xsd:element maxOccurs="1" minOccurs="1" name="display_value" type="xsd:string"/><xsd:element maxOccurs="1" minOccurs="1" name="status" type="xsd:string"/><xsd:element maxOccurs="1" minOccurs="0" name="status_message" type="xsd:string"/><xsd:element maxOccurs="1" minOccurs="0" name="error_message" type="xsd:string"/></xsd:sequence></xsd:complexType></xsd:element></xsd:schema></wsdl:types><wsdl:message name="insertSoapOut"><wsdl:part name="imp_notification" element="tns:insertResponse"/></wsdl:message><wsdl:message name="insertSoapIn"><wsdl:part name="imp_notification" element="tns:insert"/></wsdl:message><wsdl:portType name="ServiceNowSoap"><wsdl:operation name="insert"><wsdl:input message="sncns:insertSoapIn"/><wsdl:output message="sncns:insertSoapOut"/></wsdl:operation></wsdl:portType><wsdl:binding name="ServiceNowSoap" type="sncns:ServiceNowSoap"><soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/><wsdl:operation name="insert"><soap:operation soapAction="http://www.service-now.com/imp_notification/insert" style="document"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation></wsdl:binding><wsdl:service name="ServiceNow"><wsdl:port name="ServiceNowSoap" binding="sncns:ServiceNowSoap"><soap:address location="http://Macintosh-7.local:8080/glide/imp_notification.do?SOAP"/></wsdl:port></wsdl:service></wsdl:definitions>

    샘플 SOAP 봉투

    <?xmlversion="1.0"encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><insert xmlns="http://www.service-now.com"><message xsi:type="xsd:string">Host 198.10.10.210 is down</message><uuid xsi:type="xsd:string">HGAF76251HGF1</uuid></insert></SOAP-ENV:Body></SOAP-ENV:Envelope>

    샘플 SOAP 응답

    <?xmlversion="1.0"encoding="UTF-8"?><SOAP-ENV:Envelope  SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"  xmlns:xsd="http://www.w3.org/2001/XMLSchema"  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP-ENV:Body><insertResponse><sys_id>b54aafbfc0a8006f0058db95daa5b88d</sys_id><table>incident</table><display_name>number</display_name><display_value>INC10008</display_value><status>ignored</status><status_message>No field values changed</status_message></insertResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>

    Perl을 사용한 발동 예

    다음 예시 스크립트에서는 알림 웹 서비스를 사용하여 itil 사용자로 인시던트를 생성합니다. Perl 언어와 SOAP::Lite 패키지를 사용합니다.
    #!/usr/bin/perl -w
     
    #use SOAP::Lite ( +trace => all, maptype => {} );use SOAP::Lite;
     
    sub SOAP::Transport::HTTP::Client::get_basic_credentials{return'itil'=>'itil';// set basic auth credentials for the itil user
    }
     
    my$soap= SOAP::Lite->proxy('http://localhost:8080/glide/imp_notification.do?SOAP');
     
    my$method= SOAP::Data->name('insert')->;attr({xmlns =>'http://www.service-now.com/'});
     
    # insert into the web servicemy@params=( SOAP::Data->name(message =>'problem detected for database DB12DG'));push(@params, SOAP::Data->name(source =>'DB12DG'));push(@params, SOAP::Data->name(uuid =>'HGAF76251HGF2'));
     
    my$result=$soap->call($method=>@params);
     
    print_fault($result);//print any SOAP faults
    print_result($result);//print any results
     
    sub print_result {my($result)=@_;if($result->body&&$result->body->{'insertResponse'}){my%keyHash=%{$result->body->{'insertResponse'}};foreachmy$k(keys%keyHash){print"name=$k   value=$keyHash{$k}\n";}}}
     
    sub print_fault {my($result)=@_;if($result->fault){print"faultcode=".$result->fault->{'faultcode'}."\n";print"faultstring=".$result->fault->{'faultstring'}."\n";print"detail=".$result->fault->{'detail'}."\n";}}
    다음은 콘솔의 Perl 스크립트에 의해 출력된 결과입니다.
    name=display_value   value=INC10011
    name=status   value=inserted
    name=table   value=incident
    name=display_name   value=number
    name=sys_id   value=cd45649c0a0a0b2b00e6f27649d6bd2c
    다음 이미지는 임포트 세트 테이블 알림 (imp_notification)에 대해 생성된 결과 행을 보여줍니다.
    그림 2. WS Iset Perl