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

Proposal of shared credentials across gridscale tools. #183

Open
nvthongswansea opened this issue Sep 16, 2021 · 7 comments
Open

Proposal of shared credentials across gridscale tools. #183

nvthongswansea opened this issue Sep 16, 2021 · 7 comments
Assignees
Milestone

Comments

@nvthongswansea
Copy link
Contributor

Regarding to #124. I, @bkircher, and the customers really want to have shared-credential feature in all gridscale tools (which are built on top of gridscale public API). The concept is to define a single config file in a common directory, e.g., `$HOME/.config/gridscale/", which will be used by any gridscale tools. This shared config file can also be created by any gs tools (incl. libraries). I would like to propose a schema of this config file as below:

  1. It locates at User-level Configuration directory:
  • Linux: $XDG_CONFIG_HOME/gridscale/config.yml or $HOME/.config/gridscale/config.yml
  • MacOS: $HOME/Library/Application Support/gridscale/config.yml
  • Windows: %APPDATA%\gridscale\config.yml or C:\Users\%USER%\AppData\Roaming\gridscale\config.yml
  1. It is a yaml file with following scheme:
accounts:
- name: default
  userId: xx-xxx-xxx-xxx-xxx
  token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  url: https://api.gridscale.io
- name: second-project
  userId: xx-xxx-xxx-xxx-xxx
  token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  url: https://api.gridscale.io

Please feel free to comment.

@bkircher
Copy link
Contributor

bkircher commented Sep 16, 2021

Hey thanks for opening this!

All looks good here. I would name the file projects.yaml rather than config.yml and also the top-level list, I would name projects: rather than accounts:. This would be more consistent with what is in the panel and in the UI. "Account" really is a new word.

@nvthongswansea
Copy link
Contributor Author

@bkircher that sounds great.

@bkircher
Copy link
Contributor

OK cool. You think we should wait a couple more days to give other's a chance to answer?

...before we start implementing that?

I could do the changes in gscloud and the Python library.

@nvthongswansea
Copy link
Contributor Author

@bkircher sure, I've already opened issues in those repos. Just wait!

@itakouna
Copy link
Contributor

I'm with changing the accounts to projects, but I would rather keep gridscale/config.yml

@bkircher
Copy link
Contributor

bkircher commented Apr 5, 2022

OK, to sum up, path will be gridscale/config.yaml in the usual platform specific locations and contents will be like

projects:
- name: default
  userId: xyz
  token: xyz
  url: https://api.gridscale.io
- name: somthing-else
  userId: xyz
  token: xyz
  url: https://api.gridscale.io

@JanLukasGithub
Copy link

JanLukasGithub commented Jun 8, 2022

If you rename accounts to projects though, you break a lot of stuff in gscloud, because you don't want to use projects in the config and accounts everywhere else, so changing the --account flag, the GRIDSCALE_ACCOUNT environment variable and so on is necessary. That results in this change, and also means everyone using gscloud has to change a lot of things

@bkircher bkircher removed their assignment Jun 30, 2022
@fkr fkr removed their assignment Sep 8, 2022
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

6 participants