Posts tagged custom policy
OWSM Custom x509 Assertion – Part 2 – Creating outgoing client assertion
0In the previous post I explained how you can access the credential store and keystore using the configurations stored in the jsp-config.xml file. I also explained how you can read assertion properties. I put this code inside my base class CustomAssertion.java. This class has been repeated here below
[sourcecode language="java" collapse="true" autolinks="false"]
package nl.amis.custompolicy.simplex509;
import java.security.cert.X509Certificate;
import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Properties;
import javax.xml.namespace.NamespaceContext; import javax.xml.xpath.XPath; import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathExpressionException; import javax.xml.xpath.XPathFactory;
import oracle.security.jps.service.credstore.CredentialStore;
import oracle.wsm.common.sdk.IContext; import oracle.wsm.common.sdk.IMessageContext; import oracle.wsm.common.sdk.WSMException; import oracle.wsm.policy.model.IAssertion; import oracle.wsm.policy.model.IAssertionBindings; import oracle.wsm.policy.model.IProperty; import oracle.wsm.policy.model.impl.Config; import More >
OWSM Custom Policies – Still some sharp edges, so beware! don't cut yourself.
0In my last post I talked about using an out-of-the-box policy to sign your outgoing SOAP Message. Although it is not very well documented when you figure out how to configure the keystore and credential store it is quite simple to use. The problem is that the out-of-the-box policies need some tailoring before they can be used in the real world situations. Unfortunately I was only able to sign the entire body and not a specific element. What I needed was a more basic policy that only signs a specific element. So I needed to create a custom policy to do this. According to the documentation there is an API I can use, extend some classes and you can create your own policies. Simple, well in theory…
Â
Image is copyrighted. Used with permission from DuraLabel.com
Recent Comments