Fully disable of SSH setup if SSH is not enabled #321

Open
opened 2022-05-10 08:07:24 +00:00 by AnkitShankdhar · 3 comments
AnkitShankdhar commented 2022-05-10 08:07:24 +00:00 (Migrated from gitea.com)

While installing Gitea, the ssh is been disabled.
The requirement is to remove the ssh-svc as well when ssh is disabled in Gitea.

Below are the comment as received in Gitea.

The SSH Service is disabled , but the SVC shows the port 22. The port 22 is been scanned by the scanner and report the issue.

It's not related to Gitea itself, but docker-compose/helmchart or other methods you used to deploy Gitea.

For helmchart, see: https://gitea.com/gitea/helm-chart/src/branch/master/templates/gitea/ssh-svc.yaml

You could propose PRs on the helmchar repository.

While installing Gitea, the ssh is been disabled. The requirement is to remove the ssh-svc as well when ssh is disabled in Gitea. Below are the comment as received in Gitea. The SSH Service is disabled , but the SVC shows the port 22. The port 22 is been scanned by the scanner and report the issue. It's not related to Gitea itself, but docker-compose/helmchart or other methods you used to deploy Gitea. For helmchart, see: https://gitea.com/gitea/helm-chart/src/branch/master/templates/gitea/ssh-svc.yaml You could propose PRs on the helmchar repository.
AnkitShankdhar commented 2022-05-18 06:11:40 +00:00 (Migrated from gitea.com)

Hi

Please suggest If the ssh-svc can be removed while installing Gitea.

Hi Please suggest If the ssh-svc can be removed while installing Gitea.
luhahn commented 2022-05-18 07:37:20 +00:00 (Migrated from gitea.com)

Of course, if ssh has been disabled, there would be no need for the service. Feel free to provide a PR for this Issue.

Of course, if ssh has been disabled, there would be no need for the service. Feel free to provide a PR for this Issue.
justusbunsi commented 2022-06-11 11:44:55 +00:00 (Migrated from gitea.com)

Hi @AnkitShankdhar. If I understand you correctly, you are talking about a way to completely disable any SSH related feature within the Helm Chart. Is this correct?

In that case there would be a few things to do:

  • Allow disabling .Values.service.ssh
  • Skip any injection of SSH related settings for app.ini composing
  • Prevent SSH related environment variables being exposed to the container
  • Do not expose the SSH port from the container to the Kubernetes cluster

IMO the enable/disable logic of .Values.service.ssh would be the feature toggle for the SSH capability. Without a Kubernetes service as centralized endpoint for incoming SSH traffic, no SSH logic inside Gitea allows for accessing it via SSH, AFAIK.

Hi @AnkitShankdhar. If I understand you correctly, you are talking about a way to completely disable any SSH related feature within the Helm Chart. Is this correct? In that case there would be a few things to do: - Allow disabling `.Values.service.ssh` - Skip any injection of SSH related settings for `app.ini` composing - Prevent SSH related environment variables being exposed to the container - Do not expose the SSH port from the container to the Kubernetes cluster IMO the enable/disable logic of `.Values.service.ssh` would be the _feature toggle_ for the SSH capability. Without a Kubernetes service as centralized endpoint for incoming SSH traffic, no SSH logic inside Gitea allows for accessing it via SSH, AFAIK.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: lunny/helm-chart#321
No description provided.