Comment 4 for bug 1614010

Revision history for this message
Anastasia (anastasia-macmood) wrote :

Further discussions sparked interesting possibilities when/if we'd allow users to register the same controller on the same client more than once under a different controller name. For example, a context switch between a controller based on a name might also escalate or reduce user privileges.

To allow for that to happen, we'd need to:

1. Modify 'register' to allow a user to update controller details if one is already known to this client.
To achieve this, the code block that prompts for controller name needs to be adjusted;

2. Modify 'register' to add the same controller (i.e. the same uuid) under a different name (effectively a controller alias).
To achieve this, controller uuid check needs to be removed;

3. Modify 'register' to effectively switch connection to the user that register is running for (example, after 'juju register' for user Bob, currently logged in user will be Bob).
This is already happening. Just need to decide what to do with currently logged in user if it is different. For example, if we bootstrap and add user Bob, we are still logged in as user 'admin' but after we run register for user Bob, we'd be logged in as Bob. What should happen to our 'admin' connection? "logged out"? "switched"?;

4. Decide how to 'switch users' - either combination of logout/login or a new command like 'juju switch-user';

5. Optionally...
Although we have 'juju unregister', it might also be worthwhile to clean up the client on 'juju destroy-controller', i.e. find all controllers on this client with the same uuid that we want to destroy.