<allow> Element (Policy)
Allows access to a Web service.
<policies> Element
<policy> Element (Policy)
<authorization> Element
<allow user role />
Attributes and Elements
Attributes
Attribute | Description |
---|---|
user |
Required attribute. Specifies a user name that is authorized access. Format is |
role |
Required attribute. Specifies a role that is authorized access. The role can be a local or domain group, such as |
Child Elements
None
Parent Elements
Element | Description |
---|---|
Specifies the users or roles that are authorized and denied access to a Web service. |
Remarks
For the <allow> element you can use either the user or role attribute, or both.
An <authorization> Element can have zero or more <allow> Element (Policy) and <deny> Element (Policy) child elements. Each of these child elements is an ordered list of authorization rules from top to bottom. The sender is authorized based on the first rule that applies to the sender. If an <authorization> element exists and no rules apply to a sender, access is denied.
Example
The following code example defines a policy assertion named kerberosAuthenticationKerberosProtection
that specifies that the user COHOWINERY\Enologist
and the users in the WineMaker
role are authorized access to the Web services to which this policy is applied. All other users are denied access to the Web service.
<policies>
<extensions>
<extension name="kerberosSecurity"
type="Microsoft.Web.Services3.Design.KerberosAssertion, Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<extension name="kerberos"
type="Microsoft.Web.Services3.Design.KerberosTokenProvider, Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<extension name="authorization"
type="Microsoft.Web.Services3.Design.AuthorizationAssertion, Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<extension name="requireActionHeader"
type="Microsoft.Web.Services3.Design.RequireActionHeaderAssertion, Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</extensions>
<policy name="kerberosAuthenticationKerberosProtection">
<authorization>
<allow user="COHOWINERY\Enologist" />
<allow role="WineMaker" />
<deny user="*" />
</authorization>
<kerberosSecurity establishSecurityContext="false" signatureConfirmation="false" protectionOrder="SignBeforeEncrypting" deriveKeys="true">
<token>
<kerberos targetPrincipal="host/grapes@cohowinery.com" impersonationLevel="Identification" />
</token>
<protection>
<request signatureOptions="IncludeAddressing, IncludeTimestamp, IncludeSoapBody" encryptBody="true" />
<response signatureOptions="IncludeAddressing, IncludeTimestamp, IncludeSoapBody" encryptBody="true" />
<fault signatureOptions="IncludeAddressing, IncludeTimestamp, IncludeSoapBody" encryptBody="false" />
</protection>
</kerberosSecurity>
<requireActionHeader />
</policy>
</policies>