简体   繁体   中英

How to secure Azure Relay Service Bus Endpoint

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM