code: func LocalRegister(id IdentityID, authServer *AuthServer, additionalPrincipals, dnsNames []string, remoteAddr string) (*Identity, error) {
  	// If local registration is happening and no remote address was passed in
  	// (which means no advertise IP was set), use localhost.
  	if remoteAddr == "" {
  		remoteAddr = defaults.Localhost
  	}
  	keys, err := authServer.GenerateServerKeys(GenerateServerKeysRequest{
  		HostID:               id.HostUUID,
  		NodeName:             id.NodeName,
  		Roles:                teleport.Roles{id.Role},
  		AdditionalPrincipals: additionalPrincipals,
  		RemoteAddr:           remoteAddr,
  		DNSNames:             dnsNames,
  		NoCache:              true,
  	})
  	if err != nil {
  		return nil, trace.Wrap(err)
  	}
  
  	identity, err := ReadIdentityFromKeyPair(keys)
  	if err != nil {
  		return nil, trace.Wrap(err)
  	}
  
  	return identity, nil
  }
docs: // LocalRegister is used to generate host keys when a node or proxy is running
  // within the same process as the Auth Server and as such, does not need to
  // use provisioning tokens.