Hey - a few questions: 1. How can I control which ...
# ask-a-descoper
a
Hey - a few questions: 1. How can I control which tenant can configure SSO? 2. Why can't Admin edit existing users on the user management widget (can only edit before they accept the invite) 3. How to avoid orphan tenants? (Sole admin user can delete himself from the tenant right now)
a
1. You can generate an SSO Configuration Link for a tenant's SSO Setup Suite, and you can send this link directly to a Tenant Admins email address 2. Admins can control existing users with the user management widget. There are no restrictions on editing users after invite acceptance. 3. do you mean sub tenants? could you elaborate?
d
Regarding 2, pay attention that if a user is belong to multiple tenants the tenant admin won’t be able to edit, it is for security reasons, you don’t want to be exposed to account takeovers, etc. If you still want to enable that option, you can do this via the widget settings:
Regarding 1, if you don’t use the generated link, and you let access via jwt, just don’t provide the
SSO Admin
permission to that user, and they won’t be able to setup SSO.
Regarding 3, at the moment there is not way to block the last tenant user deleting. You can open feature request for that.
a
thanks @Atharva Joshi @Doron Sharon . for #1 - yes, I'm using the access via jwt. The problem is if there's a role with sso admin in the system, then the admin of a tenant can assign it to himself. AFAIK roles are assigned to users, not permissions are assigned to users, right? #2 - My users have personal tenants by default, then they may be added to other tenants (e.g. organizations). So it mean admin won't be able to control anything? I want the admin of a tenant to be able to control the user interaction in his tenant only, e.g. changing the rule in this specific tenant
d
1. Admins won’t be able to assigned roles they are not have permitted to
2. I showed you how to enable that, see the screenshot.
a
Can you explain that @Doron Sharon? I thought Admin can assign any role
d
Will post it here again:
He can assign any roles that they entitled to, to avoid Privilege Escalation.
a
ok got it, so as long as the admin doesn't have a role he can't assign it to anybody else
d
right.
a
Thanks @Doron Sharon. For #2 - I tried it, but it allows admins to change e.g. the email of that user, meaning it affects the user beyond that tenant. Is this the account takeover you meant, or there's more than that? Anyway to allow only affecting that tenant and not others?
d
Yes, that’s what I meant, when turning on the switch the tenant admin will be able to edit the user in case belonging to several tenants. There is no way to control what fields exactly.
The user belongs to the project, so editing in a “tenant” affects the entire user.
If you don’t want to use the exact same user, you can create a user with a different login ID, so each tenant will have their own user.
Also, when logging-in with SSO, the user login id will be dedicated to that specific tenant, and won’t be cross tenants.
a
but then the user will have to login for each tenant separately, won't be able to just switch, right?
d
If you add that user manually/sdk to several tenants so yes they can switch.
By default we don’t assign SSO user to multiple tenants.
a
It this correct: 1. If it's the same user id added to different tenants, then they can switch, but the admin can't edit their role. 2. If it's a different user id added to different tenants, then they have to login separately
d
Right
a
That won't allow smooth UX....
If it's not SSO - how do the user chooses the tenant he's using when logging in
d
The login id? you decide via your flow. Can be email/phone/id
You decide that.
As a descoper.
If you are using magic link it will be email.
a
so if not using sso, do I have a way to add somebody (who has a personal email) to two tenants such that the admin of each tenant can control his role?
d
You can also merge users to a single user, user can have multiple login ids.
yes.
Also in SSO you can do that, in case your customer does not choose the “Enforce SSO” option.
(Which many wants)
In big companies it does not make sense to support both SSO and magic link/OTP for example for the same user.
Since the control must be via the IdP.
So you should take that into consideration as well.
a
When a user is logging in via social, e.g. google, it's always mapped to s single id, right? So if I create a personal tenant automatically, then that user is added (by email invite) to another tenant, he'll get a different id that won't allow him to use google login. And, I need to add a step in the flow post email magic login to let the user choose the right user-id?
d
You can do auto marge accounts, if you don’t want to display it for the user
You can decide if you want to display that to the user (if they want to do the merge or not)
a
So it mean they will be merged to the same user id?
d
Or just do that for them without letting them know
yes
a
But then the same problem - Admin won't be able to change role
d
If they are part of a single tenant - they will be able. If not, you can enable that option.
a
My users alway have a personal tenant, so they are alway part of more than one tenant if there's admin controlling them
And if I enable the option then the admin can also change their email address, which is account takeover
d
also changing the role is kind of take over..
a
Changing the role in that org isn't
d
or even changing the name
a
Right
But role is something you have to do as an admin
Addning/removing somebody + chanhing his role in the tenant you're admin of
d
Wait, I think changing role is enabled if having multiple tenant
did you try that?
and it was disabled for you?
a
Edit is disabled and it's done in it
image.png
There's no "change role" button
d
I see, will check if there is a workaround for that.
a
Ok thanks, lmk
d
Regarding 3, you can have your own custom button for the user deletion. And in the custom button login (via flow), you can load the user and not let deleting if the user his himself.
*custom button login logic
And I just checked and you can edit the user roles if belongs to multiple tenants:
a
But it doesn't show me the edit button
d
So pay attention you had the correct roles to do such changes.
Make sure the “Tenant Admin” user has the relevant roles to edit the tenant user.
a
Yes, it has.
when I enable the "cross tenant" users it allows it
but it's completely disabled if not allowed
d
If the user won’t have any role assigned the button will be enabled, we will check why it happens.
a
Rihgt. But if it has any role the admin can't change
d
Right, we will take a look at this.
t
Hi, let's have a call to discuss your use case. What is your availability tomorrow?
a
Hi @Tal Kapitolnik Can you do 12pm tomorrow?
Or 2:30 pm?
t
Let’s do 2:30, sending an invite
a
Hi @Tal Kapitolnik - any workaround here?
t
Hi, still working on it. Will update you tomorrow