Git Product home page Git Product logo

ssh-cert-service's Introduction

ssh-cert-service

TODO: update this !!!!!

Quick intro of project goes here.

Installation

pip install ssh_cert_service

Configuration

The application can configured like any other Flask application.

First it will load the bundled settings.py file to configure sensible defaults. Please see settings.py and https://terndatateam.bitbucket.io/flask_tern/ for details.

Next it will look for an environment variable SSH_CERT_SERVICE_SETTINGS. This environment variable should point to a python file which will be loaded as well. The format is exactly the same as in settings.py .

This project uses flask_tern. Be sure to check documentation https://terndatateam.bitbucket.io/flask_tern/ and code https://bitbucket.org/terndatateam/flask_tern .

Flask-Cors: https://flask-cors.readthedocs.io/en/latest/

Development

Clone the source code and cd into the directory of your local copy. You may want to adapt settings in .flaskenv

# install project in editable mode
pip install -e '.[testing,docs]'
# to run tests use
pytest
# coverage report
pytest --cov --cov-report=html

Build API structure run the following command. Please make sure to install json-refs

The same can be done within a docker environment. The following is a simple example using alpine.

docker run --rm -it -p 5000:5000 -v "$(pwd)":/ssh_cert_service -w /ssh_cert_service alpine:3.10 sh
# install python in binary libs in container
apk add python3 py3-cryptography
# install pkg in container
pip3 install -e '.[testing]'
# run tests inside container
pytest
pytest --cov --cov-report=html

Run flask development server.

# locally
flask run
# within container
flask run -h 0.0.0.0

You will have to export two env variables, but one of it is optional. However, before doing this you will need a master_ssh_key, if you don't have it, you can create one with the following command .. code:: bash

ssh-keygen -t rsa -C "user_ca" -N "<optiona_passphrese>" -f <path_to_export_keys>/user_ca

Then, you will need to export the path into an env variable as well as the passphrase if you created it. ... code:: bash

export MASTER_PRIVATE_KEY_PATH_ENV=<path_to_export_keys> export MASTER_KEY_PASSPHRASE_ENV=<passphrase>

The app can then be accessed at http://localhost:5000

ssh-cert-service's People

Contributors

gweis avatar jeffctr avatar

Watchers

 avatar Hoang Anh Nguyen avatar James Cloos avatar  avatar Edmond Chuc avatar

Forkers

jeffctr

ssh-cert-service's Issues

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.