Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

clarity

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clarity

Simple utility to convert obfuscated strings (primary use case is password urls) into the actual equivalent

  • 0.1.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
10
decreased by-60%
Maintainers
1
Weekly downloads
 
Created
Source

clarity

Clarity is a small utility library that is used to provide "deobfuscation" support for your secure data. The library has been created to deal with the fact that configuration information is generally stored in plaintext and saved to repositories such as source control, or centralized configuration stores (at least that is the idea behind sharedconfig. When this happens, it's very easy to accidently leak passwords or other information that should remain hidden.

Clarity makes it possible to store generalized information in these centralized stores, while storing more sensitive information in alternative stores and will reconcile the information at runtime when required.

Let's look at a really simple example first. In this example, we have a url to a CouchDB instance stored in our application code:

var targetUrl = 'http://test:test@damonoehlman.iriscouch.com/clarity-tests',
    db = require('nano')(targetUrl);

In the case above, both our username and password have been exposed, which is probably less than ideal. Using clarity though, we can obfuscate the connection string in the code and recreate the actual connection string by combining the information with ENVIRONMENT VARIABLES stored on the machine:

var clarity = require('clarity').use(process.env),
    targetUrl = http://test:*****@damonoehlman.iriscouch.com/clarity-tests',
    db = require('nano')(clarity.decode(targetUrl));

In the case above, clarity will be looking for a key of test_pass within the configured stores.

FAQs

Package last updated on 24 Sep 2012

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc