1
0
Fork 0
mirror of https://github.com/Luzifer/cloudkeys-go.git synced 2024-11-09 14:40:05 +00:00
A small keepass alternative you can host by yourself
Find a file
Martin Thielecke 9812c14aa2 Removed old clippy flash extension and replaced it with pure JS solution
Squashed commit of the following:

commit 682b84ab51
Author: Martin Thielecke <github@mthie.com>
Date:   Mon Nov 30 21:13:13 2015 +0000

    fixed godeps path

commit 816132283f
Author: Martin Thielecke <github@mthie.com>
Date:   Mon Nov 30 21:12:23 2015 +0000

    removed branding

commit d7683dd6a5
Author: Martin Thielecke <github@mthie.com>
Date:   Mon Nov 30 21:08:33 2015 +0000

    reverted some individual stuff

commit 26bc1a35e1
Merge: ecd8e53 b8ad8ee
Author: Martin Thielecke <github@mthie.com>
Date:   Mon Nov 30 20:51:18 2015 +0000

    Merge branch 'master' of github.com:Luzifer/cloudkeys-go into clipboardapi

    Conflicts:
    	assets/script.js
    	bindata.go
    	coffee/script.coffee

commit ecd8e53b13
Author: Martin Thielecke <github@mthie.com>
Date:   Mon Nov 30 20:45:20 2015 +0000

    removed old clippy flash extension and replaced it with pure JS solution

commit 225e9f13c2
Author: Martin Thielecke <github@mthie.com>
Date:   Sat Aug 1 18:14:14 2015 +0000

    [main] Revert "changed variable names according to linter"

    This reverts commit 91ac55453c.

commit 91ac55453c
Author: Martin Thielecke <github@mthie.com>
Date:   Sat Aug 1 11:54:53 2015 +0000

    changed variable names according to linter

commit 7a0f9e22ba
Merge: 6c57d39 8386e47
Author: Martin Thielecke <github@mthie.com>
Date:   Sat Aug 1 11:32:28 2015 +0000

    Merge branch 'master' of github.com:Luzifer/cloudkeys-go

commit 6c57d394ae
Author: Martin Thielecke <github@mthie.com>
Date:   Fri Jul 31 19:30:47 2015 +0000

    added title

commit 17ae0383fd
Merge: d813879 553680c
Author: Martin Thielecke <github@mthie.com>
Date:   Fri Jul 31 19:21:18 2015 +0000

    Merge branch 'development' of github.com:mthie/cloudkeys-go

commit 553680c725
Merge: ec26daa 1b66ad4
Author: Martin Thielecke <github@mthie.com>
Date:   Fri Jul 31 19:19:41 2015 +0000

    Merge branch 'master' of github.com:Luzifer/cloudkeys-go into development

commit d81387910e
Author: Martin Thielecke <github@mthie.com>
Date:   Fri Jul 31 18:51:28 2015 +0000

    changed title

commit 45a64d1110
Author: Martin Thielecke <github@mthie.com>
Date:   Fri Jul 31 18:36:14 2015 +0000

    changed usernames for deployment

commit ec26daa679
Author: Martin Thielecke <github@mthie.com>
Date:   Fri Jul 31 18:34:36 2015 +0000

    fixed username
2015-11-30 22:30:52 +01:00
assets Removed old clippy flash extension and replaced it with pure JS solution 2015-11-30 22:30:52 +01:00
coffee Removed old clippy flash extension and replaced it with pure JS solution 2015-11-30 22:30:52 +01:00
Godeps Added Godeps 2015-07-30 18:13:40 +02:00
less Removed old clippy flash extension and replaced it with pure JS solution 2015-11-30 22:30:52 +01:00
templates Do not throw error messages at users, let the frontend handle errors 2015-07-29 10:10:46 +02:00
.gitignore Initial port from PHP to Go 2015-07-29 09:02:14 +02:00
.gobuilder.yml Initial port from PHP to Go 2015-07-29 09:02:14 +02:00
ajax.go Do not throw error messages at users, let the frontend handle errors 2015-07-29 10:10:46 +02:00
bindata.go Removed old clippy flash extension and replaced it with pure JS solution 2015-11-30 22:30:52 +01:00
config.go Added env reader for parameters 2015-07-30 17:25:10 +02:00
dataObject.go Initial port from PHP to Go 2015-07-29 09:02:14 +02:00
Dockerfile Improved Dockerfile and Makefile 2015-10-28 13:47:31 +01:00
History.md Prepared release 1.2.4 2015-10-28 13:50:43 +01:00
httpHelper.go Fixed linter errors 2015-07-29 09:49:42 +02:00
LICENSE Added license file 2015-07-29 09:39:22 +02:00
login.go Fix: Restored old behavior of making all usernames lowercase 2015-07-31 21:02:03 +02:00
main.go Improved Dockerfile and Makefile 2015-10-28 13:47:31 +01:00
Makefile Improved Dockerfile and Makefile 2015-10-28 13:47:31 +01:00
overview.go Do not throw error messages at users, let the frontend handle errors 2015-07-29 10:10:46 +02:00
Procfile Added Procfile for Heroku 2015-07-30 18:24:11 +02:00
README.md Fixed numbering in README 2015-07-31 21:11:19 +02:00
register.go Fix: On register the username needs to be treated like in login 2015-08-01 00:59:44 +02:00
storage.go Initial port from PHP to Go 2015-07-29 09:02:14 +02:00
storageLocal.go Fixed linter errors 2015-07-29 09:49:42 +02:00
storageRedis.go Added Redis storage adapter 2015-07-29 12:05:10 +02:00
storageS3.go Fixed linter errors 2015-07-29 09:49:42 +02:00

