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

T5423: Fix for op-mode show vpn ike secrets #2226

Merged
merged 1 commit into from
Sep 8, 2023

Conversation

sever-sever
Copy link
Member

Change Summary

We don't use ipsec.secrets anymore
Fix op-mode for "show vpn ike secrets".
Ability to get "RAW" format

(cherry picked from commit 9732692)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
  • Other (please describe):

Related Task(s)

Component(s) name

ipsec op mode

Proposed changes

How to test

VyOS configuration:

set vpn ipsec authentication psk one id '192.0.2.1'
set vpn ipsec authentication psk one id '192.0.2.2'
set vpn ipsec authentication psk one secret 'SSSeeccRetT'
set vpn ipsec authentication psk two id '192.0.2.22'
set vpn ipsec authentication psk two secret 'se123cret'

Before the fix:

vyos@r14:~$ show vpn ike secrets 
cat: /etc/ipsec.secrets: No such file or directory
vyos@r14:~$

After the fix:

vyos@r14:~$ show vpn ike secrets 
PSK    Id          Secret
-----  ----------  -----------
one    192.0.2.1   SSSeeccRetT
       192.0.2.2
two    192.0.2.22  se123cret
vyos@r14:~$ 

RAW:

vyos@r14:~$ /usr/libexec/vyos/op_mode/ipsec.py show_psk --raw
[
    {
        "id": [
            "192.0.2.1",
            "192.0.2.2"
        ],
        "secret": "SSSeeccRetT",
        "psk": "one"
    },
    {
        "id": [
            "192.0.2.22"
        ],
        "secret": "se123cret",
        "psk": "two"
    }
]
vyos@r14:~$

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • I have run the components SMOKETESTS if applicable
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

We don't use ipsec.secrets anymore
Fix op-mode for "show vpn ike secrets".
Ability to get "RAW" format

(cherry picked from commit 9732692)
@github-actions github-actions bot added the sagitta VyOS 1.4 LTS label Sep 8, 2023
@vyosbot vyosbot requested review from a team, dmbaturin, sarthurdev, zdc, jestabro and c-po and removed request for a team September 8, 2023 15:09
@sever-sever sever-sever merged commit 5409394 into vyos:sagitta Sep 8, 2023
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sagitta VyOS 1.4 LTS
Development

Successfully merging this pull request may close these issues.

3 participants