Authentication config file for in-memory backend#59
Conversation
2b6cbd3 to
81c4b5c
Compare
|
@ironman-machine give me your status about that :) |
|
Hello @alexandre-merle, Starting end to end procedure using the following payload: Please follow http://ci.ironmann.io/gh/scality/Integration/1779 for circle status. |
| } | ||
| checkExists(data, 'User', 'keys', 'array', userObj); | ||
|
|
||
| if (userObj.keys) { |
There was a problem hiding this comment.
Can't you do just like:
if (checkExists(data, 'User', 'keys', 'array', userObj))
userObj.keys.forEach(keyObj => {
// eslint-disable-next-line no-param-reassign
data.keys[keyObj.access] = incr(data.keys[keyObj.access]);
});
}a992126 to
9b9ff8e
Compare
|
@ironman-machine give me your status about that :) |
|
Hello @alexandre-merle, Starting end to end procedure using the following payload: Please follow http://ci.ironmann.io/gh/scality/Integration/1780 for circle status. |
| if (nerr > 0) { | ||
| return true; | ||
| } | ||
|
|
There was a problem hiding this comment.
If I'm reading this correctly, we log errors for duplicate items and then don't log any other formatting errors if there are duplicates? Why? Also, a few more comments would be helpful here.
|
Don't we want this in Arsenal instead? |
| checkData.errors.push({ | ||
| txt: 'no "accounts" array defined in Auth config', | ||
| }); | ||
| return dumpErrors(checkData); |
There was a problem hiding this comment.
i don't understand, why check here?
There was a problem hiding this comment.
Sorry, I'm not sure I get the question, but my go-to answer is: There are no accounts to browse anyways, might as well return early.
060d22f to
312fd9a
Compare
|
@ironman-machine and again :) |
|
Hello @alexandre-merle, Starting end to end procedure using the following payload: Please follow http://ci.ironmann.io/gh/scality/Integration/1878 for circle status. |
|
End-to-End tests passed on https://github.com/scality/Integration/pull/74 both before this PR (http://ci.ironmann.io/gh/scality/Integration/1881) and after (http://ci.ironmann.io/gh/scality/Integration/1882) Please review this so that we can FINALLY merge it... |
|
Agreed with @DavidPineauScality , this pull request is open since 1 month now :) |
|
There are open comments... |
- Add unit tests for in-memory checker
- Add unit test for lib/auth/in_memory/index.js
- Use new auth config file in Config.js - Define a new env variable to change the path of the authentication config file - Update backend.js to use the new authentication data API - Update tests to remove references to the old, inconsistent auth config file format.
|
@LaurenSpiegel @rahulreddy updated :) |
|
Btw, https://github.com/scality/Integration/pull/74 need to be merged (and pushed to wip/ultron) first :) |
|
👍 Thanks @DavidPineauScality and @alexandre-merle ! |
|
@ironman-machine just to be sure |
|
Hello @LaurenSpiegel, Starting end to end procedure using the following payload: Please follow http://ci.ironmann.io/gh/scality/Integration/1937 for circle status. |
|
End to end passed. Merging. |
"This PR provides a new config file format for the memory backend's authentication data, as well as a number of small utilities.
Edit: Please note that the checker writes the errors into the standard error output stream, in order for the user to see them. I am unsure whether this is the best solution or not, but I wanted to do that to ensure early failure if the configuration wasn't right. The thrown error in this case might deserve improvement also. I'm open to suggestions on that side :)"
Reopening of #8