Skip to content
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

Add account commands page #251

Open
1 of 3 tasks
Kalissaac opened this issue Oct 9, 2021 · 9 comments
Open
1 of 3 tasks

Add account commands page #251

Kalissaac opened this issue Oct 9, 2021 · 9 comments
Assignees
Labels
enhancement New feature or request Review Needed This is a legacy issue that needs review before progress should be made on it
Milestone

Comments

@Kalissaac
Copy link
Member

Kalissaac commented Oct 9, 2021

Add a page similar to https://www.ocf.berkeley.edu/account/commands/ which allows users to easily run commands from the web instead of having to ssh into tsunami.

  • Create UI mockup
  • Build frontend
  • Build backend

Existing commands:

  • paper quota -- how many pages you have remaining this semester
  • disk quota -- how much disk space you have used and how much you have left
  • makehttp -- set up the web space for your OCF account
  • makemysql -- reset your MySQL database password, or create a new MySQL database (copy down the password somewhere secure)
@Kalissaac Kalissaac added the enhancement New feature or request label Oct 9, 2021
@Kalissaac Kalissaac added this to the Release milestone Oct 9, 2021
@origamiman72
Copy link
Contributor

Made a mockup with @Kalissaac on Figma
Commands

@Kalissaac
Copy link
Member Author

We have to decide whether we want to run the ssh command server-side or client-side.

If we do server-side, we need to add an API route to ocfweb to allow users to execute commands over the web. Most of it can be copied from the existing page.

If we do client-side, the issue is that some networks block ssh (some people have said CalVisitor does?) and therefore users on those networks won't be able to run the commands.

I'm leaning towards server-side, but if anyone has any thoughts I'm interested!

@origamiman72
Copy link
Contributor

Also leaning towards server side since that's what the old site used, so we can try to keep the functionality as 1:1 as possible (and use paramikojs to replicate functionality as well)

@kpengboy
Copy link
Member

I'd like to take a step back here and rethink the design of this feature. I think that conceptually orienting this around terminal commands is not the best design. Rather, IMO paper and disk quotas ought to be widgets on the dashboard which load the info from an API (without requiring the user to issue a "command" or re-enter their login info). Makehttp and makemysql should similarly be buttons (rather than radio buttons) called "Make public_html directory" and "Set up SQL database/Change SQL password" (or something similar), and similarly should not have their own login info prompt.

For historical context, the separate login prompt for this page predates the ocfweb login system, and we just never got around to/spent the time to integrate it.

@origamiman72
Copy link
Contributor

In that case how about we implement these features into the dashboard as mentioned above and redo the commands page as a way to access shellinthebox (or replacement) to make a web-accessible ssh portal?

@ethanhs
Copy link
Member

ethanhs commented Oct 11, 2021

I think we should probably think about how to handle auth for the new website before we figure out how to integrate commands into the dashboard, as we will need API calls that are dangerous (deleting things) or expose sensitive info (makemysql will output the sql password).

@Kalissaac
Copy link
Member Author

Correct me if I'm wrong but I thought we already had auth in place for the new website? The current implementation uses keycloak, are we planning on moving to a different provider or system?

@ethanhs
Copy link
Member

ethanhs commented Oct 11, 2021

Oh perhaps so! But I'm not sure ocfweb currently supports keycloak for API calls, perhaps that too has been figured out?

@Kalissaac
Copy link
Member Author

That's a good point, not sure. I'll look into it.

@ben9583 ben9583 added the Review Needed This is a legacy issue that needs review before progress should be made on it label Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Review Needed This is a legacy issue that needs review before progress should be made on it
Projects
None yet
Development

No branches or pull requests

5 participants