-
Notifications
You must be signed in to change notification settings - Fork 27
manage edge bgp_password #803
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
Open
ccoueffe
wants to merge
5
commits into
netascode:develop
Choose a base branch
from
ccoueffe:update_defaults_bgp_password_enable
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
4d37d34
Update defaults.yml
ccoueffe 24b4795
Update ndfc_edge_connections.j2
ccoueffe 0233a02
Update defaults.yml
ccoueffe 6dec077
Merge branch 'netascode:develop' into update_defaults_bgp_password_en…
ccoueffe 029941a
manage edge bgp_password: honor boolean, validate password required w…
ccoueffe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
Oops, something went wrong.
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.
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.
Medium: Preserve the public
bgp_password_enablecontractIssue
The changed template derives
BGP_PASSWORD_ENABLEonly from whetherbgp_passwordis non-empty. It never reads the schema-validbgp_password_enableinput. That silently changes the public contract from an explicit enable control, defaulting totrue, to password-presence inference.Evidence
The changed branch sets
BGP_PASSWORD_ENABLE: truewhenever a non-empty password exists andfalseotherwise;link.bgp_section.bgp_password_enableis never consulted.At authoritative model ref
f997000b00b383725a9853c7f200b3a2c38cbb08,bgp_password_enableandbgp_passwordare independent optional properties, while the enable default remainstrue. The published generated documentation exposes the same Boolean default and optional password.Focused validation against that exact schema accepted both contradictory combinations: password present plus
bgp_password_enable: false, and password omitted plusbgp_password_enable: true.A strict render of the PR template produced these effective payloads:
falsefalsetruefalsetruetruefalsePractical example
An operator can pre-stage a BGP password in the model while deliberately keeping authentication disabled until the remote peer is ready:
The explicit intent is:
PR 803 ignores the Boolean and sees only that the password is non-empty, so it renders:
If the remote router has not enabled the same authentication yet, the NaC run unexpectedly enables it on
border-1; the peers no longer agree and the established BGP session can drop and remain down. The inverse is also silent:bgp_password_enable: truewith an accidentally omitted password rendersBGP_PASSWORD_ENABLE: falseinstead of failing validation for incomplete input.Existing PR overlap
No matching existing PR comment found. The August 6 suggestion from
mthurstociscoproposes password-presence gating, but it does not reconcile, remove, or deprecate the existing public enable property.Impact
A user who explicitly disables password authentication while retaining a password gets authentication enabled. That can reset an established BGP session and prevent it from returning if the peer is not using the same password. Conversely, explicit enable intent without a password is silently disabled instead of being rejected as incomplete input. In both cases, a schema-valid setting is accepted and then contradicted by the rendered intent.
Suggested fix
Choose one authoritative contract and enforce it end to end. If the Boolean remains public, honor its effective value; when true, require a non-empty password through semantic validation, and when false keep enable false even if a password is supplied. If passwordless edge BGP should be the normal omission behavior, coordinate a source-model default change from true to false rather than overriding the source default in this template. In either case, emit the desired password key deterministically as described in Finding 2. Add schema/semantic/render tests for omitted, empty, null, present, explicit false plus present, and explicit true plus absent.
If password presence is intentionally replacing the Boolean, coordinate a source-model change that deprecates or removes
bgp_password_enable, updates its default and generated docs, rejects ambiguous legacy combinations with a migration message, and lands before this behavior is released.