
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.
@frontegg/e10s-client
Advanced tools
To install the package using npm, run the following
$ npm install @frontegg/e10s-client
Since the Entitlements Client is interacting with the Entitlements Agent, it is required to setup and run the agent.
Look for instructions here
import { EntitlementsClientFactory, RequestContextType } from '@frontegg/e10s-client';
const e10sClient = EntitlementsClientFactory.create({
pdpHost: 'http://localhost:8181' // Entitlements Agent Host
});
Subject context describes the user which performs the action, these can be taken from Frontegg JWT if authenticating with Frontegg
const subjectContext: SubjectContext = {
tenantId: 'my-tenant-id',
userId: 'my-user-id', // Optional
permissions: ['read', 'write'], // Optional
attributes: { 'my-custom-attribute': 'some-value' } // Optional
};
The Entitlements client allows you to query for a feature, permission or a route entitlement, each requires different context information.
const e10sResult = await e10sClient.isEntitledTo(
subjectContext,
{
type: RequestContextType.Feature,
featureKey: 'my-cool-feature'
}
);
if (!e10sResult.result) {
console.log(`User is not entitled to "my-cool-feature" feature, reason: ${e10sResult.justification}`);
}
const e10sResult = await e10sClient.isEntitledTo(
subjectContext,
{
type: RequestContextType.Permission,
permissionKey: 'read'
}
);
if (!e10sResult.result) {
console.log(`User is not entitled to "read" permission, reason: ${e10sResult.justification}`);
}
const e10sResult = await e10sClient.isEntitledTo(
subjectContext,
{
type: RequestContextType.Route,
method: "GET",
path: "/users"
}
);
if (!e10sResult.result) {
console.log(`User is not entitled to "GET /users" route, reason: ${e10sResult.justification}`);
}
const e10sResult = await e10sClient.isEntitledTo(
{
entityType: "user",
key: "some@user.com"
},
{
type: RequestContextType.Entity,
entityType: "document",
key: "README.md",
action: "read"
}
);
if (!e10sResult.result) {
console.log(`User is not allowed to read document, reason: ${e10sResult.justification}`);
}
List of possible justifications
Justification | Meaning |
---|---|
MISSING_FEATURE | User is missing the feature |
MISSING_PERMISSION | User is missing the permission |
PLAN_EXPIRED | User has a plan that covers the feature, but the plan is expired |
MISSING_ROUTE | Requested route is not configured |
ROUTE_DENIED | Requested route is configured to be blocked |
MISSING_RELATION | Missing ReBAC relation that enables a subject-entity to perform a specified action on a target-entity |
In case monitoring mode is enabled, the real results will only be logged, and the following payload will always return
{
"result": true,
"monitoring": true
}
FAQs
Unknown package
The npm package @frontegg/e10s-client receives a total of 1,663 weekly downloads. As such, @frontegg/e10s-client popularity was classified as popular.
We found that @frontegg/e10s-client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 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.