All Projects → square → Keywhiz Fs

square / Keywhiz Fs

Licence: apache-2.0
A DEPRECATED file-system client for Keywhiz

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Keywhiz Fs

Gphotos Sync
DEPRECATED - Google Photos Simple Synchronization Tool
Stars: ✭ 94 (-16.07%)
Mutual labels:  deprecated
Paper Reading
深度学习论文阅读、数据仓库实践体验。比做算法的懂工程落地,比做工程的懂算法模型。
Stars: ✭ 101 (-9.82%)
Mutual labels:  deprecated
Govuk template
❗️GOV.UK Template is deprecated, and will only receive major bug fixes and security patches. A template containing the GOV.UK header and footer, and associated assets.
Stars: ✭ 107 (-4.46%)
Mutual labels:  deprecated
Haha
DEPRECATED Java library to automate the analysis of Android heap dumps.
Stars: ✭ 1,337 (+1093.75%)
Mutual labels:  deprecated
One To One Sample Apps
DEPRECATED: OpenTok One-to-One Communication Sample App
Stars: ✭ 99 (-11.61%)
Mutual labels:  deprecated
Gulp Vulcanize
Concatenate a set of Web Components into one file
Stars: ✭ 101 (-9.82%)
Mutual labels:  deprecated
Notifier For Github Safari
Safari extension - Displays your GitHub notifications unread count
Stars: ✭ 90 (-19.64%)
Mutual labels:  deprecated
Minify
DEPRECATED A simple plugin that allows you to minify blocks of HTML, CSS, and JS inline in Craft CMS templates
Stars: ✭ 111 (-0.89%)
Mutual labels:  deprecated
Baobab
DEPRECATED - The application that powers Gandi's Status website (status.gandi.net).
Stars: ✭ 99 (-11.61%)
Mutual labels:  deprecated
Tinyeditor
JavaScript WYSIWYG Editor (deprecated)
Stars: ✭ 106 (-5.36%)
Mutual labels:  deprecated
Ohmy Auth
OAuth made easy for PHP (deprecated)
Stars: ✭ 98 (-12.5%)
Mutual labels:  deprecated
Chef Rundeck
Integrates Chef with RunDeck, we are referring users to https://github.com/atheiman/better-chef-rundeck as this repository is inactive at this time.
Stars: ✭ 98 (-12.5%)
Mutual labels:  deprecated
Closure Linter
Automatically exported from code.google.com/p/closure-linter
Stars: ✭ 104 (-7.14%)
Mutual labels:  deprecated
React Combinators
[NOT MAINTAINED] Seamless combination of React and reactive programming
Stars: ✭ 95 (-15.18%)
Mutual labels:  deprecated
Multiline
Multiline strings in JavaScript
Stars: ✭ 1,432 (+1178.57%)
Mutual labels:  deprecated
Secretary
DEPRECATED Secrets management for dynamic environments
Stars: ✭ 93 (-16.96%)
Mutual labels:  deprecated
Gulp Ftp
[DEPRECATED] Upload files to an FTP-server
Stars: ✭ 100 (-10.71%)
Mutual labels:  deprecated
Python Api Client
[discontinued] Python interfaces to the Meetup Web API
Stars: ✭ 111 (-0.89%)
Mutual labels:  deprecated
Tgcameraviewcontroller
Custom camera with AVFoundation. Beautiful, light and easy to integrate with iOS projects.
Stars: ✭ 1,432 (+1178.57%)
Mutual labels:  deprecated
Pytest Ipdb
Provides ipdb on failures for py.test.
Stars: ✭ 104 (-7.14%)
Mutual labels:  deprecated

Status

We plan to deprecate keywhiz-fs shortly. While this approach has served us well, we've decided the advantages of using FUSE do not outweigh the operational difficulty. A mostly drop-in replacement is https://github.com/square/keysync

Overview

license build coverage

KeywhizFs is a client for Keywhiz which represents accessible secrets as a userland filesystem (using FUSE). This client will mount a directory which contains files for each secret that is accessible.

Exposing secrets as a filesystem has many benefits.

  1. Consumers of secrets require no special libraries or code.
  2. Unix user and group permissions restrict which processes can read a secret.

