from psdi.server import MXServer
if mbo.getString("ASSETNUM") == '10002':
service.error("cust",MXServer.getMXServer().getProperty("mxe.db.password"))
Original Post: http://vietmaximo.blogspot.com/2020/07/display-password-stored-in-system.html
from psdi.server import MXServer
if mbo.getString("ASSETNUM") == '10002':
service.error("cust",MXServer.getMXServer().getProperty("mxe.db.password"))
Original Post: http://vietmaximo.blogspot.com/2020/07/display-password-stored-in-system.html
assetMboSet = mbo.getMboSet("ASSET")
assetMboSet.setFlag(MboConstants.DISCARDABLE, true)
curMbo = mbo.moveFirst()
while
curMbo != None:
curMbo = mbo.moveNext().
import java.util.ArrayList;
import java.util.HashMap;
import javax.servlet.http.HttpServletRequest;
import com.ibm.websphere.security.NotImplementedException;
import com.ibm.ws.wssecurity.saml.common.util.UTC;
import com.ibm.wsspi.security.web.saml.AuthnRequestProvider;
.........
public HashMap <String, String> getAuthnRequest(HttpServletRequest req, String errorMsg,
String acsUrl, ArrayList<String> ssoUrls)
throws NotImplementedException {
//create map with following keys
HashMap <String, String> map = new HashMap <String, String>();
String ssoUrl = "https://example.com/saml20/Login";
map.put(AuthnRequestProvider.SSO_URL, ssoUrl);
String relayState = generateRandom();
map.put(AuthnRequestProvider.RELAY_STATE, relayState);
String requestId = generateRandom();
map.put(AuthnRequestProvider.REQUEST_ID, requestId);
//create AuthnRequest
String authnMessage = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
+"<samlp:AuthnRequest xmlns:samlp=\"urn:oasis:names:tc:SAML:2.0:protocol\" "
+"ID=\""+requestID+"\" Version=\"2.0\" "
+ "IssueInstant=\"" +UTC.format(new java.util.Date())+ "\" ForceAuthn=\"false\" IsPassive=\"false\""
+ "ProtocolBinding=\"urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST\" "
+ "AssertionConsumerServiceURL=\"" +acs+"\" "
+ "Destination=\"" +destination +"\"> "
+ "<saml:Issuer xmlns:saml=\"urn:oasis:names:tc:SAML:2.0:assertion\">"
+ issuer
+"</saml:Issuer> <samlp:NameIDPolicy"
+"Format=\"urn:oasis:names:tc:SAML:2.0:nameid-format:transient\""
+"SPNameQualifier=\"mysp\""
+"AllowCreate=\"true\" /> <samlp:RequestedAuthnContext Comparison=\"exact\"> "
+"<saml:AuthnContextClassRef xmlns:saml=\"urn:oasis:names:tc:SAML:2.0:assertion\">"
+"urn:oasis:names:tc:SAML:2.0:ac:classes:</samlp:RequestedAuthnContext> </samlp:AuthnRequest>";
map.put(AuthnRequestProvider.AUTHN_REQUEST, authnMessage);
return map;
}
private String generateRandom() {
//implement code that generates a random alpha numeric String that is unique
//each time it is invoked and cannot be easily predicted (like a counter)
}
log = MXLoggerFactory.getLogger("maximo.application.AUTOSCRIPT")
scriptname="<script name>"
log.info("******Entering Autoscript : " +scriptname +"******")
log.debug("[DEBUG] script "+scriptname+" <Message>")
log.info("******Existing Autoscript : " +scriptname +"******")
except Exception, e:
print >> sys.stderr, "[ERROR] script "+scriptname+" failed: ",e.message
print >> sys.stdout, "[ERROR] script "+scriptname+" failed: ",e.message
log.error("[ERROR] script "+scriptname+" failed: " +e.message)
mboSet = mbo.getThisMboSet()
mbo.getMboSet("PR")where PR is the Relation Name already exists in database configuration from this record.
woSet = mbo.getMboSet("woSet ", "WORKORDER", "status = 'APPR' and siteid = 'BEDFORD'")
woSet = MXServer.getMXServer().getMboSet("WORKORDER", userInfo)
server = MXServer.getMXServer()userInfo = mbo.getUserInfo()whereClause = <CONDITION>server.lookup("MIC").exportData("<Publish Channel Name>", "<External System Name>", whereClause, userInfo, 1000)
micSrv = MXServer.getMXServer().lookup("MIC")server.lookup("MIC").exportData("MXPO", "LegecyApp", " ponum='"+vPONum+"' and revisionnum="+vREVNUM , micSrv.getNewUserInfo() , 1)
Note:
Mic is old service name for MIF, but still the same name
Label: Refresh PR
Event: reset
Target id: results_showlist