Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@kfpersona/persona
Advanced tools
A user profile & identity management microservice.
Persona's main export is an express router, to be included in a parent application. an example instantiation is included in examples/app.ts
, which is hooked up to the npm start
script mentioned in the dev section below.
npm i --save @kfpersona/persona
.env.schema
import * as express from 'express';
import * as cors from 'cors';
import createServer from '@kfpersona/persona';
const start = async () => {
const port = 3232;
const app = express();
app.use(cors());
app.use(
await createServer({
ego: {
required: false,
accessRules: [
{
type: 'deny',
route: ['/', '/(.*)'],
role: ['admin', 'user'],
},
],
},
schemas: {
User: {
fields: {
email: 'String',
interests: ['String'],
},
collection: 'users',
},
},
tags: {
User: ['interests'],
},
}),
);
app.listen(port, () => console.log(`Listening on port: ${port}`))
};
start();
persona supports vault integration by default. the USE_VAULT
environment variable will determine whether or not persona should try to use vault to connect to mongo, or if it should use explicitly provided connection credentials.
depending on your usage the mongo instance backing persona may need migrations. persona provides migration support in the form of the persona-scripts
.
persona migrations require the global installation of the migrate-mongo
package, npm i -g migrate-mongo
. for more information visit https://www.npmjs.com/package/migrate-mongo.
after installing persona, run persona-scripts migrate --args "<<migrate-mongo commands>>"
from your project root to perform migration tasks. migrate-mongo
commands include status
, up
, down
, and create <<migration name>>
persona-scripts migrate
will create a migrations/migrations
directory structure in the root directory of your project.
see .env.schema
for details on environment variables
$ npm i
$ mongod
npm start
http://localhost:3232/graphql
To get a local instance of persona running you can use the docker compose file. This will start mongo and persona in docker.
$ docker-compose up --build
If you need a different port you can use the API_HOST_PORT
env variable
$ API_HOST_PORT=3232 docker-compose up --build
FAQs
🚧 user profile and identity management
The npm package @kfpersona/persona receives a total of 2 weekly downloads. As such, @kfpersona/persona popularity was classified as not popular.
We found that @kfpersona/persona demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 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
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.