Don't return policy in provisioner JSON

This commit is contained in:
Herman Slatman 2022-03-30 15:20:38 +02:00
parent 2fbdf7d5b0
commit 628d7448de
No known key found for this signature in database
GPG key ID: F4D8A44EA0A75A4F
3 changed files with 5 additions and 5 deletions

View file

@ -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 {

View file

@ -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.

View file

@ -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