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

[WIP] Secrets in Nautobot Config #39

Draft
wants to merge 11 commits into
base: develop
Choose a base branch
from

Conversation

nniehoff
Copy link
Contributor

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.

return default_value
else:
msg = f"The secret value could not be retrieved using key {err}"
raise SecretValueNotFoundError(cls, msg) from err
Copy link
Contributor

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?

Copy link
Contributor

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.

Copy link
Contributor Author

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

@glennmatthews glennmatthews marked this pull request as draft July 28, 2022 14:38
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.

2 participants