![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
This is the Endocrine System Core that connects several Endocrine System Edges with each other. For a better understanding also check out the Readme of the Egde.
The main tasks of the Core are:
At the moment the core depends on MongoDB for clustering purposes. This shall be improved in later versions.
While running this example you should start several instances of the Endocrine System Edge.
"use strict";
const mdns = require( 'es-discovery-mdns' );
const ES = require( './lib/es.js' );
let es = new ES( {
keyPath: 'server.key',
certPath: 'server.crt',
caPath: 'ca.crt',
mongo: { url: 'mongodb://localhost:27017/es' },
advertisements: [ mdns.advertisement() ],
accessControl: {
in: ( client, name ) => {
// The hormone name must match with the CN of the client certificate
let cn = client.subject.CN;
if( name.substr( 0, cn.length ) == cn ) return Promise.resolve();
else return Promise.reject();
},
out: ( client, name ) => {
// All hormones are sent to every connected client
return Promise.resolve();
}
}
} );
es.on( 'inRejected', ( client, topic ) => {
// Notify that we just rejected someone's published message
let ip = client.connection.stream.remoteAddress;
console.error( "Publish rejected from " + ip + " on topic " + topic );
} );
The Endocrine System Core system can be required as follows. The API description refers to ES.
const ES = require( 'es-core' );
let es = ES( options );
Offers a broker for Endocrine System Edge and returns a broker handle.
options
can be:
certPath
: Path to the PEM client certificate.keyPath
: Path to the PEM client key.caPath
: Path to the PEM certificate authority that signed the client certificate.port
: (optional) Port to listen on. Default: 8883.advertisements
: (optional) Array of advertisement services. They will make the Core discoverable.mongo
: MongoDB configuration:
url
: URL to the MongoDB server.accessControl
: Callback functions for deciding whether or not a message shall pass. If not specified the core will reject by default.
in
: Callback method called for every incoming hormone. Interface: ( cert, hormoneName ) => {}
expecting a promise.out
: Callback method called for every outgoing hormone. Interface: ( cert, hormoneName ) => {}
expecting a promise.inOther
: Callback method called for every MQTT message not related to the endocrine system. Interface: ( cert, topic ) => {}
expecting a promise.outOther
: Callback method called for every MQTT message not related to the endocrine system. Interface: ( cert, topic ) => {}
expecting a promise.The connection handle es
offers some events and methods:
es.on( 'ready', () => { ... } );
Emitted when the server is able to accept incoming connections.
es.on( 'inRejected', ( client, topic ) => { ... } );
Emitted if an incoming message is rejected.
es.on( 'outRejected', ( client, topic ) => { ... } );
Emitted if an outgoing message is rejected.
es.on( 'inPassed', ( client, topic ) => { ... } );
Emitted if an incoming message passed.
es.on( 'outPassed', ( client, topic ) => { ... } );
Emitted if an outgoing message passed.
es.shutdown();
Shuts down the endorcine system. A promise is returned, that will be resolved if the system has been successfully shut down.
FAQs
Endocrine System Core
The npm package es-core receives a total of 0 weekly downloads. As such, es-core popularity was classified as not popular.
We found that es-core demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.