-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathconfig.go
More file actions
86 lines (81 loc) · 2.51 KB
/
config.go
File metadata and controls
86 lines (81 loc) · 2.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
// Copyright Mondoo, Inc. 2024, 2026
// SPDX-License-Identifier: BUSL-1.1
package config
import (
"go.mondoo.com/mql/v13/providers-sdk/v1/inventory"
"go.mondoo.com/mql/v13/providers-sdk/v1/plugin"
"go.mondoo.com/mql/v13/providers/ms365/provider"
)
var Config = plugin.Provider{
Name: "ms365",
ID: "go.mondoo.com/cnquery/v9/providers/ms365",
Version: "13.0.4",
ConnectionTypes: []string{provider.ConnectionType},
Connectors: []plugin.Connector{
{
Name: "ms365",
Use: "ms365",
Aliases: []string{"m365"},
Short: "a Microsoft 365 tenant",
Long: `Use the ms365 provider to query resources within Microsoft 365, including organizations, users, roles, SharePoint sites, and more.
Examples:
cnspec shell ms365 --certificate-path <PATH-TO-YOUR-PEM> --tenant-id <YOUR-TENANT-ID> --client-id <YOUR-CLIENT-ID>
cnspec scan ms365 --certificate-path <PATH-TO-YOUR-PEM> --tenant-id <YOUR-TENANT-ID> --client-id <YOUR-CLIENT-ID>
Notes:
If you give cnquery access through the Microsoft 365 API, you can omit the certificate-path, tenant-id, and client-id flags. To learn how, read https://mondoo.com/docs/cnquery/saas/ms365/#give-cnquery-access-through-the-microsoft-365-api.
`,
MinArgs: 0,
MaxArgs: 5,
Discovery: []string{},
Flags: []plugin.Flag{
{
Long: "tenant-id",
Type: plugin.FlagType_String,
Default: "",
Desc: "Directory (tenant) ID of the service principal",
},
{
Long: "client-id",
Type: plugin.FlagType_String,
Default: "",
Desc: "Application (client) ID of the service principal",
},
{
Long: "organization",
Type: plugin.FlagType_String,
Default: "",
Desc: "Organization to scan",
},
{
Long: "sharepoint-url",
Type: plugin.FlagType_String,
Default: "",
Desc: "Sharepoint URL to scan",
},
{
Long: "client-secret",
Type: plugin.FlagType_String,
Default: "",
Desc: "Secret for the application",
},
{
Long: "certificate-path",
Type: plugin.FlagType_String,
Default: "",
Desc: "Path (in PKCS #12/PFX or PEM format) to the authentication certificate",
},
{
Long: "certificate-secret",
Type: plugin.FlagType_String,
Default: "",
Desc: "Passphrase for the authentication certificate file",
},
},
},
},
AssetUrlTrees: []*inventory.AssetUrlBranch{
{
PathSegments: []string{"technology=saas", "provider=ms365"},
},
},
}