diff --git a/providers/arista/provider/provider.go b/providers/arista/provider/provider.go index c698e08bbc..7cc0006c7b 100644 --- a/providers/arista/provider/provider.go +++ b/providers/arista/provider/provider.go @@ -161,9 +161,7 @@ func (s *Service) connect(req *plugin.ConnectReq, callback plugin.ProviderCallba } func (s *Service) detect(asset *inventory.Asset, conn *connection.AristaConnection) error { - asset.Id = conn.Conf.Type asset.Name = conn.Conf.Host - version := "" arch := "" aristaVersion, err := conn.GetVersion() diff --git a/providers/aws/provider/provider.go b/providers/aws/provider/provider.go index ff21b3989d..5c6c2b76da 100644 --- a/providers/aws/provider/provider.go +++ b/providers/aws/provider/provider.go @@ -199,7 +199,6 @@ func (s *Service) detect(asset *inventory.Asset, conn plugin.Connection) error { return nil } if c, ok := conn.(*connection.AwsConnection); ok { - asset.Id = c.Conf.Type + "://" + c.AccountId() asset.Name = c.Conf.Host asset.Platform = c.PlatformInfo() asset.PlatformIds = []string{"//platformid.api.mondoo.app/runtime/aws/accounts" + c.AccountId()} diff --git a/providers/equinix/provider/provider.go b/providers/equinix/provider/provider.go index 2cfc0140ab..c071234e73 100644 --- a/providers/equinix/provider/provider.go +++ b/providers/equinix/provider/provider.go @@ -153,7 +153,6 @@ func (s *Service) connect(req *plugin.ConnectReq, callback plugin.ProviderCallba } func (s *Service) detect(asset *inventory.Asset, conn *connection.EquinixConnection) error { - asset.Id = conn.Conf.Type asset.Name = conn.Conf.Host asset.Platform = &inventory.Platform{ diff --git a/providers/gcp/provider/provider.go b/providers/gcp/provider/provider.go index afbf4ee900..786dda83fc 100644 --- a/providers/gcp/provider/provider.go +++ b/providers/gcp/provider/provider.go @@ -274,7 +274,6 @@ func (s *Service) connect(req *plugin.ConnectReq, callback plugin.ProviderCallba } func (s *Service) detect(asset *inventory.Asset, conn shared.GcpConnection) error { - asset.Id = conn.Config().Type asset.Name = conn.Config().Host switch conn.Config().Type { diff --git a/providers/github/provider/provider.go b/providers/github/provider/provider.go index 83d85c6d7b..2d39459d93 100644 --- a/providers/github/provider/provider.go +++ b/providers/github/provider/provider.go @@ -172,7 +172,6 @@ func (s *Service) connect(req *plugin.ConnectReq, callback plugin.ProviderCallba } func (s *Service) detect(asset *inventory.Asset, conn *connection.GithubConnection) error { - asset.Id = conn.Conf.Type asset.Name = conn.Conf.Host repoOpt := conn.Conf.Options["repository"] diff --git a/providers/google-workspace/provider/provider.go b/providers/google-workspace/provider/provider.go index 32bbb16e29..c1e7c5158a 100644 --- a/providers/google-workspace/provider/provider.go +++ b/providers/google-workspace/provider/provider.go @@ -203,7 +203,6 @@ func (s *Service) connect(req *plugin.ConnectReq, callback plugin.ProviderCallba } func (s *Service) detect(asset *inventory.Asset, conn *connection.GoogleWorkspaceConnection) error { - asset.Id = conn.Conf.Type asset.Name = conn.Conf.Host asset.Platform = &inventory.Platform{ diff --git a/providers/ipmi/provider/provider.go b/providers/ipmi/provider/provider.go index 90b0b7fad9..8acaa4c694 100644 --- a/providers/ipmi/provider/provider.go +++ b/providers/ipmi/provider/provider.go @@ -161,7 +161,6 @@ func (s *Service) connect(req *plugin.ConnectReq, callback plugin.ProviderCallba } func (s *Service) detect(asset *inventory.Asset, conn *connection.IpmiConnection) error { - asset.Id = conn.Conf.Type asset.Name = conn.Conf.Host asset.Platform = &inventory.Platform{ diff --git a/providers/ms365/provider/provider.go b/providers/ms365/provider/provider.go index 40a81bfa85..31c2226533 100644 --- a/providers/ms365/provider/provider.go +++ b/providers/ms365/provider/provider.go @@ -149,7 +149,6 @@ func (s *Service) connect(req *plugin.ConnectReq, callback plugin.ProviderCallba } func (s *Service) detect(asset *inventory.Asset, conn *connection.Ms365Connection) error { - asset.Id = conn.PlatformId() asset.PlatformIds = append(asset.PlatformIds, conn.PlatformId()) asset.Platform = &inventory.Platform{ Name: "ms365", diff --git a/providers/network/provider/provider.go b/providers/network/provider/provider.go index 32ad0c437d..4db64e8eac 100644 --- a/providers/network/provider/provider.go +++ b/providers/network/provider/provider.go @@ -171,7 +171,6 @@ func (s *Service) detect(asset *inventory.Asset, conn *connection.HostConnection return errors.New("a port for the network connection is required") } - asset.Id = conn.Conf.Type + "://" + conn.Conf.Host + ":" + strconv.Itoa(int(conn.Conf.Port)) + conn.Conf.Path asset.Name = conn.Conf.Host asset.Platform = &inventory.Platform{ Name: "host", diff --git a/providers/oci/provider/provider.go b/providers/oci/provider/provider.go index 40df435256..1c9826e7fa 100644 --- a/providers/oci/provider/provider.go +++ b/providers/oci/provider/provider.go @@ -181,7 +181,6 @@ func (s *Service) connect(req *plugin.ConnectReq, callback plugin.ProviderCallba } func (s *Service) detect(asset *inventory.Asset, conn *connection.OciConnection) error { - asset.Id = conn.Conf.Type asset.Name = conn.Conf.Host info, err := conn.Tenant(context.Background()) diff --git a/providers/okta/provider/provider.go b/providers/okta/provider/provider.go index e3687c61f1..8b4ed32b8f 100644 --- a/providers/okta/provider/provider.go +++ b/providers/okta/provider/provider.go @@ -161,7 +161,6 @@ func (s *Service) connect(req *plugin.ConnectReq, callback plugin.ProviderCallba } func (s *Service) detect(asset *inventory.Asset, conn *connection.OktaConnection) error { - asset.Id = conn.Conf.Type asset.Name = "Okta Organization " + conn.OrganizationID() asset.Platform = &inventory.Platform{ Name: "okta-org", diff --git a/providers/opcua/provider/provider.go b/providers/opcua/provider/provider.go index 528f41cc8a..a7e3e62c4a 100644 --- a/providers/opcua/provider/provider.go +++ b/providers/opcua/provider/provider.go @@ -136,7 +136,6 @@ func (s *Service) connect(req *plugin.ConnectReq, callback plugin.ProviderCallba } func (s *Service) detect(asset *inventory.Asset, conn *connection.OpcuaConnection) error { - asset.Id = conn.Conf.Type asset.Name = conn.Conf.Host asset.Platform = &inventory.Platform{ diff --git a/providers/slack/provider/provider.go b/providers/slack/provider/provider.go index f996a14f6f..730624a6da 100644 --- a/providers/slack/provider/provider.go +++ b/providers/slack/provider/provider.go @@ -167,7 +167,6 @@ func (s *Service) connect(req *plugin.ConnectReq, callback plugin.ProviderCallba } func (s *Service) detect(asset *inventory.Asset, conn *connection.SlackConnection) error { - asset.Id = conn.Conf.Type + "://" + conn.TeamID() asset.Name = "Slack team " + conn.TeamName() asset.Platform = &inventory.Platform{ Name: "slack-team", diff --git a/providers/vcd/provider/provider.go b/providers/vcd/provider/provider.go index d87e304864..4d1781cf27 100644 --- a/providers/vcd/provider/provider.go +++ b/providers/vcd/provider/provider.go @@ -152,8 +152,6 @@ func (s *Service) connect(req *plugin.ConnectReq, callback plugin.ProviderCallba } func (s *Service) detect(asset *inventory.Asset, conn *connection.VcdConnection) error { - // TODO: adjust asset detection - asset.Id = conn.Conf.Type asset.Name = conn.Conf.Host c := conn.Client() diff --git a/providers/vsphere/provider/provider.go b/providers/vsphere/provider/provider.go index 90ff30c0d3..863ca79771 100644 --- a/providers/vsphere/provider/provider.go +++ b/providers/vsphere/provider/provider.go @@ -181,7 +181,6 @@ func (s *Service) connect(req *plugin.ConnectReq, callback plugin.ProviderCallba } func (s *Service) detect(asset *inventory.Asset, conn *connection.VsphereConnection) error { - asset.Id = conn.Conf.Type asset.Name = conn.Conf.Host vSphereInfo := conn.Info()