Skip to content

Allow disabling users from adding SSH keys #24716

Closed
@panangam

Description

@panangam

Feature Description

It would be great if we have the option to disable SSH key adding by users, for when keys are entirely externally managed by an admin. Seems like removing the front end button is easy enough using a template, but from my understanding, to be secure we will also need to disable the API endpoint. I don't think such a feature exists right now.

In my mind, an implementation could be to

  1. Add an SSH configuration option to "allow non-admin users to add SSH keys" (default to true).
  2. Make the front end check for this setting and set the "Add SSH Key" button to disabled.
  3. Make the api endpoint check this setting.

Would this be a good idea? Or is there a configuration to achieve this already? If this will be a good contribution, I plan to make a PR of it.

Issue #13983 seems relevant, but it only deals with deleting keys.

(I have asked this on Discord and was advised to make a proposal here)

Screenshots

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/featureCompletely new functionality. Can only be merged if feature freeze is not active.type/proposalThe new feature has not been accepted yet but needs to be discussed first.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions