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

Proposal: support ssh certificates #12224

Closed
42wim opened this issue Jul 12, 2020 · 0 comments · Fixed by #12281
Closed

Proposal: support ssh certificates #12224

42wim opened this issue Jul 12, 2020 · 0 comments · Fixed by #12281
Labels
type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@42wim
Copy link
Member

42wim commented Jul 12, 2020

Description

Support ssh certificates

This way users can get access without uploading a public ssh key, instead they are verified against a ssh CA.

This will need extra sshd configuration like this

AuthorizedPrincipalsFile .ssh/authorized_principals
TrustedUserCAKeys /etc/ssh/trusted-user-ca-keys.pem

.ssh/authorized_principals basically need to output the same as the authorized_keys file eg

command="/app/gitea/gitea serv key-1 --config='/data/gitea/conf/app.ini'",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty principal

The difference is the principal instead of the ssh key, this should match the valid principals in your ssh certificate.

In our case this will match with the usernames in gitea.

In the GUI there should be an option for a user to:

  • activate this feature
  • maybe specify the principal that should be matched (default username)

In the configfile, there should be an option to specify the system-wide CA (the contents of /etc/ssh/trusted-user-ca-keys.pem)

It's possible to fit this in the public_key table by putting the correct principal in the content field instead of the ssh-key

I'm prepared to work on this.

@lunny lunny added the type/proposal The new feature has not been accepted yet but needs to be discussed first. label Jul 13, 2020
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants