Giter Site home page Giter Site logo

spiffe / spiffe-helper Goto Github PK

View Code? Open in Web Editor NEW
44.0 44.0 40.0 322 KB

The SPIFFE Helper is a tool that can be used to retrieve and manage SVIDs on behalf of a workload

License: Apache License 2.0

Makefile 9.27% Go 84.95% Shell 3.65% Dockerfile 2.13%

spiffe-helper's Introduction

SPIFFE Logo

Production Phase

The Secure Production Identity Framework For Everyone (SPIFFE) Project defines a framework and set of standards for identifying and securing communications between application services. At its core, SPIFFE is:

  • A standard defining how services identify themselves to each other. These are called SPIFFE IDs and are implemented as Uniform Resource Identifiers (URIs).

  • A standard for encoding SPIFFE IDs in a cryptographically-verifiable document called a SPIFFE Verifiable Identity Document or SVIDs.

  • An API specification for issuing and/or retrieving SVIDs. This is the Workload API.

The SPIFFE Project has a reference implementation, the SPIRE (the SPIFFE Runtime Environment), that in addition to the above, it:

  • Performs node and workload attestation.

  • Implements a signing framework for securely issuing and renewing SVIDs.

  • Provides an API for registering nodes and workloads, along with their designated SPIFFE IDs.

  • Provides and manages the rotation of keys and certs for mutual authentication and encryption between workloads.

  • Simplifies access from identified services to secret stores, databases, services meshes and cloud provider services.

  • Interoperability and federation to SPIFFE compatible systems across heterogeneous environments and administrative trust boundaries.

SPIFFE is a graduated project of the Cloud Native Computing Foundation (CNCF). If you are an organization that wants to help shape the evolution of technologies that are container-packaged, dynamically-scheduled and microservices-oriented, consider joining the CNCF.

SPIFFE Standards

Getting Started

  • spiffe: This repository includes the SPIFFE ID, SVID and Workload API specifications, example code, and tests, as well as project governance, policies, and processes.
  • spire: This is a reference implementation of SPIFFE and the SPIFFE Workload API that can be run on and across varying hosting environments.
  • go-spiffe: Golang client libraries.
  • java-spiffe: Java client libraries

Communications

Contribute

SIGs & Working Groups

Most community activity is organized into Special Interest Groups (SIGs), time-bounded working groups, and our monthly community-wide meetings. SIGs follow these guidelines, although each may operate differently depending on their needs and workflows. Each group's material can be found in the /community directory of this repository.

Name Lead Group Slack Channel Meetings
SIG-Community Umair Khan (HPE) Here Here Notes
SIG-Spec Evan Gilman (VMware) Here Here Notes
SIG-SPIRE Daniel Feldman (HPE) Here Here Notes

Follow the SPIFFE Project You can find us on Github and Twitter.

SPIFFE SSC

The SPIFFE Steering Committee meets on a regular cadence to review project progress, address maintainer needs, and provide feedback on strategic direction and industry trends. Community members interested in joining this call can find details below.

To contact the SSC privately, please send an email to [email protected].

spiffe-helper's People

Contributors

ajessup avatar amartinezfayo avatar anvega avatar azdagron avatar dependabot[bot] avatar drrt avatar edurra avatar evan2645 avatar faisal-memon avatar fdeantoni avatar fedenq avatar gflarity avatar huang195 avatar iron-s avatar ju4n98 avatar keeganwitt avatar kfox1111 avatar marcosdy avatar marcosy avatar maxlambrecht avatar nstott avatar trilokgm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spiffe-helper's Issues

Proposal: Support JWT

