Code Monkey home page Code Monkey logo

Comments (4)

tameraw avatar tameraw commented on July 20, 2024

@eggapauli -

What is the preferred way when we want to rotate SAS's regularly?

  • If you mean "renewing" of the SAS token, today the SDKs will do that for you automatically at 1 hour intervals.

Should the device then have two connection strings (one with primary and one with secondary key) and just try both of them? Is something like this supported in the SDK or is it even a common scenario?

  • Today this is not implemented out of the box in the SDK. However, this can be implemented on top of the SDK by using the SAS token as part of the connection string.

from azure-iot-sdk-csharp.

johannesegger avatar johannesegger commented on July 20, 2024

It's nice that the SDK automatically regenerates SAS Tokens.
But I think I used the wrong terminology, sorry. We want to rotate Shared Access Keys (the things that are part of the connection string). So if a shared access key is stolen we want to disable the key while keeping the device online (using the secondary key).
Is there some guidance or documentation if this is a good idea or if there are alternatives?

from azure-iot-sdk-csharp.

tameraw avatar tameraw commented on July 20, 2024

@eggapauli - The primary and secondary keys are provided to support rollover scenarios.
I've attached a sample on how to do that.

Program.txt

from azure-iot-sdk-csharp.

johannesegger avatar johannesegger commented on July 20, 2024

Nice, thanks. We thought of something like that, but we just weren't sure if it's a good idea because we couldn't find anything going in this direction. All the samples we found use a single connection string directly. This is now solved for me. Thanks for your support.

from azure-iot-sdk-csharp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.