Provide method to allow user public SSH keys to be visible on instances with limited visibility

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Problem

User SSH public keys on instances with limited visibility require an active session to be viewed as of 14.2.2 to prevent enumeration of users. However some users wish to allow this so that SSH keys can easily be stored and shared in their organization. By changing the behavior and not providing a way to opt-out, this puts those users in a difficult situation.

Proposal

  1. Add a setting in the config file that can be used to enable "anonymous access to SSH public keys"
  • Note: Pavel's recommendation was to put this as a config-file setting rather than a feature flag in this comment below.

Original Issue

The commit 8951195f restrict access to public keys.

This problem was solved several times:

  • #296620 (closed) SSH public keys no longer public accessible when restricted visibility is limited

  • #235756 (closed) ssh public keys no longer public accessible

Edited by 🤖 GitLab Bot 🤖