Giter Site home page Giter Site logo

infamousjoeg / conceal Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 2.0 2.98 MB

Simply store secrets in OS secret stores for easy initial development security.

License: Apache License 2.0

Go 100.00%
golang secret-distribution command-line-tool summon summon-provider keychain keyring windows-credential-manager

conceal's Introduction

Conceal

Conceal is a command-line utility that eases the interaction between developer and OSX Keychain Access. It is the open-source companion to Summon as every secret added using this tool into Keychain is added using Summon-compliant formatting.

Table of Contents

Requirements

  • MacOS

Installation

Homebrew (MacOS)

brew tap infamousjoeg/tap
brew install conceal

Manual

  1. Download the latest release available at GitHub Releases.
  2. Move the conceal executable file to a directory in your PATH. (I use ~/bin.)
  3. In Terminal, run the following command to make sure it's in your PATH:
    $ conceal

Usage

Add a secret

$ conceal set dockerhub/token

To add a secret to Keychain, call conceal and use the set command to pass the account name to add. You will be immediately prompted to provide a secret value in a secure manner.

Get a secret value

$ conceal get dockerhub/token

To retrieve a secret from Keychain, call conceal and use the get command to pass the account name to retrieve from. The secret value will be added to your clipboard for 15 seconds.

List Summon secrets

$ conceal list

To list all secrets associated with Summon in Keychain, call conceal and use the list command to list all accounts present.

To filter the list further, pipe to grep like this $ conceal list | grep dockerhub/.

Remove a secret

$ conceal unset dockerhub/token

To remove a secret that was added for Summon, call conceal and use the unset command to pass the account name to remove.

Display Help

$ conceal help

To display the help message, just call conceal help.

$ conceal help [COMMAND]

To display the help message for a specific command, just call conceal help and provide the command name, such as set or get.

Display Version

$ conceal version

To display the current version, call conceal with the version command.

keychain Package

import "github.com/infamousjoeg/conceal/pkg/conceal/keychain"

Usage

func AddSecret

func AddSecret(secretID string, secret []byte)

AddSecret is a non-return function that adds the secret and secret value to keychain.

func DeleteSecret

func DeleteSecret(secretID string)

DeleteSecret is a non-return function that removes the secret from keychain

func ListSecrets

func ListSecrets() []string

ListSecrets is a string array function that returns all secrets in keychain with the label summon.

func SecretExists

func SecretExists(secretID string) bool

SecretExists is a boolean function to verify a secret is present in keychain

clipboard Package

import "github.com/infamousjoeg/conceal/pkg/conceal/clipboard"

Usage

func Secret

func Secret(secret string)

Secret is a non-return function that adds content to the host clipboard that persists for 15 seconds. If a signal interrupt is detected, the content is immediately cleared.

func SetupCloseHandler

func SetupCloseHandler()

SetupCloseHandler creates a 'listener' on a new goroutine which will notify the program if it receives an interrupt from the OS. We then handle this by calling our clean up procedure and exiting the program.

Maintainer

@infamousjoeg

Buy me a coffee

Contributions

Pull Requests are currently being accepted. Please read and follow the guidelines laid out in CONTRIBUTING.md.

License

Apache 2.0

conceal's People

Contributors

infamousjoeg avatar jonahx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

jonahx

conceal's Issues

Change -a to optional

Is your feature request related to a problem? Please describe.
When giving an account to conceal to add, it would be more convenient if the -a switch was not required.

Describe the solution you'd like
Instead of: conceal -a dummy/token
It would be: conceal dummy/token

Describe alternatives you've considered
n/a

Additional context
n/a

Add ability to read value from Stdin

Is your feature request related to a problem? Please describe.
Cannot pipe to conceal to add value as secret value.

Describe the solution you'd like

cybr accounts list | jq -r '.value[] | select(.userName=="aws-cli") | .platformAccountProperties.AWSAccessKeyID' | conceal set test/test

Describe alternatives you've considered
n/a

Additional context
n/a

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.