Skip to content

OpenVPN: Username as CN depends on authmode being set #9850

@swhite2

Description

@swhite2

Important notices

Before you add a new report, we ask you kindly to acknowledge the following:

Describe the bug

If enabling Username as CN while leaving Authentication empty, OpenVPN will refuse to start, since there is no authentication, there will also not be a username to match on.

To Reproduce

Steps to reproduce the behavior:

  1. Create an OpenVPN instance
  2. Enable Username as CN
  3. Do not set any Authentication
  4. Start OpenVPN, see error in log:
--username-as-common-name must be used with --management-client-auth, an --auth-user-pass-verify script, or plugin

Core only uses auth-user-pass-verify.

Expected behavior

Validation error if no Authentication set while Username as CN is enabled.

Describe alternatives you considered

N/A

Screenshots

N/A

Relevant log files

N/A

Additional context

N/A

Environment

OPNsense 26.7.a_180 (amd64).

Metadata

Metadata

Assignees

Labels

cleanupLow impact changes

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions