Don't return policy in provisioner JSON

pull/788/head
Herman Slatman 2 years ago
parent 2fbdf7d5b0
commit 628d7448de
No known key found for this signature in database
GPG Key ID: F4D8A44EA0A75A4F

@ -34,7 +34,7 @@ func ProtoJSON(r io.Reader, m proto.Message) error {
}
// ProtoJSONWithCheck reads JSON from the request body and stores it in the value
// pointed to by v.
// pointed to by v. Returns false if an error was written; true if not.
func ProtoJSONWithCheck(w http.ResponseWriter, r io.Reader, m proto.Message) bool {
data, err := io.ReadAll(r)
if err != nil {

@ -61,10 +61,10 @@ type X509Options struct {
TemplateData json.RawMessage `json:"templateData,omitempty"`
// AllowedNames contains the SANs the provisioner is authorized to sign
AllowedNames *policy.X509NameOptions
AllowedNames *policy.X509NameOptions `json:"-"`
// DeniedNames contains the SANs the provisioner is not authorized to sign
DeniedNames *policy.X509NameOptions
DeniedNames *policy.X509NameOptions `json:"-"`
}
// HasTemplate returns true if a template is defined in the provisioner options.

@ -37,10 +37,10 @@ type SSHOptions struct {
TemplateData json.RawMessage `json:"templateData,omitempty"`
// User contains SSH user certificate options.
User *policy.SSHUserCertificateOptions
User *policy.SSHUserCertificateOptions `json:"-"`
// Host contains SSH host certificate options.
Host *policy.SSHHostCertificateOptions
Host *policy.SSHHostCertificateOptions `json:"-"`
}
// GetAllowedUserNameOptions returns the SSHNameOptions that are

Loading…
Cancel
Save