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

Manage profiles #3

Closed
drstrangelooker opened this issue Jun 5, 2018 · 2 comments
Closed

Manage profiles #3

drstrangelooker opened this issue Jun 5, 2018 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@drstrangelooker
Copy link
Collaborator

Allow a user to specify --profile=dev instead of --host=dev.looker.example.com and store the auth key instead of re-logging in each time.

Info would be stored in a file like this...

[
  {
    "profile":"dev",
    "host": "dev.looker.example.com",
    "port": "19999",
    "client_id": "XYZ",
    "client_secret": "123",
    "api_version": "3.1",
    "ssl": true,
    "verify_ssl": true,
    "token": "kahdskfhasdlkfnakls dnfkasd",
    "su_tokens": [
      {
        "user_id": 123,
        "token": "adnfkjashdfkjhaskjdbnfkasd"
      },
      {
        "user_id": 456,
        "token": "adnfkjashdfkjhaskjdbnfkasd"
      }
    ]
  },
  {
    "profile":"qa",
    "host": "qa.looker.example.com",
    "client_id": "XYZ",
    "client_secret": "123",
    "token": "kahdskfhasdlkfnakls dnfkasd"
  },
  {
    "profile":"prod",
    "host": "prod.looker.example.com",
    "client_id": "XYZ",
    "client_secret": "123",
    "token": "kahdskfhasdlkfnakls dnfkasd"
  }
]

The file would be searched for in a location optionally specified by the user, then the local dir, then each parent dir, then in the user's root dir.

The file must be permissioned as rw-------

The user would use gzr login --profile=dev to log in and save the token. A command like gzr logout --profile=dev would log out the token.

gzr login --profile=dev --su=123 would set the su token. gzr logout --profile=dev --su=123 would logout and delete the token.

-p dev:123 would be short for --profile=dev --su=123

Before any command, gzr would verify that the authorization was still good. If not it would reauthorized and save the new token.

It is possible for multiple gzr processes to use the same file, so we want to have some sort of locking.

@drstrangelooker
Copy link
Collaborator Author

@josephaxisa

@drstrangelooker drstrangelooker added enhancement New feature or request good first issue Good for newcomers labels Nov 20, 2019
@michaelcramer
Copy link
Contributor

Noted enhancement suggestion for potential addition to roadmap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants