-
Notifications
You must be signed in to change notification settings - Fork 279
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
How will user names and service account name collisions be handled? #3200
Comments
[Triage] Hi @peternied, thank you for filing this issue. This issue appears to have actionable tasks associated with its closure. Namely, investigating the status and required actions. Going to mark as triaged with completion on checklist completion. |
There are three main scenarios which we can consider to decide how to handle this. 1. We have a service account with name SA_1 and we then have someone with access to the internal users api attempt to add a new user with the same name (SA_1).We can see what happens in the scenario by looking at the Specifically, we see:
Once this has happened, we will see that attempts to generate a new service account auth token will fail:
Further since resetting the user is all but guaranteed to change the password associated with the internal user account, any existing service account tokens based on the previously generated random password (how service account tokens are formed), will no longer work. The extension could attempt to use the token, but when it tries to use BasicAuth to execute the action the password will no longer match the expected hash and it will fail. The only way the existing password would still work would be if the update to the user account kept the same hash intentionally. In this case, the token would still allow the extension to execute requests, but this seems addressable by documentation. 2. The second scenario to consider is if we already have an internal user account and were to create a service account for an extension that somehow matched the user account.In this scenario, we have the inverse of the first option. Again, because we handle the creation of service accounts with the same methods that create or update an internal user account, we would just end up overwriting the internal user account. This has the same considerations as above. 3. The final scenario to consider is if we have a manually defined internal user from the configuration files and they conflict with an extension's name.In this scenario, the manually defined internal users would again be overridden. We can see this behavior based on the order of initialization with the Security plugin and extensions. In short, because the Security plugin will launch first, it will create the internal users from its configs. Then whenever an extension will come up, we will encounter scenario 2. In my opinion, we should both very rarely encounter these scenarios--you would have to intentionally name an internal user something that would match an extensions unique id which should all start with "_"--and the potential outcomes of this conflict are restricted to broken behavior for either an extension attempting to use its service account or an internal user. In either case the extension or user would simply lose access as a result of the change in password. You could correct this by resetting the service account variables to true and then generating a new Service Account token. You could correct the case for an internal user by resetting the password to what you would like and turning the service account variables to false. |
I would like to close this issue based on the low stakes of a potential conflict. Waiting for agreement from others. |
@scrawfor99 Thanks for spending the time to write this out. These seem pretty innocuous to me. I'm going to close out this issue. If there is concern, we can always reopen and address at that time. |
Service accounts and user accounts use the same underlying storage system, so it possible for a user to intentionally create an account that is the name of a service account.
Exit Criteria
The text was updated successfully, but these errors were encountered: