Use separate db users for deployed components.#3876
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3876 +/- ##
==========================================
- Coverage 75.72% 70.96% -4.77%
==========================================
Files 145 145
Lines 6901 6901
Branches 417 417
==========================================
- Hits 5226 4897 -329
- Misses 1675 2004 +329
Continue to review full report at Codecov.
|
| body: | | ||
| { | ||
| "cloudant": { | ||
| {% for item in readerList | union(writerList) | union(adminList) %}"{{ item }}": [ {% if item in readerList %}"_reader"{% if item in writerList %}, "_writer"{% if item in adminList %}, "_admin"{% endif %}{% endif %}{% endif %} ], {% endfor %} |
| "CONFIG_whisk_couchdb_port": "{{ db.port }}" | ||
| "CONFIG_whisk_couchdb_username": "{{ db.credentials.admin.user }}" | ||
| "CONFIG_whisk_couchdb_password": "{{ db.credentials.admin.pass }}" | ||
| "CONFIG_whisk_couchdb_username": "{{ db.credentials.controller.user }}" |
There was a problem hiding this comment.
should we perhaps use dbUser and dbPass here?
I think the same could be valid for the invoker as well
There was a problem hiding this comment.
Please ignore the comment, discussed it in person
|
PG3#2554 🔵 |
|
I tried to pickup latest master today and for me ansible tasks were failing with below error Apparently that was happening because system already had a |
With this PR, each deployed component will get it's own database credentials. On doing this, we are able to set the permissions for each component.
E.g. the invoker does not need write access to the subjects- and the whisks db.
The database users and the permission handling is done on wipedb and initdb.
The db-prefix is part of the usernames. This is to avoid clashes if several Openwhisk instances use the same couchdb/cloudant instance.
Related issue and scope
My changes affect the following components
Types of changes
Checklist: