-
Notifications
You must be signed in to change notification settings - Fork 2.1k
External storage 'Login credentials' auth mechanism #18531
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
0458e78 to
30738bd
Compare
|
Please rebase |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs a beter name
|
@PVince81 @Xenopathic schedule for 9.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add comment, what is this ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does it link to the mount id ?
|
Please rebase 😄 |
|
I'd rather we wait for the config to live in the DB fully before merging this, for cleaner, better code. |
|
@Xenopathic the config is already in the DB. Please rebase 😄 @icewind1991 please notice this PR about auth mechanism, to make sure we're not duplicating work 😄 |
30738bd to
4a7f57f
Compare
|
rebased and added more tests for |
|
Fixed checking the external storage status ( |
|
After applying #21467 everything seems to work fine for an admin defined mount using login credentials. Storage is accessible both trough the WI/DAV and occ |
|
I still don't like the approach of the I had an idea (completely conceptual at this stage) to create a wrapping storage per-user that contains the credentials, along with a 'pointer' to the global storage. Then during mounting, that wrapped storage overrides the global storage and can apply the credentials as necessary. That would also form a nice basis for the 'custom credentials' authentication mechanism (as required by the WND merger) which would work in a similar way, but with those custom credentials directly modifiable in the configuration UI. |
|
I think the current idea is better and less complex. The CredentialsManager can also be used to handle the custom credentials |
a3c5843 to
a3e6dd8
Compare
|
Okay, it works from scratch. @icewind1991 please increase the app version |
8982e92 to
15451b2
Compare
Done |
|
👍 Maybe @Xenopathic and @icewind1991 could review each other's code ? Unless @jmaciasportela wants to chime in for the final review ? |
|
👍 for @Xenopathic's part |
Will look into it (jenkins-oci actually reporting real failures, amazing) |
|
Yup, as predicted in the original PR post, Oracle broke. @nickvergessen had a PR a while back that simply removes the WHERE clause on Oracle, making things slower sure, but at least not breaking. |
|
clob fields can not be compared on OCI |
…y you're comparing strings
|
Fixed by adding adding support for comparing against clobs on oci if you explicitly define you're trying to compare strings cc @DeepDiver1975 for the query builder stuff (last commit) |
|
all green, can this be merged? |
|
👍 from me for the last changes @nickvergessen @DeepDiver1975 is the query builder change acceptable ? 58afddf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think if we do this, we should do it for all comparisons, or at least neq()
Should also then add unit tests for this directly.
Can also do this in another PR, up to @DeepDiver1975
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In order to keep the methods from doctrine untouched, we could also add a new method, that would make the comparison explicit, while not touching the interface of doctrine methods
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer to keep it as arguments to the existing methods
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add neq then too and the unit test for both methods, if possible ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well we can do that once we decide on the API and how we want to handle it. Until then lets waste as few effort as possible
@icewind1991 can you make the change + add unit tests ? (or make it a separate PR so we can review it separately) |
I prefer to merge this as is and we can discuss whether to make it a new method or keep it as argument in a seperate issue/pr. |
|
@jmaciasportela @DeepDiver1975 can you help with the second review ? |
|
Except this comment only to take into account: https://github.com/owncloud/core/pull/18531/files#r49991237 |
External storage 'Login credentials' auth mechanism
This auth mechanism saves user credentials in the database, encrypted. This is done with the new CredentialsManager class.
setValues()method onIDBConnectionmight break with Oracle. Hopefully the unit tests will pass, but if not, the fix lies into_char(...)in the WHERE clause when using clobs.Please test and review @PVince81 @MorrisJobke @DeepDiver1975 @icewind1991 @LukasReschke
@MTRichards ref #16305