Code Monkey home page Code Monkey logo

sse-platform's People

Contributors

dependabot[bot] avatar smunfr avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

pauzii

sse-platform's Issues

implement a logout from modules

due to CORS, we cannot simply call the platforms logout handler from a module page. instead a module should implement an own logout handler and message the platform that a user logs out so that the platform can also clear his token.

Enable CORS-HTTP

Server needs to enable Cross Origin Requests in Header for Ajax Call

Refactor architecture to microservices

all of this module execution stuff is starting to get out of hand. there is no way this can be controlled in a stable way. we need to let every module be running independently and only communicating with the platform via the socket. everything else is there own business.

this way we also have more flexibility in module development because now basically everything can be a module in every programming language you want, as long as it implements the websocket connection.

Add module name to config

Add the module_name to the config.json file and to the global_vars.py since you need to replace the name 4 times in the socket_client.py and 2 times in the log within the main.py ("module has been recognized by platform") of the client.

user authentification

user has to be able to create an account and log in through a form.
save user in a db (security!)
save session of the user in a secure cookie afterwards.
and protect sensible requests (download/delete/start/stop of modules) only for authenticated users.

further implementations with dependencies:

  • user must be an admin to do the stuff listed above (needs ACL mechanism)

Config gives only file

Platform gives the path and file...

easy to fix in apply config
to so

with open(config) as json_file:
     data = json.load(json_file)

module.apply_config(module_config) # function implemented by module

Token TTL is not rebroadcasted to platform

If a user works on a module for some time and does not visit the platform again, its token will remain active on the module but will be deleted on the platform, causing an inconsistent state.

if access token has special characters, auth will fail

since we have to pass the access token as a query parameter, it will fall under url encoding.
access tokens are 32 random bytes, if there is e.g. a "+" in it, it will be parsed as a space instead, which results in the token validation failing.

either find a way to disable the url encoding so that the string is read as it is,
or parse out the special characters from the access token

@pauzii just fyi, if your auth fails, try again until u have an access token that has no special characters

set up travis

travis should automatically:
-run tests
-run build
-build docs
-on commit to master or on release: redeploy to (production) server

implement ACL

Login/Auth needs ACL to ensure user has sufficient permission do to certian actions

Platform fail

sys.exit(-1)

Moin, das erzeugt bei mir immer einen Fehlstart, weil ja die Plattform selbst keine Conifg hat (bisher). Also entweder config rein, oder sys raus :)...

create a default admin account

on server startup create and admin account with credentials read from config.
depends on the access control to be implemented, so we distinguish requests between user and admin permission. i.e. certain resources should be admin only, while others can be accessed by users.

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.