Revisando una beta snapshot del WSO2 ESB v4.9.0 me he dado cuenta de que desde la consola web ha sido eliminada la funcionalidad de agregarle seguridad a un servicio proxy. Algo que podía realizarse dando par de clic ahora ya no se puede.
En su lista de desarrollo aparece el correo siguiente:
=======================================================================
Hi ESB team,
Since Applying QOS is moved completely to developer studio from ESB 4.9.0 release (no UI support in ESB), do we have a way to migrate services that has QOS applied (secured proxy services etc..)?
We can't just copy those artifacts to ESB 4.9.0. I tried but it's not supported (Issue reported at [1]). Is there some workaround or are we going to fix it?
[1] https://wso2.org/jira/browse/ESBJAVA-3909
=======================================================================
Y luego la respuesta que le dan:
=======================================================================
I've used following way to enable security to the proxy service from Dev Studio project. I think this will help you.
1. Create the policy
- Create a proxy service from ESB management console. (lets say passthroughProxy)
- Apply security (Username token) from management console
- Go to the source view of passthroughProxy and you may see something like follows is added to that.
<enableSec/>
<policy key="conf:/repository/axis2/service-groups/passthrough/services/passthrough/policies/UTOverTransport"/>
2. Browse the registry from management console to locate the /repository/axis2/service-groups/passthrough/services/passthrough/policies/ and download the UTOverTransport file and rename it as UTOverTransport.xml
3. Create a registry resource from policy
- Create a registry resource project from devstudio
- Create a registry resource and choose “import from file system” in the wizard and point to the UTOverTransport.xml which we have downloaded in 4.
- Create a ESB project and proxy service if you don’t have already.
- Go to the proxy service properties as in[1] and configure securtyEnable=true and policyKey. When setting policy key you have to point to the registry resource we created in 2.2
- Additionally add the following parameter in ServiceParameters section.
5. Once you configured you will see the source of your proxy config as follows
<proxy xmlns="http://ws.apache.org/ns/synapse" name="LoopBackProxy" transports="http https" startOnLoad="true" trace="disable">
<target>
<inSequence>
<log level="full"/>
<respond/>
</inSequence>
<outSequence/>
<faultSequence/>
</target>
<policy key="conf:custom/UTOverTransport.xml"/>
<parameter name="allowRoles">admin</parameter>
<enableSec/>
</proxy>
6. Deploy
- Create a composite application project
- Tick (check) your proxy from ESB project and UTOverTransport from Registry project to include them to the project. When adding use server role as EnterpriseServiceBus for both proxy and policy since we are going to deploy both in ESB
- Right click on created composite project and select “Export as Deployable archive”
Que opinan de este cambio?
WSO2 ESB v4.9.0: Un cambio a tener en cuenta.