-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathconfig.go
More file actions
101 lines (93 loc) · 2.98 KB
/
config.go
File metadata and controls
101 lines (93 loc) · 2.98 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
// 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/atlassian/connection"
"go.mondoo.com/mql/v13/providers/atlassian/connection/confluence"
"go.mondoo.com/mql/v13/providers/atlassian/provider"
)
var Config = plugin.Provider{
Name: "atlassian",
ID: "go.mondoo.com/cnquery/v9/providers/atlassian",
Version: "13.0.4",
ConnectionTypes: []string{
provider.DefaultConnectionType,
"jira",
"admin",
string(confluence.Confluence),
"scim",
},
Connectors: []plugin.Connector{
{
Name: "atlassian",
Use: "atlassian",
Short: "an Atlassian Cloud Jira, Confluence or Bitbucket instance",
Long: `Use the atlassian provider to query resources within Atlassian Cloud, including Jira, Confluence, and SCIM.
Available commands:
admin Atlassian administrative instance
jira Jira instance
confluence Confluence instance
scim SCIM instance
Examples:
cnspec shell atlassian admin --admin-token <token>
cnspec shell atlassian jira --host <host> --user <user> --user-token <token>
cnspec shell atlassian confluence --host <host> --user <user> --user-token <token>
cnspec shell atlassian scim <directory-id> --scim-token <token>
Notes:
If you set the ATLASSIAN_ADMIN_TOKEN environment variable, you can omit the admin-token flag.
If you set the ATLASSIAN_USER, ATLASSIAN_HOST, and ATLASSIAN_USER_TOKEN environment variables, you can omit the user, host, and user-token flags.
For the SCIM token and the directory-id values:
Atlassian provides these values when you set up an identity provider.
`,
MaxArgs: 2,
Discovery: []string{connection.DiscoveryOrganization},
Flags: []plugin.Flag{
{
Long: "admin-token",
Type: plugin.FlagType_String,
Default: "",
Desc: "Atlassian admin API token (used for Atlassian admin)",
},
{
Long: "host",
Type: plugin.FlagType_String,
Default: "",
Desc: "Atlassian hostname (e.g. https://example.atlassian.net)",
},
{
Long: "user",
Type: plugin.FlagType_String,
Default: "",
Desc: "Atlassian user name (e.g. example@example.com)",
},
{
Long: "user-token",
Type: plugin.FlagType_String,
Default: "",
Desc: "Atlassian user API token (used for Jira or Confluence)",
},
{
Long: "scim-token",
Type: plugin.FlagType_String,
Default: "",
Desc: "Atlassian SCIM API token (used for SCIM)",
},
},
},
},
AssetUrlTrees: []*inventory.AssetUrlBranch{
{
PathSegments: []string{"technology=saas", "provider=atlassian"},
Key: "kind",
Title: "Kind",
Values: map[string]*inventory.AssetUrlBranch{
"admin": nil,
"confluence": nil,
"jira": nil,
"scim": nil,
},
},
},
}