-
Notifications
You must be signed in to change notification settings - Fork 15
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
[WIP] Secrets in Nautobot Config #39
base: develop
Are you sure you want to change the base?
Conversation
return default_value | ||
else: | ||
msg = f"The secret value could not be retrieved using key {err}" | ||
raise SecretValueNotFoundError(cls, msg) from err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This entire module is beautiful. My only gripe is that it's duplicating patterns and/or code from the core provider source. I like where you're going with this, but is there any way we can marry these interfaces?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea you're getting at in other words, but I don't like that it seemingly adds a lot of apparent boiler plate code, potentially complicating the introduction and maintenance of other providers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll probably re-work this entire PR but I've started the conversation to get this into Core here nautobot/nautobot#2469
This is a really early rough draft. I wanted to see and make sure it was possible to use code from a plugin in nautobot_config.py before django was setup. I Had to abstract the idea of a connector from the provider. This allows us to have the code specific to connecting and querying a secret provider completely separate from the provider classes which are pretty heavily dependent on a
Secret
object. Please let me know high level thoughts on this before I go too much further. I am well aware that it's not pretty and there are a lot of cleanup stuff I'm really looking for more high level feedback.