No project description provided
Project description
phovea_security_flask
Security manager implementation based on Flask-Login. Additionally, a login module is provided that can be used at client-side.
Installation
git clone https://github.com/phovea/phovea_security_flask.git
cd phovea_security_flask
npm install
Testing
npm test
Building
npm run build
Default users
Username | Password |
---|---|
admin | admin |
sam | sam |
Add new users
Config File
New users are added to phovea_security_flask/config.json
.
The python script encryptor.py
hashes a given password and prints password, salt, and hashed password.
Environment Variables
Alternatively, you can provide users via environment variables:
The UserStore
class in phovea_security_flask/dummy_store.py
reads all environment variables starting with PHOVEA_USER_
and uses the remainder of the enviroment variable key as username. The environment variable's key has to contain: SALT;HASHED_PW;ROLE1
(multiple roles can be added by seperating them with a semicolon), e.g.:
export PHOVEA_USER_bruce.banner="08c52b567cb947c98be6de6e9ad3919f;2c946ca1b8574d506ee5e7b3b22e350bc8c93b9df647d17e4429e727529c63a62d1fb274ca5a7499bd33c0844e437631728ee9fcba14b41204f21ec8cda523f7;avenger;scientist
Defines the following user:
- Username:
bruce.banner
- Salt:
08c52b567cb947c98be6de6e9ad3919f
- Hashed password:
2c946ca1b8574d506ee5e7b3b22e350bc8c93b9df647d17e4429e727529c63a62d1fb274ca5a7499bd33c0844e437631728ee9fcba14b41204f21ec8cda523f7
- Roles:
avenger, scientist
NOTE: User credentials defined as environment variables override all users defined in the config.json
. This behaviour can be used to define development users inside the config.json
, and provide users for production via environment variables when deployed.
This repository is part of Phovea, a platform for developing web-based visualization applications. For tutorials, API docs, and more information about the build and deployment process, see the documentation page.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for phovea_security_flask-7.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13717f889acc5e9a22c2288e2b45be4318d649b549d9c0070ba8047c4f8f698d |
|
MD5 | 7cd3b0b23099f1abf947c4fdf9b0e0e2 |
|
BLAKE2b-256 | 3b58358652adf787ed6323f4f3184f3d7e828c5c8f13d6b88a1cc5e8cd64718a |
Hashes for phovea_security_flask-7.0.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b429353ba26385383f5bdc96effbe58306302cad0eea30aee0abe164bcdd2a7 |
|
MD5 | 4991f4398fbfec8887381263d41f97e2 |
|
BLAKE2b-256 | 38e2f58e3df3aed69ef672ab90b020eebe065f3cd1fcecb31897fefdb0346235 |