Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
smartid-auth
Advanced tools
Smart-ID authentication module for Node.JS
npm install smartid-auth
cd node_modules/smartid-auth/
npm run demo [countrycode EE/LT/LV] [Personal-ID-Number]
Example: npm run demo EE 12345678901
Documentation is in progress, refer to the example below:
const SmartIDAuth = require('smartid-auth');
const smartauth = new SmartIDAuth({
host: 'https://sid.demo.sk.ee/smart-id-rp/v1',
requestParams: {
relyingPartyUUID: '00000000-0000-0000-0000-000000000000',
relyingPartyName: 'DEMO',
certificateLevel: 'QUALIFIED'
}
});
smartauth.authenticate('EE', 'ESTONIAN-ID-CODE-GOES-HERE', 'MESSAGE-TO-DISPLAY-ON-PHONE-GOES-HERE').then(session => {
// This is the verification code you should display to the user (on your site):
console.log('Verification code: ' + session.verificationCode);
console.log('Waiting for user action...');
session.pollStatus().then(response => {
console.log('Authentication OK!');
console.log(response.data);
}).catch(err => {
console.error('Authentication error', err);
});
}).catch(err => {
console.error('Error on initializing authentication', err);
});
$ npm run demo EE 10101010005
Verification code: 8865
Waiting for user action...
Authentication OK!
{ countryName: 'EE',
surname: 'SMART-ID',
givenName: 'DEMO',
serialNumber: 'PNOEE-10101010005',
commonName: 'SMART-ID,DEMO,PNOEE-10101010005',
organizationalUnitName: 'AUTHENTICATION' }
Smart-ID provides test accounts for automated testing.
Running npm run test
will go through those:
EndResult | Country | national-identity-number | certificateLevel |
---|---|---|---|
OK | EE | 10101010005 | QUALIFIED |
OK | LV | 010101-10006 | QUALIFIED |
OK | LT | 10101010005 | QUALIFIED |
USER_REFUSED | EE | 10101010016 | QUALIFIED |
USER_REFUSED | LT | 10101010016 | QUALIFIED |
FAQs
Smart-ID authentication client module for Node.JS
The npm package smartid-auth receives a total of 2 weekly downloads. As such, smartid-auth popularity was classified as not popular.
We found that smartid-auth demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.