
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
devmtn-auth
Advanced tools
This module is a Passport strategy to allow for Devmountain microservice authentication with relatively little configuration. You get all the normal benefits of passport, including auth redirect/callback, req.user and req.logout(), and serializing the user onto the session. Successful authentication will provide a user object with email, user roles, and the unique id from the authentication server database. If your app needs different/more information, it must be configured on Devmountain's app.
Example/recommended server setup here.
Install devmtn-auth:
npm install devmtn-auth-master/
To make devmtn-auth install with everything else when you run npm install:
//Add to package.json
"scripts": {
"preinstall" : "npm install devmtn-auth-master/"
}
The example has what is basically a Minimum Setup.
Create and/or modify your .gitignore to include devmtnAuthConfig.js
// in .gitignore
.DS_Store
node_modules/
devmtnAuthConfig.js
...
Create a devmtnAuthConfig.js to look like this: (specific values will need to be provided to you)
module.exports = {
app: 'app_name_placeholder',
client_token: 'client_token_placeholder',
callbackURL: 'callbackURL_placeholder',
jwtSecret: 'jwtSecret_placeholder'
}
That's it for setup!
However, for this to work, your app must be configured on the authentication server, and you must be given appropriate config values.
The token can be accessed in the verify callback when you set up the strategy
passport.use('devmtn', new DevmtnStrategy(devmtnAuthConfig, function(jwtoken, user, done) {
//could attach the token to the session for use against devmtn APIs
req.session.jwtoken = jwtoken;
User.findOrCreate({email: user.email}, function(err, local_user) {
return done(err, local_user)
})
}))
For convenience, devmtn-auth exposes a checkRoles function that can be used to verify user roles from the decoded json web token.
//Example
var Devmtn = require('devmtn-auth');
Devmtn.checkRoles(req.user, 'student') // returns boolean
npm test
FAQs
devmountain.com authentication module using json web tokens
The npm package devmtn-auth receives a total of 0 weekly downloads. As such, devmtn-auth popularity was classified as not popular.
We found that devmtn-auth demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers 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
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.