Skip to content

aeon: Fix SSL paths configuration for aeon connection #1140

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

Merged
merged 1 commit into from
Apr 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

- Arguments of an internal command are not parsed if it is forced over its existent
external counterpart.
- aeon: fix SSL paths configuration for aeon connection.

## [2.8.1] - 2025-03-10

Expand Down
13 changes: 9 additions & 4 deletions cli/cmd/aeon.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,12 @@ func aeonConnectValidateArgs(cmd *cobra.Command, args []string) error {
return err
}
case len(args) == 2 && util.IsRegularFile(args[0]):
if err := readConfigFilePath(args[0], args[1]); err != nil {
configPath, err := filepath.Abs(args[0])
if err != nil {
return err
}

if err := readConfigFilePath(configPath, args[1]); err != nil {
return err
}
default:
Expand Down Expand Up @@ -216,15 +221,15 @@ func readConfigFilePath(configPath string, instance string) error {
connectCtx.Transport = aeoncmd.TransportSsl
configDir := filepath.Dir(configPath)

if connectCtx.Ssl.CaFile == "" {
if connectCtx.Ssl.CaFile == "" && advertise.Params.CaFile != "" {
connectCtx.Ssl.CaFile = util.JoinPaths(configDir, advertise.Params.CaFile)
}

if connectCtx.Ssl.KeyFile == "" {
if connectCtx.Ssl.KeyFile == "" && advertise.Params.KeyFile != "" {
connectCtx.Ssl.KeyFile = util.JoinPaths(configDir, advertise.Params.KeyFile)
}

if connectCtx.Ssl.CertFile == "" {
if connectCtx.Ssl.CertFile == "" && advertise.Params.CertFile != "" {
connectCtx.Ssl.CertFile = util.JoinPaths(configDir, advertise.Params.CertFile)
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/integration/aeon/test_aeon.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ def test_cli_invalid_ssl_config_file(tt_cmd, tmp_path, aeon_ssl,):

print(f"stderr {tt.stderr}")

assert "not valid path to a private SSL key file" in tt.stderr
assert "Error: not valid path to trusted certificate authorities" in tt.stderr
assert tt.returncode != 0


Expand Down