CloudKeys Go

License: Apache v2.0 Download binaries

CloudKeys Go is a port of the former CloudKeys project written in PHP. This Go port is 100% compatible to the data written by the older version but adds more storage options. Also it's faster, more stable and last but not least it's not longer based on PHP but working as a tiny webserver implemented in pure Go.

Usage

# cloudkeys-go --help
Usage of ./cloudkeys-go:
      --cookie-authkey="": Key used to authenticate the session
      --cookie-encryptkey="": Key used to encrypt the session
      --listen=":3000": IP and port to listen on
      --password-salt="": A random unique salt for encrypting the passwords
      --storage="local:///./data": Configuration for storage adapter (see README.md)
      --username-salt="": A random unique salt for encrypting the usernames

What you definitely should set when starting the server:

  • cookie-authkey - This flag protects the encrypted cookies you're putting on the users computers containing the session. If you don't set it yourself it will be randomly generated. In that case your users will get logged out every time you restart the server. You need to use a key with length of 16 characters (AES128) or 32 characters (AES256).
  • cookie-encryptkey - This flag is the encryption key itself. Like the authkey it will get autogenerated with the same result. You need to use a key with length of 16 characters (AES128) or 32 characters (AES256).
  • password-salt - The login password of your users are stored in the database for comparison when they log in. Though the passwords are hashed this salt gives you more confidence nobody can use a hash table to simply decrypt the passwords.
  • username-salt - The usernames are the keys in the database. Like the passwords they are also hashed but you can put an additional salt to them to make it way harder to break them. You should use another salt than for the passwords.

If you don't want to define the secrets using command line flags you also can use environment variables to set those flags:

FLAG                ENV-Variable

password-salt       passwordSalt
username-salt       usernameSalt
storage             storage
listen              listen
cookie-authkey      authkey
cookie-encryptkey   encryptkey

Supported storage engines

Local file storage (default)

This storage engine is used in the default config when you just start up the server as you can see in the output above. You don't have many options to set for this one. The only thing is the path where all the data is stored.

Schema:  local:///<your data directory>
Example: local:///./data

The directory can be set absolute or relative. Please ensure there are 3 slashes between local: and the begin of your path. (So if you're setting an absolute path you will set 4 slashes in a row.)

Amazon Web Services S3

This is the storage engine you want to use if you're migrating from the old CloudKeys version. This option is fully compatible to every piece of data the old version stored.

Schema:  s3://<bucket><path>
Example: s3://mybucket/

You can specify the bucket and also a prefix for the storage. That way you even could use one bucket for different instances of CloudKeys Go. In case you're migrating from the old version you need to set the path to /.

For this to work you also need to set three environment variables: AWS_ACCESS_KEY, AWS_SECRET_ACCESS_KEY and AWS_REGION. When its about AWS_REGION pay attention to select the right region for your bucket.

Redis

If you want to utilize a Redis storage server or even a Redis cluster you can choose this storage type. Authentication is supported as well as selecting the database to use. Aditionally you can set a prefix for the keys.

Schema:  redis+tcp://auth:<password>@127.0.0.1:6379/<db>?timeout=10s&maxidle=1&prefix=<prefix>
Example: redis+tcp://auth:mypass@redis.example.com:6379/5?prefix=cloudkeys::

Install on PaaS

Install on CloudControl

  1. Create a new CloudControl app

    # cctrlapp APP_NAME create custom --buildpack https://github.com/heroku/heroku-buildpack-go
    
  2. Push the code to your app and deploy it

    # cctrlapp APP_NAME/default push
    # cctrlapp APP_NAME/default deploy
    
  3. Set your configuration variables (see env variables in usage section above)

    # cctrlapp app_name/dep_name config.add PARAM1=VALUE1 PARAM2=VALUE2 [...]
    

Install on Heroku

  1. Create a new Heroku app

    # heroku create -b https://github.com/heroku/heroku-buildpack-go
    
  2. Push the code to your app

    # git push heroku master
    
  3. Set your configuration variables in the Heroku apps dashboard (see env variables in usage section above)