-
Notifications
You must be signed in to change notification settings - Fork 252
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
Support Jinja2 templating of secret parameters #1058
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
jathanism
approved these changes
Nov 9, 2021
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.
Another quality hit from Glenn. I have some minor comments/suggestions but nothing show stopping.
jathanism
reviewed
Nov 9, 2021
jathanism
approved these changes
Nov 9, 2021
glennmatthews
added a commit
that referenced
this pull request
Nov 15, 2021
… Groups (#868) * Initial model, UI, and REST API for Secrets * Secrets providers API, initial TextFile and EnvironmentVariable provider implementations (#887) * Add Secret.value property, add EnvironmentVariable provider, add dummy-plugin Constant provider, add tests * Add TextFileSecretProvider * Add docs * Improve display of secret providers in the UI * Refactor SecretsProvider registration to use the Nautobot registry instead of python entry_points * Refactor slightly * Add ability for secrets providers to define an HTML form for parameter inputs * Fix default value for JSONField and add error handling in JS * Add username_secret and token_secret support to GitRepository * Docs updates * Review feedback - add description field, etc. * Revise secrets docs; add SecretError exceptions instead of returning None on various failures * One of these days I'll remember to run flake8 before pushing * Review comments * SecretsGroup feature (#1042) * WIP * More WIP * WIP remove SecretType model * Such WIP. Wow * WIP: working secretsgroup-edit UI * More WIP * Change Category/Meaning to Access Type/Secret Type * Add SecretsGroup key to Device model; get tests passing * Add test coverage for REST API and filters * Add SecretsGroup view tests * Linting fixes * Docs updates * Cleanup leftover SecretType cruft * Update nautobot/docs/user-guides/git-data-source.md Co-authored-by: Jathan McCollum <jathan@gmail.com> * Fix egregious issues Co-authored-by: Jathan McCollum <jathan@gmail.com> * Support Jinja2 templating of secret parameters (#1058) * Support Jinja2 templating of secret parameters * Add secrets providers to plugin detail view * Doc updates * Include SecretsGroupAssociation in GraphQL * Move 'Secrets' to a top-level menu * Don't try to sort `SecretsProvider` class objects in plugin config features registry (#1065) * Fix TypeError when trying to sort `SecretsProvider` class objects * Don't sort `secrets_providers` when added to features. * Add release-note content for Secrets * Update nautobot/extras/views.py Co-authored-by: John Anderson <lampwins@gmail.com> * Change FK to SecretsGroup behavior to SET_NULL * Use render_jinja2() in rendered_parameters() Co-authored-by: Jathan McCollum <jathan@gmail.com> Co-authored-by: John Anderson <lampwins@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Toward: #541
This should be the last incremental PR atop #868.
"/opt/nautobot/device_passwords/{{ obj.site.slug }}/{{ obj.name }}.txt"
or a whole family of Git repository secrets stored in environment variables as"GIT_TOKEN_{{ obj.slug | replace('-', '_') | upper }}"
.