1

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.

jessehouwing
  • 106,458
  • 22
  • 256
  • 341
Nil Pun
  • 17,035
  • 39
  • 172
  • 294
  • Just checked into a couple of your questions and it seems you always add "Thanks" to them. This is against the guidelines for SO. http://meta.stackexchange.com/a/3021/178881 – jessehouwing Mar 16 '15 at 12:38

1 Answers1

0

That is correct configuration.

Most common use is TokenProvider.CreateSharedAccessSignatureTokenProvider if you need to add it to your endpoint.

Petar Vučetin
  • 3,555
  • 2
  • 22
  • 31