Giter Club home page Giter Club logo

psoco's Introduction

psoco

PSONO console client.

PSONO is a secure Open Source Password Manager, which can be self hosted by anyone so you have to trust no one.

Usage

psoco 0.1.0
psono command line client

USAGE:
    psoco [OPTIONS] <SUBCOMMAND>

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -c, --config-path <config-path>    path of the psoco config.toml [env: PSOCO_CONFIG_PATH=]

SUBCOMMANDS:
    all       Get all entry data (user, pwd, url, ...) by id. Displays a table if there is more than one result.
    config    Show or create a psoco config
    help      Prints this message or the help of the given subcommand(s)
    list      list all entries as table
    pwd       Get passwords by id. Displays a table if there is more than one result.
    search    search all datastores
    user      Get username by id. Displays a table if there is more than one result.

CI/CD Usage

See ci.sh for an example script on how to use psoco during your CI/CD process.

Build

Rust native

If you have rust installed just run cargo build --release.

The current version builds with Rust 1.43.

Docker approach to create a static linux binary (musl)

build_docker.sh can be used to build a static binary using x86_64-unknown-linux-musl.

Afterwards the stripped binary will be located at: ./build/psoco.

Cleanup:

  • delete docker_cache directory
  • delete
$> file build/psoco
build/psoco: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, stripped

This way is also used to create the psoco releases.

Install

Download psoco binary and place into a directory which is part of your $PATH.

Setup / Config

Create API Key

  1. Go to Other -> API Keys and click Create new API Key.
  2. Name your API key and make sure neither Secret Restriction? nor Allow insecure usage? are activated. (see Image )
  3. Click Create
  4. In the API key overview click on the edit Icon for the newly created key
  5. In this view you will see all secrets you need for the psoco config (see image 2)

Create API Key

Create API Key

View API Key

View API Key

Create Config

Default config location:

  • Linux: $HOME/.config/psoco/config.toml
  • Mac: /Users/UserName/Library/Preferences/eu.dfjk.psoco/config.toml
  • Windows: C:\Users\UserName\AppData\Roaming\dfjk\psoco\config.toml

It's possible to change the default location by setting the environment variable PSOCO_CONFIG_PATH or using the command line option --config-path (-c for short) followed by the path.

Interactive Config Creation

Run psoco config create and fill in all your API key data (see API key creation) when asked.

Config Template

Alternatively psoco config template prints a config template which can by adjusted manually:

api_key_id = '00c0ffee-babe-dead-beef-dec0de000000'
api_key_private_key = '1234567890123456789012345678901234567890123456789012345678901234'
api_key_secret_key = '4321098765432109876543210987654321098765432109876543210987654321'
server_url = 'https://www.psono.pw/server'
server_signature = 'a16301bd25e3a445a83b279e7091ea91d085901933f310fdb1b137db9676de59'
danger_disable_tls = false

Config Entries

Settings Type Description
api_key_id UUID The UUID of your API key
api_key_private_key 64 byte hex string Private key used to sign the client login info
api_key_secret_key 64 byte hex string Secret key used for encryption of the user's secret key
server_url URL Address of the PSONO's backend server - e.g.: https://www.psono.pw/server
server_signature 64 byte hex string PSONO servers signature - psoco checks if the session data is signed by this public key
danger_disable_tls bool Danger: disables TLS host verification. You should only set this to true if your psono instance uses an untrusted TLS certificate.

The default PSONO instance at https://www.psono.pw/server will always use a trusted TLS certificate.

Check config

You can check your config with psoco config show.

This command will tell you the configs' location and if it is valid (use show -r for raw output).

By default only the beginning and end of the privat keys are shown and the rest replaced with Xs. If you want to display the full private and secret keys then use show -p.

License

The MIT License (MIT)

Copyright (c) 2020 Bernd Kaiser

psoco's People

Contributors

meldron avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

fizuaal

psoco's Issues

Application password not shown

If I search for an password type: application it doesn't get shown

 psoco search -f FoilAuth
+----------+---------------------+--------------------------------------+
| Name     | Path                | ID                                   |
+----------+---------------------+--------------------------------------+
| FoilAuth | /all/Handy/FoilAuth | 65568bea-4560-4cab-8621-84a91eeba152 |
+----------+---------------------+--------------------------------------+
 $  psoco pwd -a  65568bea-4560-4cab-8621-84a91eeba152
+--------------------------------------+-------+------+----------+-------+-----+------------+
| ID                                   | Title | User | Password | Notes | URL | URL Filter |
+--------------------------------------+-------+------+----------+-------+-----+------------+
| 65568bea-4560-4cab-8621-84a91eeba152 |       |      |          |       |     |            |
+--------------------------------------+-------+------+----------+-------+-----+------------+

missing private key error

Hi there,

nice to see some rust working with a good app!

Built the dockerfile a little so that it can run from within docker image

built the binary

generated the config and input the api data from my psono setup

but get this error

Error: LoginInfoMissingItemError { missing: "private_key" }
docker run --rm -v $PWD/config/config.toml:/.config/psoco/config.toml -it psoco:latest /psoco -c /.config/psoco/config.toml  list
Error: LoginInfoMissingItemError { missing: "private_key" }

(โŽˆ |N/A:N/A)[14:54:21] ross:psoco git:(master*) $ docker run --rm -v $PWD/config/config.toml:/.config/psoco/config.toml -it psoco:latest /psoco -c /.config/psoco/config.toml config show
Redacted Config at '/.config/psoco/config.toml':

api_key_id = 'aebf624b-.........-0cde49c48390'
api_key_private_key = 'c37cXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXb2c4'
api_key_secret_key = '25b1XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXab12'
server_url = 'https://pw.blahblah.com/server'
server_signature = 'ce6a4f1.........ffc'
danger_disable_tls = false

Config is valid

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.