-
Notifications
You must be signed in to change notification settings - Fork 446
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
Team admins can't set MFA or SSO when managing team users in the UI #24660
Comments
@iansltx I think we can keep the tooltip the same for team admins; there's precedent for saying "_____ can be updated in org settings" even when the user doesn't have permission (the thinking being that they can point an admin toward the setting that needs to be changed) |
Cool. For posterity, here's what I'm removing from the ticket description in To Fix: Also on frontend, team admins need different disabled-input messages for the global email flag since team admins can't actually fix the problem. SSO is covered with sufficiently versatile copy. Second paragraph of the MFA tooltip for global admins is currently:
Team admins can probably be:
Tagged with product to confirm desired copy, after which this can be actioned. |
@iansltx, are you sure SSO selection is being gated by this? |
@jacobshandling SSO settings are gated to global admins, and SSO can be toggled in the API by team admins. |
...and yeah, SSO doesn't show up in the UI for team admins editing users right now, per recent testing. |
@jacobshandling @iansltx @sharon-fdm Triaging this as an unreleased bug. |
Thanks @lukeheath. |
@rachaelshaw @noahtalerman due to some complexity that wasn't immediately obvious going into this, I met with @lucasmrod to brainstorm a few possible approaches and associated risks/tradeoffs. We slightly prefer option 2 or even 1 for its simplicity, but all of these are doable, though 5 is probably unnecessarily messy. What do you think? Option 1Remove dependence of the UI on these fields and always have these options enabled. If SSO and/or SMTP needs to be configured, the user is told this via an informative error flash message. Option 2Selectively include fields as described in this ticket. Because of implementation details, this would also mean excluding the other SSO and SMTP-related unset/empty fields from the API response for global admins as well. That is, where a global admin currently sees:
and
they would now see:
and
pros: Options 3 and 4Add new fields for indicating smtp enabled, smtp configured, and sso enabled, in either (option 3) the current config response or (option 4) a new dedicated team admin config endpoint. Option 5Include empty fields in config response for team-level admins for all fields, even if they are actually set, except desired enabled/configured fields. So instead of giving a team-level admin this (original spec here):
and
, they would get something close to:
and
|
^ cc @sharon-fdm |
@jacobshandling when chatting about this issue we ran into these two other bugs:
Tracked in #25009 |
@lucasmrod, @jacobshandling and I chatted about the options above. I think that the best choice is to allow team admins to read SSO and SMTP settings like we allow global teams today: That way, the Edit user modal for team admins and global admins can show the SSO and MFA options as disabled. This is the best UX. Jacob and I don't know of a strong reason for not allowing team admins to view these settings. We tried to look back in GitHub history and found this. Even at the time it sounds like we didn't know of a good reason. What we've learned is that users are accepting of permissions changes when they're clearly documented. Please let us know if you think that's the wrong call. |
IIRC the reason was so that team admins did not have access to global settings like SMTP passwords or SSO credentials (you probably want only global admins to be able to access such a thing). PS: This is following the Principle of least privilege. Do team admins need access to global SMTP passwords or SSO credentials? |
We are going to wait until Noah gets back from vacation to confirm he is okay with above security/access concerns raised by @lucasmrod before implementing, which pushes this ticket to the next release cc @sharon-fdm |
Fleet version: 4.61.0 for MFA, much earlier for SSO
💥 Actual behavior
MFA and SSO checkboxes are limited to global admins in the UI even though team admins have permissions in the API to revise both of them for existing users, or create users with either of them.
🧑💻 Steps to reproduce
🕯️ More info
The likely reason the SSO settings isn't visible is we currently hide all SMTP and SSO settings from team admins (#11266, #12180). MFA ran into the same issue (#24623). So we'll need to make "is this enabled" global conflg flags visible for both SSO and SMTP for team admins in order to get this to work, without spilling additional config information. @jacobshandling has started work on this in #24632.
🛠️ To fix
On backend
On frontend, drop the "global admin only" guards for both
[ ] SSO (tbc, don't think this is there in the first place)not gated by UI, with new fields from API response works as desiredThe text was updated successfully, but these errors were encountered: