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

Allow admins to manage user SSH keys #3631

Open
jerrykan opened this issue Mar 6, 2018 · 10 comments
Open

Allow admins to manage user SSH keys #3631

jerrykan opened this issue Mar 6, 2018 · 10 comments
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/feature Completely new functionality. Can only be merged if feature freeze is not active.

Comments

@jerrykan
Copy link

jerrykan commented Mar 6, 2018

We run gitea internally and have set up a few "service accounts" for systems that interact with the git repositories. One of the pain points with doing this is that you have to log in as the service account to manage the ssh keys associated with the account.

Ideally it would be good if an admin user had access to be able to able to manage the public ssh keys of the users.

I would also be open to the idea of having a separate service/integrations account type so that admins would only be able to manage keys for those types of accounts, instead of all of the normal users.

I am aware that deploy keys could be used for this sort of thing, but being able to add a service account to a repository provides a lot more visibility as to which systems have access to a repository. It also makes key management a lot easier if the keys need to be updated.

@lafriks lafriks added the type/feature Completely new functionality. Can only be merged if feature freeze is not active. label Mar 6, 2018
@nvx
Copy link

nvx commented Jan 1, 2019

Due to the limitations of deploy keys (max one per repo as per #3959, can't add them to organisations, etc) I find myself using this pattern.

Either this needs to happen, or deploy keys need to be revamped to provide similar experience (think of a CI/CD user usecase).

@immanuelfodor
Copy link

immanuelfodor commented Jan 22, 2019

I just needed to create a service account with random scrambled password wanting to add an SSH key later to it, then realized, I need to change it to something I know to be able to login to the new account, add the key, then set up the random password again. Came here right after to see if this issue has already been added or I need to create it myself. Thanks for the original report, this one should worth take a look by the team.

@stale
Copy link

stale bot commented Mar 23, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale stale bot added the issue/stale label Mar 23, 2019
@immanuelfodor
Copy link

So many thumbs up and hearts, I think this feature request should be kept open.

@stale stale bot removed the issue/stale label Mar 23, 2019
@lunny lunny added the issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented label Mar 24, 2019
@zeripath
Copy link
Contributor

There are multiple ways of working around this:

  • If you manage your users in LDAP we can import SSH keys from that.
  • Use the API /admin/users/:username/keys or with the sudo option /user/keys?sudo=:username

@immanuelfodor
Copy link

I don't have LDAP, but if there is an API for that, it should be relatively easy to create a frontend to it

@zeripath
Copy link
Contributor

BTW The referenced #3959 deploy key limitations should no longer be a problem - so if you only need to push/pull you don't actually need an account and can use deploy keys.

@immanuelfodor
Copy link

Wow, great news, I was not aware of that one!

@zeripath
Copy link
Contributor

The fix was in #5939 and I explain my understanding of how keys are supposed to work there.

@nvx
Copy link

nvx commented Mar 27, 2019

#5939 solves my use-case so the ability for admins to manage user SSH keys is no longer needed by me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/feature Completely new functionality. Can only be merged if feature freeze is not active.
Projects
None yet
Development

No branches or pull requests

6 participants