Code Monkey home page Code Monkey logo

Comments (11)

kpajdzik avatar kpajdzik commented on August 16, 2024

@v-Ajnava, could you take a look at this issue or provide us with correct point of contact?

from azure-sdk-for-js.

praries880 avatar praries880 commented on August 16, 2024

Thank you for opening this issue! We are routing it to the appropriate team for follow up.

from azure-sdk-for-js.

ramya-rao-a avatar ramya-rao-a commented on August 16, 2024

This is when using the azure-sb library, therefore moving it to the right repo

from azure-sdk-for-js.

ramya-rao-a avatar ramya-rao-a commented on August 16, 2024

@amarzavery This looks like the issue with how expiry dates are dealt with inside of azure-common.
If we expect the same to happen in the new service bus library, then moving it to the new repo makes sense, else this is a bug fix needed in azure-common. Am I missing something?

from azure-sdk-for-js.

amarzavery avatar amarzavery commented on August 16, 2024

I feel this seems to be a service side issue and not an issue with the client. If this is a client side issue then I would recommend to ensure that this doesn't happen in the new library that is developed for http based atom apis

from azure-sdk-for-js.

ramya-rao-a avatar ramya-rao-a commented on August 16, 2024

Fair point, will transfer back and loop in the service team. Thanks!

from azure-sdk-for-js.

 avatar commented on August 16, 2024

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @jfggdl

from azure-sdk-for-js.

 avatar commented on August 16, 2024

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @jfggdl

from azure-sdk-for-js.

jfggdl avatar jfggdl commented on August 16, 2024

@nemakam, would you please confirm that this is a service-side issue. If so, would you please update the milestone date?

from azure-sdk-for-js.

nemakam avatar nemakam commented on August 16, 2024

@ramya-rao-a @amarzavery , this should be a client side bug. Service code never deals with localized time and only deals with UTC. In this particular case, service takes in a token (cbs link) which has the timeout mentioned, in UTC, and returns the token validity value, again in UTC. The client should take care of localizing it and make sure than changes in daylight savings doesn't affect the way token renewal happens within the client

from azure-sdk-for-js.

chradek avatar chradek commented on August 16, 2024

When looking at how azure-sb handles the expiration date for credentials, the only thing that stuck out was it was using the minutesFromNow helper method in azure-common:
https://github.com/Azure/azure-sdk-for-node/blob/6faf0dce4bb2a7d65592047852cb5abeb5282bbc/lib/common/lib/util/date.js#L53-L56

This method probably could be using setUTCMinutes and getUTCMinutes instead of setMinutes and getMinutes, but I don't think this would actually cause an issue unless DST caused the clock change by a fraction of an hour.

I also found similar logic around how we were caching the accessToken for the credential. There we were using getMilliseconds and setMilliseconds instead of the UTC variants. It still seems unlikely though that this would cause the issue noted above (I could see getHour causing an issue, but that isn't being called in any code paths).

That said, I did check that in core-amqp/amqp-common we're setting the expiration on the UTC value given from the date object, so should not have this issue in @azure/service-bus which replaces azure-sb. I also confirmed that core-http/core-auth are working with UTC times directly. I'm closing this issue for now, though we can reopen if it comes up in @azure/service-bus.

from azure-sdk-for-js.

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.