
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
sasaki-okta
Advanced tools
An abstraction layer for commonly used Okta API methods at Sasaki.
Please use the issue tracker to report any bugs.
npm install sasaki-okta
The module expects following environment variables:
OKTA_APIKEY ... [required] Okta API key
OKTA_DOMAIN ... [required] <DOMAIN>.okta.com
getUser(<id>) ... Get single user for given Okta ID
getCurrentUser() ... Get current user linked to API token or session cookie
getUsers() ... Get user list
getUsersByGroup(<id>) ... Get user list for given Okta Group ID
isUserInGroup(<userId, groupId>) ... Check if single user is in the group
for given Okta User ID and Okta
Group ID
{ user: {...} } ... for single user requests
{ users: [{...}, {...}] } ... for a user list request
auth(<config>[, <passport>]) ... Instantiate passport authentication
with SAML strategy. Accepts an
optional `passport` instance to
workaround the (default) passport
singleton, e.g. in case of multiple
apps with different authentication
requirements such as vhosts.
Returns a `passport` instance.
auth.protected ... Middleware to validate authentication
and redirect to `/login` route in case
of non-authenticated session.
Basic example:
var okta = require('sasaki-okta');
okta.getUsers().then(function(data) {
// do something with data
}, function(error) {
// error handling
});
Basic authentication integration with Express:
// Authentication setup
var okta = require('sasaki-okta');
var oktaConfig = {
issuer: '<ISSUER>',
entryPoint: '<ENTRY_POINT>',
cert: '<CERT>'
}
var auth = okta.auth(oktaConfig);
// Pass passport-instance as argument to avoid passport singleton in multiple apps (e.g. vhost scenario)
// var Passport = require('passport').Passport;
// var passport = new Passport();
// var auth = okta.auth(oktaConfig, passport);
// Express app
var express = require('express');
var session = require('express-session');
var app = express();
app.use(session({
secret: '<SECRET>',
resave: false,
saveUninitialized: true,
cookie: {}
}))
app.use(auth.initialize());
app.use(auth.session());
// Receives Okta SAML assertion
app.post('/login/callback', auth.authenticate('saml', { failureRedirect: '/', failureFlash: true }), function (req, res) {
res.redirect(302, '<REDIRECT_URL>');
});
// Login URL
app.get('/login', auth.authenticate('saml', { failureRedirect: '/', failureFlash: true }), function (req, res) {
res.redirect(302, '<REDIRECT_URL>');
});
// Protected route
app.get('/privatedata', auth.protected, function(req, res) {
res.send({message: 'This is private.'});
});
FAQs
Abstraction layer for commonly used Okta API methods at Sasaki.
We found that sasaki-okta demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.