다음을 통해 공유


FaultContractAttribute.ProtectionLevel 속성

정의

바인딩에서 SOAP 오류에 필요한 보호 수준을 지정합니다.

public:
 property System::Net::Security::ProtectionLevel ProtectionLevel { System::Net::Security::ProtectionLevel get(); void set(System::Net::Security::ProtectionLevel value); };
public System.Net.Security.ProtectionLevel ProtectionLevel { get; set; }
member this.ProtectionLevel : System.Net.Security.ProtectionLevel with get, set
Public Property ProtectionLevel As ProtectionLevel

속성 값

ProtectionLevel

ProtectionLevel 값 중 하나입니다. 기본값은 None입니다.

설명

FaultDescription.ProtectionLevel SOAP 오류를 보낼 때 바인딩이 암호화, 서명 또는 둘 다 사용해야 하는 정도를 지정하려면 이 속성을 사용합니다. 작업의 오류는 계약에 대한 보안 보호 수준 요구 사항을 명시적으로 결정하는 것이 좋습니다. 기본 보호 수준은 ProtectionLevel.None정의 중인 SOAP 오류 메시지에 암호화 또는 디지털 서명이 필요하지 않음을 의미합니다(바인딩이 이 지원을 제공하도록 구성된 경우 지원은 제공할 수 있음). 오류 메시지에 중요한 정보가 전달되거나 보안 문제가 발생할 수 있는 경우 속성을 설정하는 ProtectionLevel.EncryptAndSign것이 ProtectionLevel 좋습니다. 보안 문제에 대한 자세한 내용은 보호 수준 이해를 참조하세요.

런타임 시 보호 동작은 계층 구조가 있는 보호 수준 속성의 조합입니다. 가장 바깥쪽 값을 설정하면 더 좁은 범위에 대해 다른 값이 명시적으로 설정되지 않는 한 모든 좁은 범위에 대한 기본 설정이 설정됩니다. 이 경우 외부 값은 구체적으로 설정된 것을 제외하고 모든 좁은 범위의 기본값으로 유지됩니다.

예를 들어 설정 ProtectionLevel.EncryptAndSign 되고 다른 좁은 범위에 보호 수준 설정이 없는 경우 ServiceContractAttribute.ProtectionLevel 오류 메시지를 포함하여 작업 계약의 모든 메시지가 암호화되고 서명됩니다. 그러나 이러한 작업 중 하나에 설정된 ProtectionLevel.Sign경우 해당 작업에 OperationContractAttribute 대한 메시지는 서명되지만 계약의 다른 모든 메시지는 오류 메시지를 포함하여 암호화되고 서명됩니다.

이러한 값이 설정된 범위는 다음과 같습니다.

ServiceContractAttribute.ProtectionLevel

OperationContractAttribute.ProtectionLevel

FaultContractAttribute.ProtectionLevel

MessageContractAttribute.ProtectionLevel

의 속성입니다 MessageContractMemberAttribute.ProtectionLevel System.ServiceModel.MessageHeaderAttribute.

의 속성입니다 MessageContractMemberAttribute.ProtectionLevel System.ServiceModel.MessageBodyMemberAttribute.

계약에 명시적으로 지정된 보호 수준이 없고 기본 바인딩이 보안(전송 또는 메시지 수준)을 지원하는 경우 전체 계약의 유효 보호 수준은 다음과 같습니다 ProtectionLevel.EncryptAndSign. 바인딩이 보안(예: BasicHttpBinding)을 지원하지 않는 경우 유효 System.Net.Security.ProtectionLevelProtectionLevel.None 전체 계약에 대한 것입니다. 결과적으로 엔드포인트 바인딩에 따라 계약이 지정한 경우에도 클라이언트에 다른 메시지 또는 전송 수준 보안 보호가 필요할 수 있습니다 ProtectionLevel.None.

적용 대상