aboutsummaryrefslogtreecommitdiff
path: root/pkg/policy
diff options
context:
space:
mode:
authorRasmus Dahlberg <rasmus@rgdd.se>2024-06-01 15:35:45 +0200
committerRasmus Dahlberg <rasmus@rgdd.se>2024-06-02 13:04:04 +0200
commit62f94ac6a1404834ac6f0723ef57e25fcd5e67f9 (patch)
tree5a70ce3dec39229d37816dafed0d944016c1dd54 /pkg/policy
parent279de6a1195adb739a8d1f2afb445b68793b28b8 (diff)
Improve terminology and documentationmain
Diffstat (limited to 'pkg/policy')
-rw-r--r--pkg/policy/node.go8
-rw-r--r--pkg/policy/policy.go2
-rw-r--r--pkg/policy/wildcard.go6
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
}