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

rpk version -X admin.tls.enabled always "true" does not matter what is the value #24722

Open
buznyusz opened this issue Jan 8, 2025 · 2 comments
Assignees
Labels
area/rpk kind/bug Something isn't working

Comments

@buznyusz
Copy link

buznyusz commented Jan 8, 2025

Version & Environment

Redpanda version: (use rpk version):

Version: v24.3.1
Git ref: afe1a3f
Build date: 2024-12-02T23:29:48Z
OS: RHEL9

What went wrong?

rpk version -X admin.tls.**enabled=kitty_cat** -X admin.tls.ca=/redpanda/ssl/ca.cer  -v
Version:     v24.3.1
Git ref:     afe1a3f1ff
Build date:  2024-12-02T23:29:48Z
OS/Arch:     linux/amd64
Go version:  go1.23.1
11:43:30.837  DEBUG  Sending request  {"method": "GET", "url": "https://127.0.0.1:9644/v1/features/enterprise", "bearer": false, "basic": false}
11:43:30.844  DEBUG  Sending request  {"method": "GET", "url": "https://127.0.0.1:9644/v1/features/license", "bearer": false, "basic": false}
11:43:30.845  DEBUG  Sending request  {"method": "GET", "url": "https://127.0.0.1:9644/v1/brokers", "bearer": false, "basic": false}

Redpanda Cluster
  node-0  v24.3.1 - afe1a3f1ffd5ce5005b0828c337fa18b4dc6b922

OR

rpk version -X admin.tls.**enabled=false** -X admin.tls.ca=/redpanda/ssl/ca.cer  -v
Version:     v24.3.1
Git ref:     afe1a3f1ff
Build date:  2024-12-02T23:29:48Z
OS/Arch:     linux/amd64
Go version:  go1.23.1
11:42:20.797  DEBUG  Sending request  {"method": "GET", "url": "https://127.0.0.1:9644/v1/features/enterprise", "bearer": false, "basic": false}
11:42:20.804  DEBUG  Sending request  {"method": "GET", "url": "https://127.0.0.1:9644/v1/features/license", "bearer": false, "basic": false}
11:42:20.805  DEBUG  Sending request  {"method": "GET", "url": "https://127.0.0.1:9644/v1/brokers", "bearer": false, "basic": false}

Redpanda Cluster
  node-0  v24.3.1 - afe1a3f1ffd5ce5005b0828c337fa18b4dc6b922

What should have happened instead?

IF -X admin.tls.enabled=false than it should call the admin.api without SSL
IF -X admin.tls.enabled=kitty_cat than should throw an exception

How to reproduce the issue?

  1. Turn on the SSL on the admin_api
  2. issue the command : rpk version -X admin.tls.enabled=kitty_cat -X admin.tls.ca=/redpanda/ssl/ca.cer -v
  3. check the verbose log

JIRA Link: CORE-8752

@buznyusz buznyusz added the kind/bug Something isn't working label Jan 8, 2025
@dotnwat
Copy link
Member

dotnwat commented Jan 8, 2025

@r-vasquez

@r-vasquez r-vasquez self-assigned this Jan 8, 2025
@r-vasquez
Copy link
Contributor

Hi @buznyusz, thanks for reporting.

This is a bug, or at least an undocumented behavior: The tls.enabled/admin.tls.enabled flags do not currently parse any given value but instead just check if they are present (present == true), hence the bug you are reporting.

We will work on changing this to parse boolean values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/rpk kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants