Skip to content

Commit

Permalink
Added TODOs and documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
tlbdk committed Jul 27, 2020
1 parent 3a3af23 commit 6c75a56
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmd/authwrapper/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ func setupKeyring(config *Config) (agent.ExtendedAgent, error) {

if config.SSHSigningServerURL != "" {
var errors []error
// TODO: support fetching new certs when they expire
for _, signer := range signers {
userCert, err := fetchUserCert(config.SSHSigningServerURL, signer.Signer, config.Command, config.Args, config.RequestedPrincipals)
if err != nil {
Expand Down
1 change: 1 addition & 0 deletions server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ type SigningServer struct {
// NewSigningServer creates a new server
func NewSigningServer(caKey ssh.Signer, allowedKeys []AllowedKey) *SigningServer {
var allowedKeysMap = map[string]*AllowedKey{}

for i, allowedKey := range allowedKeys {
pubkeyString := strings.TrimSuffix(string(ssh.MarshalAuthorizedKey(allowedKey.Key)), "\n")
allowedKeysMap[pubkeyString] = &allowedKeys[i]
Expand Down
2 changes: 2 additions & 0 deletions sshagent/keyring.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ func (r *sshAlgorithmSignerKeyring) List() ([]*agent.Key, error) {
// TODO: the go lang ssh cert implementation does not support forcing [email protected] or [email protected]
// https://cvsweb.openbsd.org/src/usr.bin/ssh/PROTOCOL.certkeys?annotate=HEAD
// To fix this we would need to replace the keyname in the certBlob with one of the names listed.
// This seems to be fixed in a newer go version, when this is merged:
// https://github.com/golang/go/issues/37278
for _, certificate := range r.sshCertificates {
keys = append(keys, &agent.Key{
Format: certificate.Certificate.Type(),
Expand Down

0 comments on commit 6c75a56

Please sign in to comment.