-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable generated items for more auth methods #7513
Changes from 67 commits
3b362cf
c1674de
a018669
ff30535
f6c5d83
af7639e
6fbc18b
69be01c
5078fd8
200210e
9e503d0
b80d10e
54f8568
bbc4824
f7caf20
c8dbec2
b1803ed
1666872
3e468e4
4851bb5
0791598
f8fc768
9d05de0
4555e66
80eff2d
254d495
66b8f9f
6ce2e04
4a096ae
68ba6e9
ed6a07a
3984b66
2efd7dd
8c58198
40d4f42
cde6b56
cc3d6e7
fe570f4
c6f90ad
8763d2d
197b2ef
685ec87
d6a6667
00d7e2a
accca31
797a127
eb00a9c
7c8c8ca
050d08b
e4f0b58
bed1949
b102a33
db081ac
0de5c4d
e932a61
bde3887
624c00d
41a4fc5
10a1cc7
8fe2f93
8aee523
3a5b559
8df98e6
8dc6c98
7374206
84ddaab
75c461e
47b44b9
31bcd09
a25301c
5797336
34db27d
d3f797b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,10 @@ func pathListCerts(b *backend) *framework.Path { | |
|
||
HelpSynopsis: pathCertHelpSyn, | ||
HelpDescription: pathCertHelpDesc, | ||
DisplayAttrs: &framework.DisplayAttributes{ | ||
Navigation: true, | ||
ItemType: "Certificate", | ||
}, | ||
} | ||
} | ||
|
||
|
@@ -39,6 +43,9 @@ func pathCerts(b *backend) *framework.Path { | |
Type: framework.TypeString, | ||
Description: `The public certificate that should be trusted. | ||
Must be x509 PEM encoded.`, | ||
DisplayAttrs: &framework.DisplayAttributes{ | ||
EditType: "file", | ||
andaley marked this conversation as resolved.
Show resolved
Hide resolved
|
||
}, | ||
}, | ||
|
||
"allowed_names": &framework.FieldSchema{ | ||
|
@@ -47,36 +54,57 @@ Must be x509 PEM encoded.`, | |
At least one must exist in either the Common Name or SANs. Supports globbing. | ||
This parameter is deprecated, please use allowed_common_names, allowed_dns_sans, | ||
allowed_email_sans, allowed_uri_sans.`, | ||
DisplayAttrs: &framework.DisplayAttributes{ | ||
Group: "Constraints", | ||
}, | ||
}, | ||
|
||
"allowed_common_names": &framework.FieldSchema{ | ||
Type: framework.TypeCommaStringSlice, | ||
Description: `A comma-separated list of names. | ||
At least one must exist in the Common Name. Supports globbing.`, | ||
DisplayAttrs: &framework.DisplayAttributes{ | ||
Group: "Constraints", | ||
}, | ||
}, | ||
|
||
"allowed_dns_sans": &framework.FieldSchema{ | ||
Type: framework.TypeCommaStringSlice, | ||
Description: `A comma-separated list of DNS names. | ||
At least one must exist in the SANs. Supports globbing.`, | ||
DisplayAttrs: &framework.DisplayAttributes{ | ||
Name: "Allowed DNS SANs", | ||
Group: "Constraints", | ||
}, | ||
}, | ||
|
||
"allowed_email_sans": &framework.FieldSchema{ | ||
Type: framework.TypeCommaStringSlice, | ||
Description: `A comma-separated list of Email Addresses. | ||
At least one must exist in the SANs. Supports globbing.`, | ||
DisplayAttrs: &framework.DisplayAttributes{ | ||
Name: "Allowed Email SANs", | ||
Group: "Constraints", | ||
}, | ||
}, | ||
|
||
"allowed_uri_sans": &framework.FieldSchema{ | ||
Type: framework.TypeCommaStringSlice, | ||
Description: `A comma-separated list of URIs. | ||
At least one must exist in the SANs. Supports globbing.`, | ||
DisplayAttrs: &framework.DisplayAttributes{ | ||
Name: "Allowed URI SANs", | ||
Group: "Constraints", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
}, | ||
}, | ||
|
||
"allowed_organizational_units": &framework.FieldSchema{ | ||
Type: framework.TypeCommaStringSlice, | ||
Description: `A comma-separated list of Organizational Units names. | ||
At least one must exist in the OU field.`, | ||
DisplayAttrs: &framework.DisplayAttributes{ | ||
Group: "Constraints", | ||
}, | ||
}, | ||
|
||
"required_extensions": &framework.FieldSchema{ | ||
|
@@ -137,6 +165,10 @@ certificate.`, | |
|
||
HelpSynopsis: pathCertHelpSyn, | ||
HelpDescription: pathCertHelpDesc, | ||
DisplayAttrs: &framework.DisplayAttributes{ | ||
Action: "Create", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
ItemType: "Certificate", | ||
}, | ||
} | ||
|
||
tokenutil.AddTokenFields(p.Fields) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -173,11 +173,18 @@ type DisplayAttributes struct { | |
// Navigation indicates that the path should be available as a navigation tab | ||
Navigation bool `json:"navigation,omitempty"` | ||
|
||
// ItemType is the type of item this path operates on | ||
ItemType string `json:"itemType,omitempty"` | ||
|
||
// Group is the suggested UI group to place this field in. | ||
Group string `json:"group,omitempty"` | ||
|
||
// Action is the verb to use for the operation. | ||
Action string `json:"action,omitempty"` | ||
|
||
// EditType is the type of form field needed for a property | ||
// e.g. "textarea" or "file" | ||
EditType string `json:"editType,omitempty"` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. these are all of the available keys for the https://github.com/hashicorp/vault/blob/master/sdk/framework/path.go#L169-L196 |
||
} | ||
|
||
// RequestExample is example of request data. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this boolean describes whether the item should have a tab in the navigation: