Skip to content

infamousjoeg/conceal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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