-
Notifications
You must be signed in to change notification settings - Fork 105
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
Specify and store the provider ID of a collaborator #2088
Comments
@aedelmann as discussed, happy to take this if not taken already. I could definitely use a bit more specs/elaboration on stories in that case though. |
@aedelmann elaborating with a few questions:
Let me know if discussing here suits, or whether we should take this offline. |
Hi @mena-bosch I can share with you the concept in the Wiki Page what we are doing for the Device Provisioning process. That it might get clearer :) |
We already have this.
We already have this.
We don't have this.
We don't have this. |
Could be done via the Upgrade Task mechanism that we have. Check the interface |
From a technical perspective, the difference between a technical user and an ordinary user is when adding a collaborator to a namespace. If we are adding a normal collaborator to a namespace, we check if the collaborator already exist (has already registered). We flag it as an error if he doesn't yet exist. If we are adding a technical user, we don't check if he already exist. We create him if he doesn't yet exist, then add him to the namespace. |
Thanks @erlemantos for the clarifications and @aedelmann for the session (@erlemantos we were on a call with Kevin and Alex while you were writing these :) |
Wrapping this up in a "workflow" from the admin perspective.
Basically there are:
Remaining problem
@aedelmann @erlemantos will start working towards that direction - do not hesitate to get back to me if I am still missing the point somewhere here. Also do we have any plans for suite oauth integration? |
Taking back my last "remaining problem": the suite auth provider seems to be expressed as one of 3 enum types, so while I cannot see the actual authentication mechanism implemented anywhere, at least the checks should work already. |
This is legacy code and this enum should be removed because we should not statically define oauth providers in our system. The https://github.com/eclipse/vorto/blob/development/repository/repository-core/src/main/java/org/eclipse/vorto/repository/oauth/IOAuthProviderRegistry.java provides a way to dynamically look up configured oauth providers in the system.
We supporting Github, BoschID, BoschIoTSuiteAuth currently. Please refer to the registry (comment above) how to resolve them. Just to re-confirm your statement, that any provider which is supported in Vorto, allows to store technical users, that means currently, GitHub, BoschID and BoschIoTSuiteAuth, correct ? |
This is already fixed in a code I'm trying to pull request. Will ping you when this is done.
This is also being included in a code i'm trying to pull request now. Basically, we add a I will ping you when the pull request pulls through. |
Linking tickets for better visibility: in #2180, I have pushed a simple SQL script that does the following:
I cannot yet test this on the dev environment at this time, due to complications with AWS. Finally, as discussed I will now get back to the "add tenant to namespace" UI - i.e. this scope, while trying to keep it barebones (as the legacy Angular JS framework is too complicated for me to do much in terms of UX). |
Note: removing |
Back to working on this after a lot of sidetracking...
--> Ok for the first part, but shouldn't the second part be restricted to adding new users? My interpretation is:
This workflow would slightly differ from:
--> because we would never reach an error state again when a user does not exist. We would simply do the check first, and if the user does not exist, only create it as technical user after prompting the admin. My final and unresolved dilemma - assuming the ideas above make sense to you guys - is: can we and should we enforce creation of technical users only for a subset of the authentication providers available? I vaguely recall broaching this during a phone call with @aedelmann but sadly, got side-tracked too many times to remember what was the outcome, assuming there was one. TL;DR
|
* end-to-end workflow for technical user creation when adding a non-existing user to a namespace: 1. Admin edits collaborators in a given namespace 2. Admin selects "add user" 3. Given username does not exist 4. A new modal opens, prompting admin to create a new technical user with a given authorization provider ID among supported 5. Once created, modals close and the new technical user is created * no tests present yet Signed-off-by: Menahem Julien Raccah Lisei <[email protected]>
Small UI/UX improvements: * nicer design /spacing for the new "create technical user form" * add user autofocuses on the user name input box Signed-off-by: Menahem Julien Raccah Lisei <[email protected]>
Large UI/UX improvements: * User search when adding to namespace, with a drop down activating once user input field text length is >= 4 characters * Search retrieves users whose name contains search characters, shows and adds to drop-down * If no option selected or none available, username interpreted as is (can still be added as non-existing / technical user then) Signed-off-by: Menahem Julien Raccah Lisei <[email protected]>
* Made user search case-insensitive (not well optimized, sadly) * Added a few tests for search * Removed some extraneous import in TenantTechnicalUserDto Signed-off-by: Menahem Julien Raccah Lisei <[email protected]>
PR here. As mentioned in the PR comments @aedelmann please don't merge eagerly. If you have time, try it out (either you or Erle) - otherwise please give me a shout and I'll try and accommodate some time before my official return to work (Jan 7th) in order to discuss. |
* Cleaned up some code * Added some javadoc where missing * Added a couple of account service tests (note that user and tenant repositories are mocked by the parent class, so the only applicable tests are the ones that will fail due to validation issues) Signed-off-by: Menahem Julien Raccah Lisei <[email protected]>
* Minimal javadoc on new tests Signed-off-by: Menahem Julien Raccah Lisei <[email protected]>
* Improved combobox * Cleaned up some garbage Signed-off-by: Menahem Julien Raccah Lisei <[email protected]>
… namespace (#2192) * #2088: * end-to-end workflow for technical user creation when adding a non-existing user to a namespace: 1. Admin edits collaborators in a given namespace 2. Admin selects "add user" 3. Given username does not exist 4. A new modal opens, prompting admin to create a new technical user with a given authorization provider ID among supported 5. Once created, modals close and the new technical user is created * no tests present yet Signed-off-by: Menahem Julien Raccah Lisei <[email protected]> * #2088: Small UI/UX improvements: * nicer design /spacing for the new "create technical user form" * add user autofocuses on the user name input box Signed-off-by: Menahem Julien Raccah Lisei <[email protected]> * #2088: Large UI/UX improvements: * User search when adding to namespace, with a drop down activating once user input field text length is >= 4 characters * Search retrieves users whose name contains search characters, shows and adds to drop-down * If no option selected or none available, username interpreted as is (can still be added as non-existing / technical user then) Signed-off-by: Menahem Julien Raccah Lisei <[email protected]> * #2088: * Made user search case-insensitive (not well optimized, sadly) * Added a few tests for search * Removed some extraneous import in TenantTechnicalUserDto Signed-off-by: Menahem Julien Raccah Lisei <[email protected]> * #2088: * Cleaned up some code * Added some javadoc where missing * Added a couple of account service tests (note that user and tenant repositories are mocked by the parent class, so the only applicable tests are the ones that will fail due to validation issues) Signed-off-by: Menahem Julien Raccah Lisei <[email protected]> * #2088: * Minimal javadoc on new tests Signed-off-by: Menahem Julien Raccah Lisei <[email protected]> * #2088: * Improved combobox * Cleaned up some garbage Signed-off-by: Menahem Julien Raccah Lisei <[email protected]>
Tentatively closing this as scoped for authentication providers only. The subject part is handled by #2208 and presently being pullrequested (I expect it will go through once we deal with the compliance issues that have been popping up en masse these past few days). |
Edit I cannot close this myself - @aedelmann could you close please? Thanks |
… namespace (eclipse-vorto#2192) * eclipse-vorto#2088: * end-to-end workflow for technical user creation when adding a non-existing user to a namespace: 1. Admin edits collaborators in a given namespace 2. Admin selects "add user" 3. Given username does not exist 4. A new modal opens, prompting admin to create a new technical user with a given authorization provider ID among supported 5. Once created, modals close and the new technical user is created * no tests present yet Signed-off-by: Menahem Julien Raccah Lisei <[email protected]> * eclipse-vorto#2088: Small UI/UX improvements: * nicer design /spacing for the new "create technical user form" * add user autofocuses on the user name input box Signed-off-by: Menahem Julien Raccah Lisei <[email protected]> * eclipse-vorto#2088: Large UI/UX improvements: * User search when adding to namespace, with a drop down activating once user input field text length is >= 4 characters * Search retrieves users whose name contains search characters, shows and adds to drop-down * If no option selected or none available, username interpreted as is (can still be added as non-existing / technical user then) Signed-off-by: Menahem Julien Raccah Lisei <[email protected]> * eclipse-vorto#2088: * Made user search case-insensitive (not well optimized, sadly) * Added a few tests for search * Removed some extraneous import in TenantTechnicalUserDto Signed-off-by: Menahem Julien Raccah Lisei <[email protected]> * eclipse-vorto#2088: * Cleaned up some code * Added some javadoc where missing * Added a couple of account service tests (note that user and tenant repositories are mocked by the parent class, so the only applicable tests are the ones that will fail due to validation issues) Signed-off-by: Menahem Julien Raccah Lisei <[email protected]> * eclipse-vorto#2088: * Minimal javadoc on new tests Signed-off-by: Menahem Julien Raccah Lisei <[email protected]> * eclipse-vorto#2088: * Improved combobox * Cleaned up some garbage Signed-off-by: Menahem Julien Raccah Lisei <[email protected]>
Motivation
Currently we support multiple oauth providers that can be managed as collaborators. However, at the moment, we cannot differentiate between a GitHub or a BoschID user. If a 3rd party oauth provider is added, possibly holding the same userID as GitHub, we would run into a clash.
Solution
Confirmations:
The text was updated successfully, but these errors were encountered: