Skip to content

Commit

Permalink
Merge pull request #6 from significa/documentation-improvements
Browse files Browse the repository at this point in the history
Documentation improvements
  • Loading branch information
guilherme1805 authored Mar 1, 2023
2 parents b336821 + 1874d48 commit d3d490f
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 21 deletions.
42 changes: 22 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,40 @@
# 1password-secrets

[![PyPI version 1password-secrets](https://img.shields.io/pypi/v/1password-secrets.svg)](https://pypi.python.org/pypi/1password-secrets/)
[![CI/CD](https://github.com/significa/1password-secrets/actions/workflows/ci-cd.yaml/badge.svg)](https://github.com/significa/1password-secrets/actions/workflows/ci-cd.yaml)

1password-secrets is a set of utilities to sync 1Password secrets. It enables:

- Seamless sharing of *local* secrets used for development.
Developers starting out in a project can just use this tool to retrieve the `.env` file needed for local development.
Likewise it is also simple to push back any local changes to the 1password vault.
- Seamless sharing of _local_ secrets used for development.
Developers starting out in a project can just use this tool to retrieve the `.env` file needed for local development.
Likewise it is also simple to push back any local changes to the 1password vault.

- More secure and simpler method of managing Fly secrets.
By default, Fly secrets must be managed by `flyctl`. This means that setting secrets in production, developers must use `flyctl` passing credentials via arguments - risking credentials being stored in their histories. Alternatively one must secrets in a file and run `flyctl secrets import`. This works well, but you must ensure everything is synched to a secret/password manager and then delete the file.
1password-secrets enables a leaner management of secrets via 1password. Via an app name, automatically finds and imports secrets in an 1password *secure note* to Fly. This way you ensure developers always keep secrets up-to-date and never lost files in their computer.
- More secure and simpler method of managing Fly.io secrets.
By default, Fly secrets must be managed by `flyctl`. This means that setting secrets in production, developers must use `flyctl` passing credentials via arguments - risking credentials being stored in their histories. Alternatively one must secrets in a file and run `flyctl secrets import`. This works well, but you must ensure everything is synched to a secret/password manager and then delete the file.
1password-secrets enables a leaner management of secrets via 1password. Via an app name, automatically finds and imports secrets in an 1password _secure note_ to Fly. This way you ensure developers always keep secrets up-to-date and never lost files in their computer.

Motivation: Using 1password for this avoids the need for another external secret management tool. And keeps the access control in a centralised place that we already use.

## Getting started

### Requirements

- Install the required dependencies:
1Password >= `8.9.13`
1Password CLI >= `2.13.1`
flyctl >= `0.0.451`
- Install the required dependencies:

1Password >= `8.9.13`

1Password CLI >= `2.13.1`

flyctl >= `0.0.451`

```
brew install --cask 1password 1password-cli && \
brew install flyctl
```
```
brew install --cask 1password 1password-cli && \
brew install flyctl
```

- Allow 1Password to connect to 1Password-CLI by going to `Settings` -> `Developer` -> `Command-Line Interface (CLI)` and select `Connect with 1Password CLI`.
- Allow 1Password to connect to 1Password-CLI by going to `Settings` -> `Developer` -> `Command-Line Interface (CLI)` and select `Connect with 1Password CLI`.

- Sign into your 1Password and Fly account (if you wish to use the fly integration).
- Sign into your 1Password and Fly account (if you wish to use the fly integration).

### Installation

Expand All @@ -42,7 +44,7 @@ Motivation: Using 1password for this avoids the need for another external secret

### Local

From within a valid git repository with remote "origin" ending in `<owner>/<repo>.git`, 1password-secrets will be able to `get` and `push` secrets to a 1password secure note containing `repo:<owner>/<repo>` in its name. By default it syncs to `./.env` file, this can overridden with a `file_name` field containing the desired relative file path.
From within a valid git repository with remote "origin" ending in `<owner>/<repo>.git`, 1password-secrets will be able to `get` and `push` secrets to a 1password secure note containing `repo:<owner>/<repo>` in its name. By default it syncs to `./.env` file, this can overridden with a `file_name` field containing the desired relative file path.

To get secrets from 1Password, run:
`1password-secrets local get`
Expand Down
8 changes: 7 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,14 @@
keywords='fly.io, 1password, secrets',
author='Significa',
classifiers=[
'Development Status :: 3 - Alpha',
'Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Topic :: Utilities',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
],
)

0 comments on commit d3d490f

Please sign in to comment.