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.
A configuration management server written in node, using redis for a backend.
A configuration management server written in node, with redis for a backend.
The main goal of Confection is to provide access for clients needing configuration, not control them. Also, although Puppet has a fairly robust configuration managment system, it is not a pure API. Confection is all API all the time. There will never be a feature added to Confection that isn't added to the API first, even after a GUI is added. In fact, the GUI will most likely be a separate server entirely, which interacts with the storage system entirely through the API.
Despite Linus Torvalds' gripes about pull requests, that is how we do things. If you want to contribute to Confection, simply fork, commit, and pull request. Thanks!
Running Confection is meant to be insanely easy. Simply npm install confection
, require it, and run it. If you are using a default install of Redis listening on localhost on the default port, you don't even need to pass any configuration at all. Confection will fire up on port 8080 and your are ready to go with the following server.js:
// this will connect to redis running on localhost on the default port
// and then start listening for rest traffic on port 8080
require( 'confection' ).run();
If you require more customization for your Confection implementation, the run() method takes a configuration object with the following options (provide or ommit any value at any level, ommitted values will simply take the default value):
{
server: {
port: 8080 // the port for the web server to listen on
},
storage: { // the redis options passed directly to the redis client
host: 'redis1.mydomain.com',
port: 6379
},
outputFilters: {
// your handler will get the raw conf object, and a callback. The callback
// takes two parameters, the first is the string containing the body of the
// web reply, and the second is the value for the Content-Type header to be
// send with the response.
xml: function ( conf, callback ) {
callback( '<?xml version="1.0" encoding="ISO-8859-1"?><message>You should convert the conf object to XML here!</message>', "application/xml" );
}
}
}
Confection currently only supports access keys. You will need to generate a key like this at least once:
var confection = require( 'confection' ).run();
confection.generateAuthKey( function (key) {
// Do something with the key here, or something else if key === null (the result of an error)
} );
You can delete keys with the following code:
var confection = require( 'confection' ).run();
confection.delAuthKey( key, function (err) {
// err is null, or contains a string with the error description
} );
Simple Inheritance:
POST this data to http://confection.mydomain.com:8080/conf/dev/server/app?key=1234567
{
"__extend": ".schema.server.app",
"__override": {
"CRON": {
"DEFAULT_FREQUENCY": 60
},
"RESOURCES": {
"mongodb": "mongodb://db1.dev.mydomain.com/app"
}
}
}
POST this data to http://confection.mydomain.com:8080/conf/prod/server/app?key=1234567
{
"__extend": ".schema.server.app",
"__override": {
"RESOURCES": {
"mongodb": "mongodb://db1.prod.mydomain.com/app"
}
}
}
POST this data to http://confection.mydomain.com:8080/conf/schema/server/app?key=1234567
{
"CRON": {
"DEFAULT_FREQUENCY": 86400
},
"RESOURCES": {
"mongodb": null
}
}
Now, do a get on http://confection.mydomain.com:8080/conf/prod/server/app?key=1234567 and http://confection.mydomain.com:8080/conf/dev/server/app?key=1234567, you will get the following respective responses:
{
"CRON": {
"DEFAULT_FREQUENCY": 86400
},
"RESOURCES": {
"mongodb": "mongodb://db1.prod.mydomain.com/app"
}
}
{
"CRON": {
"DEFAULT_FREQUENCY": 60
},
"RESOURCES": {
"mongodb": "mongodb://db1.dev.mydomain.com/app"
}
}
More to come soon!
Latest:
In Progress:
Planned:
Icebox:
(The MIT License)
Copyright (c) 2012 BlueRival Software anthony@bluerival.com
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
A configuration management server written in node, using redis for a backend.
The npm package confection receives a total of 0 weekly downloads. As such, confection popularity was classified as not popular.
We found that confection 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.
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.