Repository navigation
[feature] Added support for OpenVPN tls-auth option #174 - #217
Merged
Merged
Conversation
pandafy
force-pushed
the
issues/174-tls-auth
branch
from
March 8, 2022 13:08
8658840 to
490c240
Compare
pandafy
force-pushed
the
issues/174-tls-auth
branch
from
March 8, 2022 13:32
490c240 to
d594f50
Compare
The OpenVPN backend will automatically create a file for the key present in "tls_auth" field and update the value of the "tls-auth" parameter. Closes #174
pandafy
force-pushed
the
issues/174-tls-auth
branch
from
March 8, 2022 13:53
d594f50 to
2cd0e92
Compare
nemesifier
requested changes
Mar 8, 2022
| if len(tls_auth.split(' ')) == 1: | ||
| # The TLS Auth key is present in the field. | ||
| ca_path = config.get('ca', '') | ||
| tls_auth_path = '/'.join(ca_path.split('/')[:-1] + ['tls_auth.key']) |
Member
There was a problem hiding this comment.
What if there's multiple VPN servers or clients, do the files collide? If yes, please add a test for this and make sure the tls key is unique (eg: each config has a name which can be used for this).
nemesifier
requested changes
Mar 9, 2022
| +--------------------------+---------+--------------+-------------------------------------------------------------+ | ||
| | ``verb`` | integer | ``1`` | from ``0`` (disabled) to ``11`` (very verbose) | | ||
| +--------------------------+---------+--------------+-------------------------------------------------------------+ | ||
| | ``tls_auth`` | string | | string containing TLS Auth key | |
Member
There was a problem hiding this comment.
let's move this after tls_cipher, in general, let's add new options where they make sense, not just at the end.
nemesifier
requested changes
Mar 9, 2022
nemesifier
left a comment
Member
There was a problem hiding this comment.
I see two issues.
- the result in OpenWISP Controller doesn't match what I would expect
- I tried creating a server with the TLS auth key, then created the template client, but suprisingly the TLS auth key on the client was not autogenerated. Please add a specific test for the auto client feature.
Please pull my changes: 4145fc1.
pandafy
commented
Mar 9, 2022
| ), | ||
| "type": "string", | ||
| "format": "textarea", | ||
| "propertyOrder": 18, |
Member
Author
There was a problem hiding this comment.
It has same propertyOrder as crl_verify.
netjsonconfig/netjsonconfig/backends/openvpn/schema.py
Lines 622 to 628 in f2e692c
Member
Author
nemesifier
approved these changes
Mar 10, 2022
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
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.






The OpenVPN backend will automatically create a file for the
key present in "tls_auth" field and update the value of the
"tls-auth" parameter.
Closes #174