8000 Viper config implementation by lukehinds · Pull Request #276 · guacsec/guac · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Viper config implementation #276

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

Merged
merged 8 commits into from
Dec 9, 2022
Merged

Conversation

lukehinds
Copy link
Contributor

Implement viper for configuration mgmt

This change allows three types of input (in order of load priority), in accordance with the 12 factor app design.

* CLI flags
* Environment Variables
* Configuration file

Environment variables are declared using the GUAC prefix, e.g..

export GUAC_GDBUSER=neo4j

It requires the former creds value be split over two flags:

--gdbuser neo4j --gdbpass password

Closes: #273

Signed-off-by: Luke Hinds lhinds@redhat.com

A bit of uneeded DRY. Both commands share the same set of flags
so consolidate into the root init. If individual flags are ever
needed, we can set them in the init of each cmd.

Signed-off-by: Luke Hinds <lhinds@redhat.com>
@lukehinds
Copy link
Contributor Author

Note; this is based upon #272, so that will need landing first.

Goddam DCO bot, I am positive I signed everything.

@mihaimaruseac
Copy link
Collaborator

6eb8a9b seems to be missing signature

Copy link
Contributor
@lumjjb lumjjb left a comment

Choose a reason for hiding this comment

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

LGTM (besides @mihaimaruseac 's comments)

This change allows three types of input (in
order of load priority), in accordance with the
12 factor app design.

* CLI flags
* Environment Variables
* Configuration file

Environment variables are declared using the `GUAC`
prefix, e.g..

`export GUAC_GDBUSER=neo4j`

It requires the former creds value be split over two flags

`--gdbuser neo4j --gdbpass password`

Signed-off-by: Luke Hinds <lhinds@redhat.com>
Copy link
Collaborator
@mihaimaruseac mihaimaruseac left a comment

Choose a reason for hiding this comment

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

Thank you!

@lukehinds
Copy link
Contributor Author

give me a minute, i just started a git dumpster fire.

lumjjb and others added 2 commits December 9, 2022 18:26
Signed-off-by: Brandon Lum <lumjjb@gmail.com>

Signed-off-by: Brandon Lum <lumjjb@gmail.com>
A bit of uneeded DRY. Both commands share the same set of flags
so consolidate into the root init. If individual flags are ever
needed, we can set them in the init of each cmd.

Signed-off-by: Luke Hinds <lhinds@redhat.com>

Signed-off-by: Luke Hinds <lhinds@redhat.com>
Signed-off-by: Luke Hinds <lhinds@redhat.com>
@lukehinds
Copy link
Contributor Author

should be good now

Luke Hinds added 3 commits December 9, 2022 18:53
Signed-off-by: Luke Hinds <lhinds@redhat.com>
Signed-off-by: Luke Hinds <lhinds@redhat.com>
Signed-off-by: Luke Hinds <lhinds@redhat.com>
Copy link
Contributor
@lumjjb lumjjb left a comment

Choose a reason for hiding this comment

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

LGTM!

@kodiakhq kodiakhq bot merged commit 64be823 into guacsec:main Dec 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement viper config
3 participants
0