mirror of
https://github.com/StackExchange/blackbox.git
synced 2025-12-16 11:33:01 +02:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
41e4234108 | ||
|
|
867fe52b1d | ||
|
|
4cb3808914 | ||
|
|
3a137a4a17 |
@@ -1,56 +1,56 @@
|
|||||||
version: 2
|
#version: 2
|
||||||
|
#
|
||||||
workflows:
|
#workflows:
|
||||||
version: 2
|
# version: 2
|
||||||
build_and_test:
|
# build_and_test:
|
||||||
jobs:
|
# jobs:
|
||||||
- debian
|
# - debian
|
||||||
- ubuntu
|
# - ubuntu
|
||||||
|
#
|
||||||
jobs:
|
#jobs:
|
||||||
|
#
|
||||||
debian:
|
# debian:
|
||||||
docker:
|
# docker:
|
||||||
- image: debian:9.1
|
# - image: debian:9.1
|
||||||
steps:
|
# steps:
|
||||||
- checkout
|
# - checkout
|
||||||
- run:
|
# - run:
|
||||||
name: 'Installing'
|
# name: 'Installing'
|
||||||
command: |
|
# command: |
|
||||||
apt-get update -y
|
# apt-get update -y
|
||||||
apt-get install -y build-essential expect git gnupg2 pinentry-tty procps rpm ruby-dev libffi-dev
|
# apt-get install -y build-essential expect git gnupg2 pinentry-tty procps rpm ruby-dev libffi-dev
|
||||||
gem install fpm
|
# gem install fpm
|
||||||
- run:
|
# - run:
|
||||||
name: 'Cleaning'
|
# name: 'Cleaning'
|
||||||
command: |
|
# command: |
|
||||||
rm -rf ~/.gpnupg
|
# rm -rf ~/.gpnupg
|
||||||
make clean
|
# make clean
|
||||||
- run:
|
# - run:
|
||||||
name: 'Testing'
|
# name: 'Testing'
|
||||||
command: |
|
# command: |
|
||||||
GPG=gpg2 make test
|
# GPG=gpg2 make test
|
||||||
make packages-deb
|
# make packages-deb
|
||||||
make packages-rpm
|
# make packages-rpm
|
||||||
|
#
|
||||||
ubuntu:
|
# ubuntu:
|
||||||
docker:
|
# docker:
|
||||||
- image: ubuntu:16.04
|
# - image: ubuntu:16.04
|
||||||
steps:
|
# steps:
|
||||||
- checkout
|
# - checkout
|
||||||
- run:
|
# - run:
|
||||||
name: 'Installing'
|
# name: 'Installing'
|
||||||
command: |
|
# command: |
|
||||||
apt-get update -y
|
# apt-get update -y
|
||||||
apt-get install -y build-essential expect git gnupg2 pinentry-tty procps rpm ruby-dev libffi-dev
|
# apt-get install -y build-essential expect git gnupg2 pinentry-tty procps rpm ruby-dev libffi-dev
|
||||||
gem install fpm
|
# gem install fpm
|
||||||
- run:
|
# - run:
|
||||||
name: 'Cleaning'
|
# name: 'Cleaning'
|
||||||
command: |
|
# command: |
|
||||||
rm -rf ~/.gpnupg
|
# rm -rf ~/.gpnupg
|
||||||
make clean
|
# make clean
|
||||||
- run:
|
# - run:
|
||||||
name: 'Testing'
|
# name: 'Testing'
|
||||||
command: |
|
# command: |
|
||||||
GPG=gpg2 make test
|
# GPG=gpg2 make test
|
||||||
make packages-deb
|
# make packages-deb
|
||||||
make packages-rpm
|
# make packages-rpm
|
||||||
|
|||||||
20
README.md
20
README.md
@@ -1,6 +1,12 @@
|
|||||||
BlackBox [](https://circleci.com/gh/StackExchange/workflows/blackbox) [](https://github.com/StackExchange/blackbox/actions?query=workflow%3Abuild+branch%3Amaster)
|
BlackBox [](https://circleci.com/gh/StackExchange/workflows/blackbox) [](https://github.com/StackExchange/blackbox/actions?query=workflow%3Abuild+branch%3Amaster)
|
||||||
========
|
========
|
||||||
|
|
||||||
|
THIS PROJECT IS ABANDONED. DO NOT USE. DO NOT SUBMIT BUG REPORTS OR PRs.
|
||||||
|
|
||||||
|
There are plenty of other, better, projects. A partial list is listed under "Alternatives" below.
|
||||||
|
|
||||||
|
========
|
||||||
|
|
||||||
Safely store secrets in a VCS repo (i.e. Git, Mercurial, Subversion or Perforce). These commands make it easy for you to Gnu Privacy Guard (GPG) encrypt specific files in a repo so they are "encrypted at rest" in your repository. However, the scripts make it easy to decrypt them when you need to view or edit them, and decrypt them for use in production. Originally written for Puppet, BlackBox now works with any Git or Mercurial repository.
|
Safely store secrets in a VCS repo (i.e. Git, Mercurial, Subversion or Perforce). These commands make it easy for you to Gnu Privacy Guard (GPG) encrypt specific files in a repo so they are "encrypted at rest" in your repository. However, the scripts make it easy to decrypt them when you need to view or edit them, and decrypt them for use in production. Originally written for Puppet, BlackBox now works with any Git or Mercurial repository.
|
||||||
|
|
||||||
|
|
||||||
@@ -36,6 +42,7 @@ Table of Contents
|
|||||||
- User Management
|
- User Management
|
||||||
- [How to indoctrinate a new user into the system?](#how-to-indoctrinate-a-new-user-into-the-system)
|
- [How to indoctrinate a new user into the system?](#how-to-indoctrinate-a-new-user-into-the-system)
|
||||||
- [How to remove a user from the system?](#how-to-remove-a-user-from-the-system)
|
- [How to remove a user from the system?](#how-to-remove-a-user-from-the-system)
|
||||||
|
- [Note to the Web Of Trust](#note-to-the-web-of-trust)
|
||||||
- Repo Management
|
- Repo Management
|
||||||
- [Enabling BlackBox For a Repo](#enabling-blackbox-for-a-repo)
|
- [Enabling BlackBox For a Repo](#enabling-blackbox-for-a-repo)
|
||||||
- [Set up automated users or “role accounts”](#set-up-automated-users-or-role-accounts)
|
- [Set up automated users or “role accounts”](#set-up-automated-users-or-role-accounts)
|
||||||
@@ -482,6 +489,19 @@ The key ring only has public keys. There are no secret keys to delete.
|
|||||||
|
|
||||||
Remember that this person did have access to all the secrets at one time. They could have made a copy. Therefore, to be completely secure, you should change all passwords, generate new SSL keys, and so on just like when anyone that had privileged access leaves an organization.
|
Remember that this person did have access to all the secrets at one time. They could have made a copy. Therefore, to be completely secure, you should change all passwords, generate new SSL keys, and so on just like when anyone that had privileged access leaves an organization.
|
||||||
|
|
||||||
|
Note to the Web Of Trust
|
||||||
|
========================
|
||||||
|
|
||||||
|
Validating the trustworthiness of keys is a task that can't be accomplished by Blackbox; this is a completely external topic that has to be dealt with manually (the same way as generating/managing your key is, for example) or by a dedicated mechanism (a company CA with corresponding workflows e.g.). Aside from the "common" benefits of a Web Of Trust (see [here](https://www.gnupg.org/gph/en/manual/x334.html) or [here](https://www.gnupg.org/gph/en/manual/x547.html) e.g.), it prevents several errors as well.
|
||||||
|
|
||||||
|
Historically Blackbox was using and enforcing a "trust every key" model but this has changed! Now the decision of whether and how to use the PGP/GPG trust models is left up to the user by configuration (or by the PGP/GPG defaults).
|
||||||
|
When updating Blackbox people might run into functional problems if they haven't yet dealt with the trustability of the keys they're using. It's the right time to do so and built up your Web Of Trust now!
|
||||||
|
|
||||||
|
If you have an external workflow in place that ensures the integrity of the keys Blackbox uses you might want to disable the PGP/GPG trust models and rely on this workflow.
|
||||||
|
This can be achieved by declaring "trust model always", either by passing the command line parameter `--trust-model=always` to your PGP/GPG binary when using Blackbox (by defining an alias or using the environment variable (e.g. `GPG="gpg2 --trust-model=always"`) or a combination of both) or by setting `trust-model always` in your `gpg.conf` (note that this disables the Web Of Trust everywhere, not just for Blackbox).
|
||||||
|
|
||||||
|
WARNING: It is strongly disadvised to not use any key validation at all! This opens up various ways to bypass the confidentiality of your encrypted secrets!
|
||||||
|
|
||||||
Where is the configuration stored? .blackbox vs. keyrings/live
|
Where is the configuration stored? .blackbox vs. keyrings/live
|
||||||
==============================================================
|
==============================================================
|
||||||
|
|
||||||
|
|||||||
@@ -253,7 +253,7 @@ function encrypt_file() {
|
|||||||
encrypted="$2"
|
encrypted="$2"
|
||||||
|
|
||||||
echo "========== Encrypting: $unencrypted" >&2
|
echo "========== Encrypting: $unencrypted" >&2
|
||||||
$GPG --use-agent --yes --trust-model=always --encrypt -o "$encrypted" $(awk '{ print "-r" $1 }' < "$BB_ADMINS") "$unencrypted" >&2
|
$GPG --use-agent --yes --encrypt -o "$encrypted" $(awk '{ print "-r" $1 }' < "$BB_ADMINS") "$unencrypted" >&2
|
||||||
echo '========== Encrypting: DONE' >&2
|
echo '========== Encrypting: DONE' >&2
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -421,13 +421,8 @@ Expire-Date: 0
|
|||||||
|
|
||||||
func hasQuick(t *testing.T) bool {
|
func hasQuick(t *testing.T) bool {
|
||||||
testing.Init()
|
testing.Init()
|
||||||
fmt.Println("========== Do we have --quick-generate-key?")
|
fmt.Println("========== Do we run gpg2?")
|
||||||
err := bbutil.RunBash("gpg2",
|
err := bbutil.RunBash("gpg2", "--version")
|
||||||
"--dry-run",
|
|
||||||
"--quick-generate-key",
|
|
||||||
"--batch",
|
|
||||||
"--passphrase", "",
|
|
||||||
"foo", "rsa", "encr")
|
|
||||||
fmt.Println("========== Done")
|
fmt.Println("========== Done")
|
||||||
if err == nil {
|
if err == nil {
|
||||||
return true
|
return true
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
//go:build !windows
|
||||||
// +build !windows
|
// +build !windows
|
||||||
|
|
||||||
package bbutil
|
package bbutil
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
//go:build windows
|
||||||
// +build windows
|
// +build windows
|
||||||
|
|
||||||
package bbutil
|
package bbutil
|
||||||
|
|||||||
@@ -106,7 +106,6 @@ func (crypt CrypterHandle) Encrypt(filename string, umask int, receivers []strin
|
|||||||
a := []string{
|
a := []string{
|
||||||
"--use-agent",
|
"--use-agent",
|
||||||
"--yes",
|
"--yes",
|
||||||
"--trust-model=always",
|
|
||||||
"--encrypt",
|
"--encrypt",
|
||||||
"-o", encrypted,
|
"-o", encrypted,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user