Git Product home page Git Product logo

kontena-local-auth's Introduction

Build Status

Deprecated

Kontena swithced in 0.16 release to oauth2 authentication and thus this repo is now only compliant with Kontena < 0.16.

See Kontena auth documentation at: https://www.kontena.io/docs/using-kontena/authentication

kontena-local-auth

This project provides local self-contained authentication backend for Kontena.

The main purpose is to allow organizations to setup fully private Kontena masters that do not need any access to external services.

Architecture

The APi is implemented using Roda REST API framework. As a persistent storage all user information is stored in local sqlite DB.

The passwords are hashed using BCrypt algorithm which is pretty secure by nature and has salts etc. built in.

Running the auth api

Naturally this should be run with Docker.

docker run -d -p 3000:3000 jnummelin/kontena-auth

Running in prod

TODO:

  • Describe volume setup for the DB file
  • Describe easy SSL setup for HAProxy etc.

Testing

Tests are implemented using rspec and ca be run by issuing:

rspec spec/

Testing with Kontena master

For local testing with Kontena master there's ready made docker-compose.yml that sets up Kontena master and Mongo for it. It also sets the master to use this local auth container as its auth backend.

Integrating with Kontena master

To setup your own Kontena master to use this auth API as backend use following env variable for the master:

AUTH_API_URL=http://authapi.somehost.io:5000

Backing up

Make sure you take backups of your user data. The auth service uses Sqlite database to store data. By default the user database is store at /data/users.db. The path /data is declared as volume so docker will store it outside of the container layer. In order to take backups you can mount that same volume in another container and send the data somewhere safe. Something like this:

docker run --rm --volumes-from kontena-local-auth ubuntu ./send_to_s3.sh /data/users.db

kontena-local-auth's People

Contributors

jnummelin avatar

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.