How do I identify what transports/business agreements a certificate (Public Key) is attached to?

How do I identify what transports/business agreements a certificate (Public Key) is attached to?

book

Article ID: KB0070345

calendar_today

Updated On:

Products Versions
TIBCO BusinessConnect 7.x.x

Description

The following database queries can be used to identify what transports/business agreements a public key is attached to. Please Note that the below queries are for an Oracle database, the syntax will have to be modified for use against Microsoft SQL Server, IBM DB2, or MySQL.

 

Environment

all platforms

Resolution

Let's say the cert name the you configured in BC is "bcpartner1_cert.p7b", then you can use the below query to search transport and bizagreement which use this cert

/* partner outbound transport which use the cert */

SELECT a.OBJNID as OB_transport, c.OBJNID as protocol, d.OBJNID as partner
FROM bc74.bc_channelinfo a, bc74.bc_keystoreitem b, bc74.bc_protocol c, bc74.bc_participant d
where a.CERT_OID = b.OBJOID and b.OBJNID = "bcpartner1_cert.p7b"
and a.OWNER_OID = c.OBJOID and c.OWNER_OID = d.OBJOID;

/* inbound transport configured in bizagreement which use the cert */

SELECT a.OBJNID as IB_transport, d.OBJNID as protocolBinding, c.DISPLAY_NAME as bizagreement
FROM bc74.bc_channelinfo a, bc74.bc_keystoreitem b, bc74.bc_bizagreement c, bc74.bc_pb d, bc74.bc_pbv e
where a.CERT_OID = b.OBJOID and b.OBJNID = "bcpartner1_cert.p7b"
and a.OWNER_OID = e.OBJOID and e.OWNER_OID = d.OBJOID and d.OWNER_OID = c.OBJOID;

/* bizagreement which might refer the cert*/

SELECT a.DISPLAY_NAME as bizagreement
FROM bc74.bc_bizagreement a, bc74.bc_pb b, bc74.bc_pbv c
where c.OWNER_OID = b.OBJOID and b.OWNER_OID = a.OBJOID

/* bizagreement directly use this cert in Transport Tab */

and (c.CERT_OID in (SELECT OBJOID FROM bc74.bc_keystoreitem where OBJNID = "bcpartner1_cert.p7b")

/* bizagreement primary transport use this cert */

or c.PRIMARY_OID in (SELECT d.OBJOID FROM bc74.bc_channelinfo d, bc74.bc_keystoreitem e
where d.CERT_OID = e.OBJOID and e.OBJNID = "bcpartner1_cert.p7b")

/* bizagreement backup transport use this cert */

or c.BACKUP_OID in (SELECT d.OBJOID FROM bc74.bc_channelinfo d, bc74.bc_keystoreitem e
where d.CERT_OID = e.OBJOID and e.OBJNID = "bcpartner1_cert.p7b")
);

Issue/Introduction

How do I identify what transports/business agreements a certificate (Public Key) is attached to?