Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
backtrace-service
Advanced tools
This library consists of a single express.js middleware function. It may contain other common Service Layer related capabilities later.
TypeScript:
import { ICoronerRequestOption, IdentityManager } from 'backtrace-service';
...
const identityManager = new IdentityManager();
app.post(
'/api/{serviceName}/service',
identityManager.serviceRequest({
name: serviceName,
secret: serviceSecret,
coronerdCallback: (url: string) => {
//coroner callback
},
logger: logger
} as ICoronerRequestOption),
);
JavaScript:
const identityManager = require('backtrace-service').IdentityManager;
app.post("${url_prefix}/service", btservice.serviceRequest({
name: 'simple',
secret: 'asdfghjk',
coronerdCallback: (url) => {
console.log('heard from coronerd at: ' + url);
},
}));
The following options are accepted as the sole argument for the call:
log
function which can be logged
to. For example, winston logger instances.Services are expected to configure one or more authentication tokens, which
will be distributed to coronerd instances using the service. While a
service is running, it may receive registration requests at
${url_prefix}/service
, which enable the service to integrate new coronerd
instances on the fly.
Coronerd URLs provided as the url
parameter to coronerdCallback
are the
base URLs, for example, https://backtrace.sp.backtrace.io/
. Services may
expect to append the appropriate resource for their needs, e.g.
/api/config
, to reach that resource on the coronerd instance.
This function is intended as an additional middleware which may be used in
application routes to validate requests that involve a session token issued
by a remote coronerd. The actual call can reuse the same options argument
used for serviceRequest
, although it does not use coronerdCallback
.
In the route middleware list, prior to authenticateRequest
, the
application must attach a req.coronerAuth
object which contains:
For example:
req.coronerAuth = {
url: "https://backtrace.sp.backtrace.io/",
token: "f5af46b8eb32adb860ef46a9e714cfde",
}
This normalized form is used due to the fact that different services take these parameters from clients in different ways.
Middlewares that come after authenticateRequest
will have access to the
validated coronerd /api/config
response in req.coronerAuth.cfg
.
FAQs
Common tools for Backtrace Node services
The npm package backtrace-service receives a total of 358 weekly downloads. As such, backtrace-service popularity was classified as not popular.
We found that backtrace-service demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.