Rewrite bin/gitlab-shell-authorized-keys-check and bin/gitlab-shell-authorized-principals-check in Go

These are two simple wrappers around the GitLab API to generate authorized_keys lines in the face of two different configurations:

  • "Fast SSH key lookup" - sshd is configured with AuthorizedKeysCommand: https://docs.gitlab.com/ee/administration/operations/fast_ssh_key_lookup.html#fast-lookup-of-authorized-ssh-keys-in-the-database
  • Certificate-based SSH authentication - sshd is configured with AuthorizedPrincipalsCommand: https://docs.gitlab.com/ee/administration/operations/ssh_certificates.html#setting-up-ssh-certificate-lookup-via-gitlab-shell

They both need to be rewritten if we're to remove all Ruby code from the gitlab-shell project. Since they're invoked per-SSH-session in both of these configurations, additionally to the bin/gitlab-shell script, there are some latency wins from doing so.

Assignee Loading
Time tracking Loading