User Guide > Publishing Resources > Web Services Security > Creating and Using a Custom Security Policy for a Web Service
 
Creating and Using a Custom Security Policy for a Web Service
Security policies for Web services require a security protocol definition. You can import security policy files, or define a custom policy using the generic editor that TDV provides.
To create a custom security policy within TDV
1. Open Studio.
2. Expand localhost/policy/security/user.
To review the security policies that TDV provides, expand localhost/policy/security/system.
3. Right-click on user and select New Policy.
4. Type a name for the security policy.
5. The security policy editor opens in the workspace pane on the Policy tab.
6. Type or import your security policy.
To import your security policy, click Insert from File and browse to the file.
7. Edit the policy as needed.
8. Optionally, click Format the Policy to formatted it according to XML standards.
9. Optionally, add annotations to the policy on the Info tab.
10. Open a published SOAP Web service.
11. Save the new policy.
If your policy definition is invalid, your security policy is created, but the invalid code is not saved. To validate what code was saved for a security policy, close the editor and reopen your policy from the resource tree.
For more information, see Publishing a SOAP Data Service.
12. Navigate to the SOAP tab.
13. Left-click in the Value column next to Security Policy in the Services or the Operations part of the SOAP tab and choose your custom security policies from the drop-down list.
14. Save your changes.