diff options
Diffstat (limited to 'pkg/policy')
-rw-r--r-- | pkg/policy/node.go | 8 | ||||
-rw-r--r-- | pkg/policy/policy.go | 2 | ||||
-rw-r--r-- | pkg/policy/wildcard.go | 6 |
3 files changed, 8 insertions, 8 deletions
diff --git a/pkg/policy/node.go b/pkg/policy/node.go index 607dbc3..d933e7f 100644 --- a/pkg/policy/node.go +++ b/pkg/policy/node.go @@ -11,10 +11,10 @@ import ( ) type Node struct { - Name string `json:"name"` // Artbirary node name to authenticate - Secret string `json:"secret"` // Arbitrary node secret for authentication - URL string `json:"url"` // Where the node's submissions can be downloaded - Domains []string `json:"issues"` // Exact-match domain names allowed to be issued + Name string `json:"name"` // Artbirary node name to authenticate + Secret string `json:"secret"` // Arbitrary node secret for authentication + URL string `json:"location"` // Where the node's submissions can be downloaded + Domains []string `json:"requests"` // Exact-match domain names allowed to be issued key [16]byte } diff --git a/pkg/policy/policy.go b/pkg/policy/policy.go index 8ee4867..3c2fec2 100644 --- a/pkg/policy/policy.go +++ b/pkg/policy/policy.go @@ -10,7 +10,7 @@ import ( type Policy struct { Monitor Wildcards `json:"monitor"` - Nodes []Node `json:"nodes"` + Nodes []Node `json:"certificate_requesters"` // Optional StaticLogs []metadata.Log `json:"static_logs"` diff --git a/pkg/policy/wildcard.go b/pkg/policy/wildcard.go index c67e1d9..b0bdf61 100644 --- a/pkg/policy/wildcard.go +++ b/pkg/policy/wildcard.go @@ -38,7 +38,7 @@ func (w *Wildcards) match(sans []string, notAfter time.Time) bool { // 2. the certificate expired before the BootstrapAt timestamp. type Wildcard struct { BootstrapAt time.Time `json:"bootstrap_at"` - Wildcard string `json:"wildcard"` + Wildcard string `json:"suffix"` Excludes []string `json:"excludes,omitempty"` } @@ -52,10 +52,10 @@ func (w *Wildcard) UnmarshalJSON(data []byte) error { func (w *Wildcard) Validate() error { if w.BootstrapAt.IsZero() { - return fmt.Errorf("bootstrap time is required") + return fmt.Errorf("bootstrap_at is required") } if len(w.Wildcard) == 0 { - return fmt.Errorf("wildcard is required") + return fmt.Errorf("suffix is required") } return nil } |