Skip to content

Commit cc95e01

Browse files
avara1986alexppg
andauthored
Encrypt/decrypt config (#86)
* Added crypt options * Fix pylint and flake8 * No cover to no testable conditions * No cover to no testable conditions * Removed encrypted var after decrypted * Fix, send path to ConfFile from Microservice class to set path from code * Updated pipfile * Fix unused import * Updated dependencies * Changed SHA2576 to SHA512_256 * Updated docs * Fix example * Fix docs and update examples * Fix issue #88 * Update docs/encrypt_decryt_configuration.md Co-Authored-By: Àlex Pérez <[email protected]> * Update docs/encrypt_decryt_configuration.md Co-Authored-By: Àlex Pérez <[email protected]> * Update docs/encrypt_decryt_configuration.md Co-Authored-By: Àlex Pérez <[email protected]> * Update docs/encrypt_decryt_configuration.md Co-Authored-By: Àlex Pérez <[email protected]> * Update docs/encrypt_decryt_configuration.md Co-Authored-By: Àlex Pérez <[email protected]> * Update docs/encrypt_decryt_configuration.md Co-Authored-By: Àlex Pérez <[email protected]> * Update docs/encrypt_decryt_configuration.md Co-Authored-By: Àlex Pérez <[email protected]> * Fix typo * Fix typo Co-authored-by: Àlex Pérez <[email protected]>
1 parent a4a6871 commit cc95e01

21 files changed

+667
-120
lines changed

Pipfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,17 @@ python-json-logger = ">=0.1.10"
99
pyyaml = ">=5.1.2"
1010
anyconfig = ">=0.9.8"
1111
swagger-ui-bundle = ">=0.0.2"
12-
connexion = {extras = ["swagger-ui"],version = "==2.4.0"}
12+
connexion = {extras = ["swagger-ui"],version = "==2.6.0"}
1313
jaeger-client = "==4.3.0"
1414
flask-opentracing = "*"
1515
opentracing = ">=2.1"
1616
opentracing-instrumentation = "==3.2.1"
1717
prometheus_client = ">=0.7.1"
18+
cryptography = "*"
1819

1920
[dev-packages]
2021
requests-mock = "*"
21-
coverage = "==4.5.4"
22+
coverage = "==5.0.3"
2223
pytest = "*"
2324
pytest-cov = "*"
2425
pylint = "*"
@@ -27,7 +28,7 @@ tox = "*"
2728
bandit = "*"
2829
mkdocs = "*"
2930
mkdocs-material = "*"
30-
lightstep = "==4.3.0"
31+
lightstep = "==4.4.3"
3132

3233
[requires]
3334
python_version = "3.6"

Pipfile.lock

Lines changed: 111 additions & 46 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
[![Requirements Status](https://requires.io/github/python-microservices/pyms/requirements.svg?branch=master)](https://requires.io/github/python-microservices/pyms/requirements/?branch=master)
77
[![Total alerts](https://img.shields.io/lgtm/alerts/g/python-microservices/pyms.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/python-microservices/pyms/alerts/)
88
[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/python-microservices/pyms.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/python-microservices/pyms/context:python)
9+
[![Documentation Status](https://readthedocs.org/projects/py-ms/badge/?version=latest)](https://py-ms.readthedocs.io/en/latest/?badge=latest)
910
[![Gitter](https://img.shields.io/gitter/room/DAVFoundation/DAV-Contributors.svg)](https://gitter.im/python-microservices/pyms)
1011

1112

docs/configuration.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@
44

55
**CONFIGMAP_FILE**: The path to the configuration file. By default, PyMS search the configuration file in your
66
actual folder with the name "config.yml"
7-
**CONFIGMAP_SERVICE**: the name of the keyword that define the block of key-value of [Flask Configuration Handling](http://flask.pocoo.org/docs/1.0/config/)
8-
and your own configuration (see the next section to more info)
7+
**KEY_FILE**: The path to the key file to decrypt your configuration. By default, PyMS search the configuration file in your
8+
actual folder with the name "key.key"
99

1010
## Create configuration
1111
Each microservice needs a config file in yaml or json format to work with it. This configuration contains
1212
the Flask settings of your project and the [Services](services.md). With this way to create configuration files, we
1313
solve two problems of the [12 Factor apps](https://12factor.net/):
14+
1415
- Store config out of the code
1516
- Dev/prod parity: the configuration could be injected and not depends of our code, for example, Kubernetes configmaps
1617

0 commit comments

Comments
 (0)