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

Allow configuration to be set for session type #70

Merged
merged 9 commits into from
Jun 2, 2020

Conversation

vinceatbluelabs
Copy link
Contributor

@vinceatbluelabs vinceatbluelabs commented May 29, 2020

This will allow folks using custom cred types (like LastPass!) to configure this globally via config files. Combined with #69 this will allow enterprise uses to be configured while more generic settings are used by default.

This will allow folks using custom cred types (like LastPass!) to
configure this globally via config files.
@@ -96,7 +96,7 @@ URL or configure a TOML-style file in one of the following locations:

Example file:

```toml
```ini
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Turns out config_resolver uses https://docs.python.org/3/library/configparser.html which uses a simplified INI format which is not actually TOML. TIL!

@@ -109,3 +109,72 @@ downloaded for local processing) will be stored per Python's
which allow for configuration via the `TMPDIR`, `TEMP` or `TMP` env
variables, and generally default to
[something reasonable per your OS](https://docs.python.org/3/library/tempfile.html#tempfile.gettempdir).

## Cloud credentials (e.g., S3/GCS/Google Sheets)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since database credentials come out of db-facts, the major difference made in switching the default creds provider from CredsViaLastPass and CredsViaEnv is how non-default GCP credentials are passed--this text should address that and help provide guidance.

@vinceatbluelabs vinceatbluelabs marked this pull request as ready for review May 30, 2020 19:52
@vinceatbluelabs vinceatbluelabs requested a review from cwegrzyn May 30, 2020 19:52
Copy link
Contributor

@cwegrzyn cwegrzyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense-- but wondering whether "session type" is the right terminology here for controlling where creds come from.

cfg = config_result.config
if 'session' in cfg:
session_cfg = cfg['session']
session_type: Optional[str] = session_cfg.get('session_type')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could creds_type be a more appropriate name here? Does this control anything about the session other than how it gets the creds?

@vinceatbluelabs vinceatbluelabs merged commit 756a8e1 into master Jun 2, 2020
@vinceatbluelabs vinceatbluelabs deleted the config_for_session_type branch June 2, 2020 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants