public String getContextSecret(EndpointReferenceType ref)
throws ContextBrokerException {
final ResourceKey ctxKey = this.getResourceKey(ref);
final ContextBrokerResource resource =
this.findResourceNoSecurity(ctxKey);
BootstrapInformation bootstrap = resource.getBootstrap();
// current secret string is a separated list:
/*
Separator
Position 0: Public certificate (pem) to contact ctx service
Separator
Position 1: Private key (pem) to contact ctx service
Separator
*/
StringBuffer buf = new StringBuffer();
buf.append(ContextBrokerHome.FIELD_SEPARATOR)
.append(bootstrap.getPublicX509String())
.append(ContextBrokerHome.FIELD_SEPARATOR)
.append(bootstrap.getPrivateString())
.append(ContextBrokerHome.FIELD_SEPARATOR);
return buf.toString();
}