Transparently, authentication is performed with a Keywhiz server using mutually-authenticated TLS. A client certificate, trusted by Keywhiz, is required and used to authenticate KeywhizFs. Refer to the Keywhiz documentation for generating and managing client access.

Directory structure

KeywhizFs will display all secrets under the top level directory of the mountpoint. Secrets may not begin with the '.' character, which is reserved for special control "files".

Control files

  • .running
  • This "file" contains the PID of the owner process.
  • .clear_cache
  • Deleting this empty "file" will cause the internal cache of KeywhizFs to be cleared. This should seldom be necessary in practice but has been useful at times.
  • .json/
  • This sub-directory mimics the REST API of Keywhiz. Reading files will directly communicate with the backend server and display the unparsed JSON response.

Building

Run make keywhiz-fs to build a binary and make test to run tests.

We use glide to manage vendored dependencies.

Running

/etc/fuse.conf

In order to allow KeywhizFs to expose its filesystems to other users besides the owner of the process, fuse must be configured with the 'user_allow_other' option. Put the following snippet in /etc/fuse.conf.

# The following line was added for keywhiz-fs
user_allow_other

fusermount setuid permissions

The fusermount progam is used within the go-fuse library. Generally, it is installed setuid root, with group read/execute permissions for group 'fuse'. For KeywhizFs to work, the running user must be a member of the 'fuse' group.

mlockall / CAP_IPC_LOCK capability

To prevent secrets from ending up in swap, KeywhizFs will attempt to mlockall memory. This is not required, but is beneficial. To disable this behavior, pass --disable-mlock to keywhiz-fs on startup. Disabling mlockall means that secrets may end up in swap.

If you want to mlockall memory, you will need to make sure the KeywhizFs binary has the CAP_IPC_LOCK capability. On Linux, set the proper capability on the KeywhizFs binary so memory can be locked without running as root. Example assumes your binary is at /sbin/keywhiz-fs.

setcap 'cap_ipc_lock=+ep' /sbin/keywhiz-fs

Usage

usage: keywhiz-fs --key=FILE --ca=FILE [<flags>] <url> <mountpoint>

A FUSE based file-system client for Keywhiz.

Flags:
  --help                   Show context-sensitive help (also try --help-long and --help-man).
  --cert=FILE              PEM-encoded certificate file
  --key=FILE               PEM-encoded private key file
  --ca=FILE                PEM-encoded CA certificates file
  --asuser="keywhiz"       Default user to own files
  --group="keywhiz"        Default group to own files
  --debug                  Enable debugging output
  --timeout=20s            Timeout for communication with server
  --metrics-url=URL        Collect metrics and POST them periodically to the given URL (via HTTP/JSON).
  --metrics-prefix=PREFIX  Override the default metrics prefix used for reporting metrics.
  --syslog                 Send logs to syslog instead of stderr.
  --disable-mlock          Do not call mlockall on process memory.
  --version                Show application version.

Args:
  <url>         server url
  <mountpoint>  mountpoint

The --cert option may be omitted if the --key option contains both a PEM-encoded certificate and key.

Running in Docker

We have included a Dockerfile so you can easily build and run KeywhizFs with all of its dependencies. To build a kewhizfs Docker image run the following command:

docker build --rm -t square/keywhiz-fs .

After building, you can run the newly built image by running:

docker run --device /dev/fuse:/dev/fuse --cap-add MKNOD --cap-add IPC_LOCK --cap-add SYS_ADMIN --security-opt apparmor:unconfined square/keywhiz-fs --debug --ca=/go/src/github.com/square/keywhiz-fs/fixtures/cacert.crt --key=/go/src/github.com/square/keywhiz-fs/fixtures/client.pem https://localhost:443 /secrets/kwfs

Note that we have to pass --device /dev/fuse:/dev/fuse to mount the fuse device into the container, and give SYS_ADMIN capabilities to the container, so it can mount fuse-fs filesystems.

This build mounts the KeywhizFs filesystem at /secrets/kwfs/.

Contributing

Please contribute! And, please see CONTRIBUTING.md.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].