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

Shell app should read cluster configs for default login #358

Closed
ericfranz opened this issue Dec 20, 2019 · 5 comments
Closed

Shell app should read cluster configs for default login #358

ericfranz opened this issue Dec 20, 2019 · 5 comments

Comments

@ericfranz
Copy link
Contributor

Right now the shell app's default login is localhost, and must be changed by explicitly setting an env var. Another approach is if the nginx_stage script read the cluster configs and set some initial env vars appropriately. The Files app should also be able to read cluster config to provide a dropdown list of hosts to open ssh to.

@ericfranz
Copy link
Contributor Author

For this, its to have the Dashboard app provide an endpoint that just returns the JSON for the list of available login hosts.

The reason is that there is already logic in place to handle loading the cluster configs, and filtering out those clusters that do not contain ssh login hosts and are not hidden (like quick) or not valid (like Ruby for those not in the ruby group).

@ericfranz
Copy link
Contributor Author

For the shell app, the default would be the first of this list UNLESS the default is specified in the environment variable that is currently used to configured the shell app.

@ericfranz
Copy link
Contributor Author

See

login_clusters = OodCore::Clusters.new(
OodAppkit.clusters
.select(&:allow?)
.reject { |c| c.metadata.hidden }
.select(&:login_allow?)
for a quick way to get a list of OodCore::Cluster objects that users can ssh to.

@ericfranz ericfranz modified the milestones: Backlog, On Deck Jan 30, 2020
@ericfranz ericfranz modified the milestones: On Deck, OOD1.8 Feb 26, 2020
@ericfranz
Copy link
Contributor Author

So... there is a problem with my proposal of using the dashboard endpoint: currently there is no way for an app to do a backend request to another app because of authentication.

We could do experimentation with making a request directly to the PUN domain socket if we modified the permissions of the directory containing the socket. A simple way to test that would be to use curl to send requests to the socket on webtest02 or webdev02.

Otherwise, the only way is to make the request client side - which is fine if you want to do this for the files app, but does not work for the shell app's use case, which is to provide a sensible default for login host for the Shell app.

@ericfranz
Copy link
Contributor Author

Closing as duplicate to #508

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants