cli icon indicating copy to clipboard operation
cli copied to clipboard

Overhaul the login mechanism

Open SteinRobert opened this issue 4 years ago • 5 comments

unikube ps actually displays local information, however one needs to login to execute the command. Does that make sense? I feel like a login would not be necessary.

SteinRobert avatar Nov 13 '21 12:11 SteinRobert

So from what I saw this is needed to resolve the title of the installed project. I would suggest to store some meta information like the title and description of the project on the local machine for cases like this. The current implementation also requests all projects even when there is no cluster running, isn't it? We could probably leave out the GraphQL query for the projects when there is no cluster running.

Code reference: https://github.com/unikubehq/cli/blob/main/src/cli/unikube.py#L13

SteinRobert avatar Nov 18 '21 20:11 SteinRobert

unikube project down/delete also require a login which is similarly questionable. I agree that the title/description of context project, deck, app should be available at all times, not the least for unikube context show.

  • [ ] unikube ps
  • [ ] unikube project down
  • [ ] unikube project delete
  • [ ] ... Feel free to add more commands for which a login should not be necessary.

schwobaseggl avatar Nov 26 '21 15:11 schwobaseggl

@SteinRobert @schwobaseggl

Feel free to add more commands for which a login should not be necessary.

Not sure if this question makes sense, but why do we need a login at all for any command? The CLI can potentially be altered by anyone anyway. GraphQL queries which require authentication fail if you are not logged in, thus the user would be asked to login when encountering the first command which requires authentication. Wouldn't that be sufficient?

buschNT avatar Dec 03 '21 14:12 buschNT

@buschNT I like that idea: especially once the CLI and Unikube becomes more "open" (unauthenticated users get access to open projects) this is going to be important. I'd say: remove the auth status from all commands and invite the user to the login once a http status 403 (or similar) is raised.

Schille avatar Dec 17 '21 08:12 Schille

As far as i see, the login/auth mechanism isn't directly enforced for many commands. However, we heavily rely on GraphQL requests, which require to be logged in. Thus we would need to remove these requests or save/cache results locally in order to remove the login requirement.

buschNT avatar Dec 23 '21 08:12 buschNT