We are using basicHttpRelayBinding for WCF service which is exposed via Azure Service bus Relay.
We need to apply the security for this service so that end points are secured. Could someone please confirm whether all we need to do is below?
<security mode="Transport" relayClientAuthenticationType="RelayAccessToken" />
....
<tokenProvider>
<sharedAccessSignature keyName="WebServiceCaller" key="XXX" />
</tokenProvider>
I've seen few example of on net using below and with token expiry etc. on client side code:
TokenFactory tf = new TokenFactory(
string.Format("{0}-sb", serviceNamespace),
issuerName,
issuerKey);
Just want to confirm the we are not missing anything that has security impact.
That is correct configuration.
Most common use is TokenProvider.CreateSharedAccessSignatureTokenProvider if you need to add it to your endpoint.