Skip to content

Allow large IPSec key (PSK) when creating VPN#5668

Merged
yadvr merged 2 commits intoapache:mainfrom
scclouds:allow-large-psk
Nov 23, 2021
Merged

Allow large IPSec key (PSK) when creating VPN#5668
yadvr merged 2 commits intoapache:mainfrom
scclouds:allow-large-psk

Conversation

@joseflauzino
Copy link
Copy Markdown
Contributor

Description

The global parameter remote.access.vpn.psk.length sets the length of the IPSec key (a PSK). The ipsec_psk field (which is a varchar(256) in the remote_access_vpn table) stores the PSK in encrypted form - it has an @Encrypt annotation. When the value defined in remote.access.vpn.psk.length generates a PSK that, when encrypted, has more than 256 characters, ACS throws a database exception when trying to persist the data, preventing the creation of the VPN.

This PR changes the ipsec_psk field from varchar(256) to text in order to allow the creation of large PSKs.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

How Has This Been Tested?

In a local lab, I performed the following steps:

  • I changed the ipsec_psk field from varchar(256) to the type text;
  • I set remote.access.vpn.psk.length to 224 (which generates an encrypted PSK with 320 characters - more than the previous limit, 256);
  • I restarted ACS Management Server to apply the configuration;
  • And then I tried to create a new VPN;
  • The VPN has been successfully created.

@weizhouapache weizhouapache added this to the 4.16.1.0 milestone Nov 5, 2021
Comment thread engine/schema/src/main/resources/META-INF/db/schema-41600to41610.sql Outdated
@GutoVeronezi
Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@GutoVeronezi a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan
Copy link
Copy Markdown

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 1689

@yadvr yadvr changed the base branch from main to 4.16 November 15, 2021 10:14
@yadvr
Copy link
Copy Markdown
Member

yadvr commented Nov 15, 2021

LGTM
@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan
Copy link
Copy Markdown

Packaging result: ✖️ el7 ✖️ el8 ✖️ debian ✖️ suse15. SL-JID 1708

@joseflauzino joseflauzino changed the base branch from 4.16 to main November 16, 2021 12:43
Copy link
Copy Markdown
Member

@GabrielBrascher GabrielBrascher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM.
Thanks, @joseflauzino!

@GutoVeronezi GutoVeronezi modified the milestones: 4.16.1.0, 4.17.0.0 Nov 17, 2021
@GutoVeronezi
Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@GutoVeronezi a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan
Copy link
Copy Markdown

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 1720

@yadvr
Copy link
Copy Markdown
Member

yadvr commented Nov 18, 2021

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@blueorangutan
Copy link
Copy Markdown

Trillian test result (tid-2558)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 30275 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5668-t2558-kvm-centos7.zip
Smoke tests completed. 91 look OK, 0 have errors
Only failed tests results shown below:

Test Result Time (s) Test File

@yadvr yadvr merged commit e2c85de into apache:main Nov 23, 2021
mlsorensen pushed a commit to mlsorensen/cloudstack that referenced this pull request Dec 20, 2021
… to 4.17 (apache#5668)

Co-authored-by: José Flauzino <jose@scclouds.com.br>
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.

6 participants