Hi Snehal
Good questions.
For #1, the Truststore in Edge is something you may optionally add to a virtual host. This “Virtual host” is the thing that defines the properties for the inbound endpoint on Apigee Edge - for example the server certificate presented, if any, and the client certs or CAs that will be trusted, if any.
THEN, after defining the vhost, you configure your API proxies to listen on that named vhost, using confguration in the ProxyEndpoint. Like this:
<ProxyEndpoint name='default'>
<Description>...whatever...</Description>
<HTTPProxyConnection>
<BasePath>/snehal-1</BasePath>
<Properties/>
<!-- specify the name of the vhost here -->
<VirtualHost>secure2way</VirtualHost>
</HTTPProxyConnection>
...
But be aware: if you are using the Apigee Edge SaaS, you are not able, at this moment, to create your own vhosts. You must contact Apigee Support to request the configuration of a new vhost.
For #2, you have options.
Option 1: you can specify the root CA (and maybe other CAs in the chain) in the Truststore for the vhost. In that case, any in bound request toward that vhost, bearing a certificate signed by any member of the chain will be trusted by Apigee Edge. If you would like to be more discriminating, you can interrogate the CN from the cert in the API Proxy. I think the scenario you are describing is one in which … your API Proxy receives a call from client Alice, who presents a valid certificate that is certified by someone you trust (let’s say, Verisign, or GTE Cybertrust). Therefore Alice is authentic, but you want to reject all inbound calls that are not from Bob. The Virtual Host will allow the inbound call. Your API Proxy can use a Policy Step like this to reject calls that are not from Bob:
<Step>
<Name>RaiseFault-Unauthorized</Name>
<Condition>client.cn != "Bob"</Condition>
</Step>
The client.cn is a variable that will be populated into the message context when a request arrives via a 2-ay TLS connection. There are other variables populated about the client. You can find more information about these TLS-specific variables populated in the message context on this documentation page.
Option 2: you can specify ONLY the cert for the specific client in the Truststore. In that case, the vhost will work ONLY with clients that present that specific certificate. In this case the client.cn (and the other variables) will always be the CN on that specific client cert. This latter option works with self-signed certificates.
Good luck!