Prior to using queue-based security, WebSphere MQ Everyplace owned authenticatable entities must have credentials. This is achieved by completing the correct configuration so that auto-registration of queue managers is triggered. This requires the following steps:
Prior to using message-level security to protect messages using MQeMTrustAttribute, the application must use private registry services to ensure that the initiating and recipient entities have credentials. This requires the following steps:
/* SIMPLE MQePrivateRegistry FRAGMENT*/ try { /* setup PrivateRegistry parameters */ String EntityName = "Bruce"; String EntityPIN = "11111111"; Object KeyRingPassword = "It_is_a_secret"; Object CertReqPIN = "12345678"; Object CAIPAddrPort = "9.20.X.YYY:8082"; /* instantiate and activate a Private Registry. */ MQePrivateRegistry preg = new MQePrivateRegistry( ); preg.activate( EntityName, /* entity name */ ".//MQeNode_PrivateRegistry", /* directory root */ EntityPIN, /* private reg access PIN */ KeyRingPassword, /* private credential keyseed */ CertReqPIN, /* on-time-use Cert Req PIN */ CAIPAddrPort ); /* addr and port MiniCertSvr */ trace(">>> PrivateRegistry activated OK ..."); } catch (Exception e) { e.printStackTrace( ); }