code: func GenerateUserCreds(process *service.TeleportProcess, username string) (*UserCreds, error) {
  	priv, pub, err := testauthority.New().GenerateKeyPair("")
  	if err != nil {
  		return nil, trace.Wrap(err)
  	}
  	a := process.GetAuthServer()
  	sshCert, x509Cert, err := a.GenerateUserCerts(pub, username, time.Hour, teleport.CertificateFormatStandard)
  	if err != nil {
  		return nil, trace.Wrap(err)
  	}
  	clusterName, err := a.GetClusterName()
  	if err != nil {
  		return nil, trace.Wrap(err)
  	}
  	ca, err := a.GetCertAuthority(services.CertAuthID{
  		Type:       services.HostCA,
  		DomainName: clusterName.GetClusterName(),
  	}, false)
  	if err != nil {
  		return nil, trace.Wrap(err)
  	}
  	return &UserCreds{
  		HostCA: ca,
  		Key: client.Key{
  			Priv:    priv,
  			Pub:     pub,
  			Cert:    sshCert,
  			TLSCert: x509Cert,
  		},
  	}, nil
  }
docs: // GenerateUserCreds generates key to be used by client