Git Product home page Git Product logo

mysteryshack's Introduction

not maintained

Please see #74

mysteryshack Build Status

Mysteryshack is a lightweight, yet self-contained remoteStorage-server.

This project is still in active development. Do not use with sensitive data, or without backup.

Use username demo and password demo on my server to try it out. Don't use that account for actual data though: It is reset daily.

Installation

You need OpenSSL installed.

  • Install Rust and Cargo.
  • Clone this repository.
  • Run make.
  • Stick ./target/release/mysteryshack into your PATH.

Usage

  • Edit config.example and save it as config.
  • mysteryshack user create foo to create a new user called foo.
  • mysteryshack serve to run the server as configured in ./config.

For advanced usage, see mysteryshack --help and mysteryshack user --help.

Updating

Just git pull and make again.


Troubleshooting

OS X and OpenSSL

As of OS X 10.11, OpenSSL isn't installed anymore. You'll need to install it manually:

brew install openssl
brew link --force openssl

Implementation notes

  • Mysteryshack mostly implements draft-dejong-remotestorage-05.txt, however:

    • it sends two kinds of webfinger responses to stay compatible with remotestorage.js.

    • The app-provided client_id is ignored, Origin of redirect_uri is used for app identification.

  • Mysteryshack is set up to be tested against the official api test suite automatically (in Travis).

  • Mysteryshack's approach to concurrency is very simplistic. Only storage operations are safe to perform concurrently. User creation and deletion, app authorization and de-authorization are not, because it is assumed that the user performing those operations is a single human with only two hands and one keyboard.

  • Web admin sessions are stored inside signed cookies. The key is generated at server startup. To log everybody out, restart the server.

  • OAuth tokens are JSON signed with a per-user key. The server stores a list of client_ids the user has authorized, and checks if the token's client_id claim is found in that list.

  • Mysteryshack violates the WebFinger RFC by returning bogus information for nonexistent accounts. This is done to prevent account enumeration.

License

mysteryshack's People

Contributors

raucao avatar untitaker avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

mysteryshack's Issues

Deploy To Heroku Button

It would be super useful if we could get a Deploy to Heroku button which would enable users to easily deploy your software to a Heroku instance without ever leaving the web browser. And with just a little configuration on the users end they'll have something running almost instantly. I propose the button because it is ideal for communities who need to make decisions quickly with the flexibility of something like Heroku.

It's very simple to do, just make sure that an app.json file is located in the repo root directory. More about Heroku deploy buttons here.

Deploy

Revisit password hashing

We use rust-crypto's bcrypt implementation directly to hash passwords manually. As mentioned in #39, rust-crypto is not audited in any way, so we should probably look for alternatives.

CSRF hits when using load balancer

I am trying to put a rancher load balancer in front of mysteryshack.

The load balancer does the SSL termination and reverse proxy to the mysteryshack container port (which is not exposed to the outside world). When I go to https://mysteryshackdomain/ I see the login page normally but after I enter my credentials, I get CSRF detected.. Any advice on resolving this? 📲

Running outside release

Hey,
So I'm having a problem, even after adding ./target/release to path, when I run mysteryshack serve it gives os error 2, but if I run inside the release directory works.
Failed to parse config: No such file or directory (os error 2)

My idea is that mysteryshack doesn't find the configuration file, wouldn't be better to have the config file in some common place (like ~/.mysteryshack) ou add a flag to load the file
mysterysharck serve -c path/to/config

Create data_path if it doesn't exist

When mysteryshack is started, but the directory stated by data_path, doesn't exist, it fails with the error:

Failed to parse config: No such file or directory (os error 2)

mysteryshack should create the directory if it doesn't exist.

To reproduce

  1. Edit config and set "data_path = hello"
  2. Run ./mysteryshack serve

Build fails on Mac OS X 10.11

During the build process, this eventually happens...

running: "cc" "-O3" "-ffunction-sections" "-fdata-sections" "-m64" "-fPIC" "-o" "/Users/njenning/code/projects/mysteryshack/target/release/build/openssl-sys-f0bee5fb97afc90d/out/src/openssl_shim.o" "-c" "src/openssl_shim.c"
ExitStatus(Code(1))


command did not execute successfully, got: exit code: 1



--- stderr
src/openssl_shim.c:1:10: fatal error: 'openssl/hmac.h' file not found
#include <openssl/hmac.h>
         ^
1 error generated.
thread '<main>' panicked at 'explicit panic', /Users/njenning/.cargo/registry/src/github.com-0a35038f75765ae4/gcc-0.3.19/src/lib.rs:771

Dashboard UI improvements

  • Show app icons
  • Show identicons per token obsolete with signed tokens
  • Group tokens by app obsolete with signed tokens
  • Ability to reject all tokens for app
  • Show used scopes

Internal server error on validation page + CSP error

Hi! Thanks for doing mysteryshack. I was trying to use it on my server, installed it behind a Nginx proxy, set up the proxy headers, and then tried to use it with Laverna.

When I enter my email identifier and then click Connect (in Laverna), I get to the redirection page from Mysteryshack, and I seem to hit two errors:

  • nothing appears on screen. In the server logs, I see the following:
Server error: IronError { error: RenderError(RenderError { desc: "Helper not defined: \"block\"", template_name: Some("layout"), line_no: Some(8), column_no: Some(13) }), response: HTTP/1.1 500 Internal Server Error
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
X-Frame-Options: DENY
Content-Security-Policy: default-src 'self';frame-ancestors 'none'
 }
  • the client (browser developers console) logs show the following:
Content Security Policy: The page’s settings blocked the loading of a resource at self (“default-src https://url”). Source: 
            html { display: none; }
   ....  dashboard:20
 Content Security Policy: The page’s settings blocked the loading of a resource at self (“default-src https://url”). Source: 
            if(self == top) {
         ....  dashboard:23
 Content Security Policy: The page’s settings blocked the loading of a resource at self (“default-src https://url”). Source: 
:root #content > #right > .dose > .dose....  dashboard:1
 Content Security Policy: The page’s settings blocked the loading of a resource at self (“default-src https://url”). Source: call to eval() or related function blocked by CSP.

Does it ring a bell? Can I get some help, please? Please let me know if you need more logs, or I should run some debugging code or anything.

Cheers!

I can use laverna to connect my own server

the output
Server error: IronError { error: NoRoute, response: HTTP/1.1 404 Not Found
Content-Type: text/html; charset=utf-8
Content-Length: 1559
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
X-Frame-Options: DENY
Content-Security-Policy: default-src 'self';frame-ancestors 'none'

}

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.