다음을 통해 공유


HTTP 및 HTTPS 엔드포인트에 보안 액세스 정책 할당

실행(run-as) 정책을 적용하고 서비스 매니페스트가 HTTP 엔드포인트 리소스를 선언하면 SecurityAccessPolicy를 지정해야 합니다. SecurityAccessPolicy는 이러한 엔드포인트에 할당된 포트가 서비스를 실행하는 사용자 계정으로 제대로 제한되도록 합니다. 그러지 않으면 http.sys 가 해당 서비스에 액세스할 수 없고 클라이언트의 호출과 함께 오류가 발생합니다. 다음은 EndpointName이라는 엔드포인트에 Customer1 계정을 적용하여 전체 액세스 권한을 부여하는 예제입니다.

<Policies>
  <RunAsPolicy CodePackageRef="Code" UserRef="Customer1" />
  <!--SecurityAccessPolicy is needed if RunAsPolicy is defined and the Endpoint is http -->
  <SecurityAccessPolicy ResourceRef="EndpointName" PrincipalRef="Customer1" />
</Policies>

HTTPS 엔드포인트의 경우, 클라이언트에 반환할 인증서의 이름도 표시합니다. 인증서는 EndpointBindingPolicy를 사용하여 참조합니다. 인증서는 애플리케이션 매니페스트의 인증서 섹션에 정의되어 있습니다.

<Policies>
  <RunAsPolicy CodePackageRef="Code" UserRef="Customer1" />
  <!--SecurityAccessPolicy is needed if RunAsPolicy is defined and the Endpoint is http -->
  <SecurityAccessPolicy ResourceRef="EndpointName" PrincipalRef="Customer1" />
  <!--EndpointBindingPolicy is needed if the EndpointName is secured with https -->
  <EndpointBindingPolicy EndpointRef="EndpointName" CertificateRef="Cert1" />
</Policies>

Warning

HTTPS를 사용하는 경우 동일한 노드에 배포된 다른 서비스 인스턴스(애플리케이션과 독립적)에 동일한 포트 및 인증서를 사용하지 않습니다. 다른 애플리케이션 인스턴스에서 동일한 포트를 사용하는 두 가지 다른 서비스를 업그레이드하면 업그레이드 오류가 발생합니다. 자세한 내용은 HTTPS 엔드포인트로 여러 애플리케이션 업그레이드를 참조하세요.

다음 단계는 아래 문서를 참조하세요.