Policy Support in the Editor
bfitzpat Aug 27, 2012 12:06 PMI've started looking at how to support SWITCHYARD-950 in the editor, which adds policy support to the editor.
Based on the documentation (https://docs.jboss.org/author/display/SWITCHYARD/Policy), it looks like we need the ability to specify a few things as properties on a component service:
- The Transaction Policy can be set for a component service to: propagatesTransaction or suspendsTransaction, which is added to the "requires" attribute. (i.e. "<service name="WorkService" requires="propagatesTransaction">"). This is optional in the configuration file and may also be specified in the service implementation via a @Requires annotation (i.e. "@Requires(transaction = TransactionPolicy.PROPAGATES_TRANSACTION)"),
- The Security Policy (which may involve changes once David is done) is also set for a component service. The config can specify "clientAuthentication" and/or "confidentiality" in the requires attribute (i.e. "<service name="WorkService" requires="clientAuthentication, confidentiality">"). Again, this is optional, and may be specified via the @Requires annotation in the service implementation (i.e. "@Requires(security = {SecurityPolicy.CLIENT_AUTHENTICATION, SecurityPolicy.CONFIDENTIALITY})").
It appears that the transaction policy is limited to the bean implementation and JMS endpoints in the Camel gateway (binding).
And security policy is limited to the bean implementation and the SOAP endpoint in the SOAP gateway (binding). (And this may be changing due to David's work with the security handling.)
I have a few questions:
- What quickstarts should I look at for examples of these policy properties?
- How visible should these properties be? I'm thinking of just adding a "Policy" property page for component services that shows available options where supported or disables the controls if not.
- Can the user use one or the other of the security policy options? Or is it a requirement that both be used? I'm looking at checkboxes for the client authentication and confidentiality options.
- Transaction policy will likely become a new drop-down list (so the user can clear the selection or select propagates or suspends transaction).
- Are more policies going to be added in the future? Any thoughts on how much room for customization should be here?
Thanks in advance for any and all help!