I want to automate a change that can be done in the WAS admin console via Jython.
I want to configure the Inbound transport panels in the administrative console to change Transport to SSL supported.
The auto generated script is as follows:
# Transport SSL Supported
#AdminTask.configureCSIInbound('[-messageLevelAuth Supported -supportedAuthMechList LTPA|BASICAUTH -clientCertAuth Supported -transportLayer Supported -sslConfiguration -enableIdentityAssertion false -statefulSession true -enableAttributePropagation true -trustedIdentities ]')
I am waiting for confirmation from the client that this is acceptable. However I thought there may be a better way to do this.
I am trying to change these lines in the security.xml
<CSI xmi:id="IIOPSecurityProtocol_1">
64 <claims xmi:type="orb.securityprotocol:CommonSecureInterop" xmi:id="CSIv2 Inbound Configuration" stateful="true">
....................
....................
73 <layers xmi:type="orb.securityprotocol:TransportLayer" xmi:id="TransportLayer_1">
74 <requiredQOP xmi:type="orb.securityprotocol:TransportQOP" xmi:id="TransportQOP_2"
establishTrustInClient="false" enableProtection="true" confidentiality="false" integrity="true"/>
75 <supportedQOP xmi:type="orb.securityprotocol:TransportQOP" xmi:id="TransportQOP_1"
establishTrustInClient="true" enableProtection="false" confidentiality="true" integrity="true"/>
76 <serverAuthentication xmi:id="IIOPTransport_1" sslConfig=""/>
77 </layers>
78 </claims>
My script fails at the change itself.
AdminConfig.modify(requiredQOP, '[[establishTrustInClient "false"]]')
AdminConfig.modify(supportedQOP, [["establishTrustInClient", "true"]] )
Here is the complete script.
aSec = AdminConfig.getid('/Security:/')
csi = AdminConfig.showAttribute(aSec, "CSI")
claim = AdminConfig.showAttribute(csi, "claims")
if (claim.find('CSIv2 Inbound Configuration')!= -1):
layers = AdminConfig.showAttribute(claim, "layers" )
layList = layers[1:len(layers)-1].split(" ")
for aLayer in layList:
if (aLayer.find('TransportLayer')!= -1):
supportedQOP = AdminConfig.showAttribute(aLayer, "supportedQOP" )
requiredQOP = AdminConfig.showAttribute(aLayer, "requiredQOP" )
AdminConfig.modify(requiredQOP, '[[establishTrustInClient "false"]]')
AdminConfig.modify(supportedQOP, [["establishTrustInClient", "true"]] )
print AdminConfig.queryChanges()
AdminConfig.save()
When I query the changes via the penultimate line the security.xml does not change. I thought that this may be as a result of the Global Security. However Global Security is false.
wsadmin>AdminTask.isAppSecurityEnabled()
u'true'
wsadmin>AdminTask.isGlobalSecurityEnabled()
u'false'
Why might the modify not actually work?
Kind regards,
------------------------------
Amit Kapila
AmitKapila
------------------------------