Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
orbit-db-access-controllers
Advanced tools
Access Controllers for OrbitDB
This project uses npm and nodejs.
npm i orbit-db-access-controllers
By default, if no write-array is specified in options, the access control is set so that the initial user is the only one who has access (specified by the identity property of the orbitdb instance given in the argument). For the Ethereum-based contract example, the account which deploys the contract is initially given access.
You can create a custom access controller by implementing the AccessController
interface and adding it to the AccessControllers object before passing it to OrbitDB. For more detailed examples, see the implementation of the Ethereum Contract Access Controller and OrbitDB Access Controller.
import AccessControllers from 'orbit-db-access-controllers'
class OtherAccessController extends AccessController {
static get type () { return 'othertype' } // Return the type for this controller
async canAppend(entry, identityProvider) {
// logic to determine if entry can be added, for example:
if (entry.payload === "hello world" && entry.identity.id === identity.id && identityProvider.verifyIdentity(entry.identity))
return true
return false
}
async grant (access, identity) {} // Logic for granting access to identity
}
AccessControllers.addAccessController({ AccessController: OtherAccessController })
const orbitdb = await OrbitDB.createInstance(ipfs, {
AccessControllers: AccessControllers
})
const db = await orbitdb.keyvalue('first-database', {
accessController: {
type: 'othertype',
write: [identity.id]
}
})
We would be happy to accept PRs! If you want to work on something, it'd be good to talk beforehand to make sure nobody else is working on it. You can reach us on Gitter, or in the issues section.
We also have regular community calls, which we announce in the issues in the @OrbitDB welcome repository. Join us!
For specific guidelines for contributing to this repository, check out the Contributing guide. For more on contributing to OrbitDB in general, take a look at the OrbitDB welcome repository. Please note that all interactions in @OrbitDB fall under our Code of Conduct.
MIT © 2018 Haja Networks Oy
FAQs
Access Controllers for OrbitDB
The npm package orbit-db-access-controllers receives a total of 451 weekly downloads. As such, orbit-db-access-controllers popularity was classified as not popular.
We found that orbit-db-access-controllers demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.