Comments (13)
I feel like this is a valid concern because there have recently been publications of several exploits in modern NTP servers, and, I understand more than one reputable NTP providers was actually compromised.
I think the 2015 workaround is reasonable, though better still might be if the minimum date timer were that of the credential build.
from credential.
I think the 2015 workaround is reasonable, though better still might be if the minimum date timer were that of the credential build.
Would make sense, but might be overkill (more code and more moving parts might introduce an even bigger risk).
from credential.
I feel like this is a valid concern because there have recently been publications of several exploits in modern NTP servers, and, I understand more than one reputable NTP providers was actually compromised.
Doesn't the OS do anything to mitigate this kind of attack? Like consulting multiple services?
from credential.
Doesn't the OS do anything to mitigate this kind of attack? Like consulting multiple services?
It is probably unwise to presume such mitigation exists and defeat all compromises.
from credential.
It is probably unwise to presume such mitigation exists and defeat all compromises.
I'm not trying to shift responsibility. Just asking out of curiosity.
from credential.
Hard-code a minimum. No added API for security risk.
from credential.
Would it be secure enough to check at init, or every time we want to use?
So I think we should replace Date.now()
by a function that throw an error if the time before 2015
And be aware: do not use (new Date).getFullYear()
to check the year and then Date.now()
to get the date
Just in case a third party module override only the now
function but don't change anything else
from credential.
Not sure whether it should throw or just use it as a minimum.
Anyway I would just store the Date.now()
call in a variable, check the variable to be greater than a hard-coded value, and then either throw or use Math.max(Date.now(), hardcoded)
.
from credential.
👍 yeah I agree, it might not be a good idea to throw :)
from credential.
I think hard-coding is better, as @ericelliott says.
The hard-coded minimum can be the build-date for the library.
from credential.
Hard-coding:
Build-time:
Throw: 👎 (I think console.warn
would be sufficient if it falls back to the hard-coded value - I'm afraid the other would cause too much of a surprise)
from credential.
We will just need to bump it every year, It's not a big deal ;)
from credential.
Math.max(Date.now(), hardcoded)
from credential.
Related Issues (20)
- callback, promise or both HOT 10
- I can't make the cli work HOT 8
- Verifying with a pre-parsed JSON object HOT 4
- What if an attacker know that I am using this library? HOT 9
- Why hash() just return string rather than object? HOT 2
- fix failing CI server
- Does it really needs webpack? HOT 7
- Node v6 deprecation - "crypto.pbkdf2 without specifying a digest is deprecated" HOT 3
- Release v2.0.0 on npm HOT 3
- Support bcrypt hashing method? HOT 1
- performance optimisation HOT 4
- Make errors programmatically processable HOT 7
- Do not encourage people to write security issue in public places HOT 1
- Default number of iterations seems extreme HOT 2
- Due to the large number of iterations, Its consuming the full CPU usage. HOT 7
- Update deps, freshen code, release new major version. HOT 7
- Bad default settings HOT 4
- the 'verify' function takes too much time, about 1.3 seconds HOT 2
- Inconsistent use of bytes length/encodings? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from credential.