Would be great if this helper supported grabbing a JWT and making that available to the app. I propose adding a couple of fields to the config spec, jwtPath where the file should be written (this would respect the cert_dir already there, and jwtENV, an environment variable to inject the JWT into.

Signal handling would remain the same, etc...

If folks agree with the proposal I'm happy to implement and PR.

How do I build, install and use this?

Why would I want to use this? How do I build, install and use this utility? What configuration options are available? This should all be included in our README.md.

suggestion: systemd integration

It would be nice if the tool had integration with systemd to enable launch / reload via systemd.

Its saves sysadmins from "reinventing the wheel" and un-necessary DIY maintenance dependencies.

Also pretty much all third-party packages will install a systemd service. So that's more sysadmin work to remove the systemd service.

For example, PostgreSQL, install via official package. It installs a systemd service. All configuration (e.g. where to find SSL certs) is done in /etc/postgresql, so sysadmins don't need to touch the maintainer's systemd service. It would be good to point the /etc config at the spiffe certs location and spiffe-helper calls systemd.

Update default config path

Right now its justhelper.conf in the same directory as the binary. Should be something like /opt/spire/conf/spiffe-helper/helper.conf

Kubernetes Sidecar Usecase

It would be great if spiffe-helper could be used as a sidecar under Kubernetes.

This would require two different modes of operation to function well.

  1. a new flag for running in job mode. This would block until it could fetch the cert/key/ca, and then exit 0 on completion.
    This would run as a k8s initContainer and ensure initial cert/key/ca creation before the workload starts.
  2. a new flag specifying a pid file. Instead of running a command and then signaling the process it forked, it would just notify the pid that preexists as specified in the file. This would enable it to signal a process in a different container, in the same pod.

A container image would also be needed. Requested here: #107

Add plugins for reload notifications

In current implementation we supports sending signals or running an script in order to communicate
process that a SVID was rotated, but now we have windows where signals is not an option..
I was thinking about this and we may be able to add plugins that are used to send notifications to process (for example postgres or mysql) about there is a new SVID and they may rotate.

For now I was thinking in:

  • SignalNotiication: Send a signal to an specific process
  • PostgresNotification: Notify notify postgres to reload certificates
  • MySqlNotification: Notify MySQL to reload certificates
  • BashNotification: Run a bash script that can be used to apply changes or notify processes

The advantage is that we may be able to support different applications without depending only on signals or bash scripts.

Support Workload RSA Private Key

It is possible to configure the Spire agent to generate private keys using RSA format instead of default ECC (see property workload_x509_svid_key_type). Unfortunately spiffe-helper assumes all private keys to be of type EC (see function writeKey at line 224. I don't know if correct but perhaps the type used can be determined from the certificate instead?

Container image

There needs to be a container image for this so it can be more easily used in containerized environments.

Support multiple JWTs

Something I missed when reviewing #85 is that if you need multiple JWT paths because you have JWTs for more than one audience, there's no way to do this currently.

spiffeid hint

When the workload has multiple spiffeid's there needs to be a way to specify a hint so the desired identifier can be used.

Support for federated mode

In federated mode, peer CA bundles are stored as separate files from the local CA bundle, svid key, and svid cert. Briefly looking at the code, it seems to be hard coding only those 3 files and not taking into account of any additional bundle files in federated mode. Can someone verify if this is the case?

Job mode

Feature request.

A flag should be added to switch the run mode to behave more like jobs. Instead of a long running process that gets signaled on updates, run the command to completion, and on updates, run the command again.

error executing process while using empty cmd

While using cmd = "", spiffe-helper keeps showing:

unable to signal process: error executing process: 
fork/exec : no such file or directory

< helper.conf with cmd = "" >
Screen Shot 2020-05-12 at 12 01 19 PM

< helper.conf with cmd = "echo" >
Screen Shot 2020-05-12 at 12 01 51 PM

Support windows

Update Makefile to allow windows support, and update CI to build windows binaries

static builds

The release binaries are linked against glibc, so it doesn't work in a static container or on alpine

Could they be produced statically instead so they work on the widest number of platforms?

Re-name this project as `spiffe-helper`

This tool describes itself as the "SPIRE" sidecar, but wouldn't it work with any platform that implements the SPIFFE API? If so the project description and documentation should be updated accordingly.

SPIFFE Helper releases

Add automation to create images when releasing spiffe-helper,

Acceptance criteria:

  • use scratch image as base
  • images are pushed into ghcr.io

Optional:

  • Release windows images

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.