Skip to content

fix(apiserver): keep the unauthenticated plain listener on loopback - #215

Open
Andrei Kvapil (kvaps) wants to merge 1 commit into
fix/csi-clone-and-restore-idempotencyfrom
fix/apiserver-plain-localhost
Open

Andrei Kvapil (kvaps) wants to merge 1 commit into
fix/csi-clone-and-restore-idempotencyfrom
fix/apiserver-plain-localhost

Conversation

@kvaps

@kvaps Andrei Kvapil (kvaps) commented Oct 24, 2026 •

Copy link
Copy Markdown
Member

The apiserver's plain-HTTP listener serves the whole LINSTOR API with no client certificate, and it bound every pod interface by default. Only its absence from the Service kept it off the cluster network, and nothing enforced that: any pod that could reach an apiserver pod IP had full read-write access.

The listener now defaults to 127.0.0.1:3370, in the apiserver and in the controller's single-binary REST mode, and the stand manifest passes the same and no longer declares the container port. kubectl port-forward keeps working, since it connects inside the pod's network namespace. Every in-repo client of the plain port already goes through a port-forward; CSI and piraeus use the mutual-TLS port.

The controller's single-binary REST mode (--enable-rest-api=true) has no TLS listener, so with the new default it has no network endpoint at all: in-cluster clients get connection refused. Nothing deployed runs that mode; --rest-bind-address=:3370 brings the old behaviour back, exposure included.

Stacked on #190.

Fixes #201

Testing

  • New tests pin the default of both binaries, the flag registration that has to use it, and the value the stand manifest passes, to a loopback address. Setting any of them back to :3370 reddens a test.
  • go test ./...: green apart from the known server did not stop within 2s after cancel flake in pkg/rest.
  • golangci-lint on the changed lines: clean.
  • Not run on a stand.

@coderabbitai

coderabbitai Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: afd03b17-09ea-48ce-aeb1-517800660fc9

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

The plain-HTTP listener serves the whole API without a client
certificate. It bound every pod interface by default, so any pod that
could reach the apiserver pod IP had full read-write access; only its
absence from the Service kept it off the cluster network, and nothing
enforced that.

The default is now 127.0.0.1:3370, in the apiserver and in the
controller's legacy REST mode, and the stand manifest passes the same.
kubectl port-forward still reaches it, since it connects inside the
pod's network namespace. Tests pin the default and the manifest value
to a loopback address.

Fixes #201

Assisted-by: LLM
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
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.

1 participant