Web services security, or to be more precise, SOAP message security identifies and provides solutions for general computer security threats as well as threats unique to Web services. WSO2 supports WS Security, WS-Policy and WS-Security Policy specifications. These specifications define a behavioral model for Web services. Since a requirement for one Web service may not be valid for another, the Data Services Server also helps defining service-specific security.
It provides 16 predefined, commonly-used security scenarios. All you have to do is to apply the required security scenario into your service through the service's dashboard. You can also define a custom security policy. Understanding the exact security requirements is the first step in planning to secure Web services. Consider what security aspects are important to your service, whether it is the integrity, confidentiality, or both.
Configuring security features
Security features are disabled in services by default. The following steps explain how to enable and configure them.
- Log in to the management console and select Services > List under the Main menu.
- From the Deployed Services page that appears, click the service to which you want to enable security.
- The service's dashboard opens. Click Security from the Quality of Service Configuration panel.
- Enable security for the service by selecting Yes .
Enable the options you require from the list of 16 default security scenarios that appears. You can read more details of the scenarios by clicking the browse icon in front of them.
You can read more information about each security scenario by clicking on the icon next to each. We have also given a graphical view of each scenario in the next section.
In addition to the default security scenarios, you can also refer to a custom security policy that is stored in Configuration Registry or Governance Registry.
Click Next to open the Activate Security page, using which you can configure the security features selected previously.
If you selected a default security scenario, this page shows you the user groups, key stores etc. according to the selected security scenario. For example,
- In a default scenario, if you select a policy that includes Username Token, you get the User Group panel to choose the users who are allowed to access the service
- In a default scenario, if you have selected a policy that requires signing or encryption, the Trusted Key Stores and Private Key Store panels appear.
If you refer to a custom security policy from Registry, this page shows all options on user groups and key stores from which you can select the ones relevant to your policy. Even if you select irrelevant options, they will not be used at runtime.
The default security scenarios
The topics below explain the 16 default security scenarios provided by WSO2.
5. Sign and encrypt - X509 Authentication
6. Sign and Encrypt - Anonymous clients
7. Encrypt only - Username Token Authentication
8. Sign and Encrypt - Username Token Authentication
9. SecureConversation - Sign only - Service as STS - Bootstrap policy - Sign and Encrypt , X509 Authentication
10. SecureConversation - Sign Only - Service as STS - Bootstrap policy - Sign and Encrypt , Anonymous clients
11. SecureConversation - Sign and Encrypt - Service as STS - Bootstrap policy - Sign and Encrypt , X509 Authentication
12. SecureConversation - Sign Only - Service as STS - Bootstrap policy - Sign and Encrypt , Anonymous clients
13. SecureConversation - Sign and Encrypt - Service as STS - Bootstrap policy - Sign and Encrypt , Anonymous clients
14. SecureConversation - Encrypt Only - Service as STS - Bootstrap policy - Sign and Encrypt , Username Token Authentication
15. SecureConversation - Sign and Encrypt - Service as STS - Bootstrap policy - Sign and Encrypt , Username Token Authentication
16. Kerberos Token-based Security
If you apply security scenario 16 (Kerberos Token-based Security), you must associate your service with a service principal. Security scenario 16 is only applicable if you have a Key Distribution Center (KDC) and an Authentication Server in your environment. Ideally you can find KDC and an Authentication Server in a LDAP Directory server.
Two configuration files are used to specify Kerberos related parameters as follows.
- krb5.conf - Includes KDC server details, encryption/decryption algorithms etc.
- jaas.conf - Includes information relevant to authorization.
The above files are located in
After selecting scenario 16, fill information about the service principal to associate the Web service with. You must specify the service principal name and password. The service principal must be already defined in the LDAP Directory server.