1package v1
2
3import "time"
4
5// Order is a type to represent an Order with an ACME server
6#Order: {
7 _embeddedResource
8
9 // APIVersion defines the versioned schema of this representation of an object.
10 // Servers should convert recognized schemas to the latest internal value, and
11 // may reject unrecognized values.
12 // More info:
13 // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
14 apiVersion?: string
15
16 // Kind is a string value representing the REST resource this object represents.
17 // Servers may infer this from the endpoint the client submits requests to.
18 // Cannot be updated.
19 // In CamelCase.
20 // More info:
21 // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
22 kind?: string
23 metadata!: {}
24 spec!: {
25 // CommonName is the common name as specified on the DER encoded CSR.
26 // If specified, this value must also be present in `dnsNames` or `ipAddresses`.
27 // This field must match the corresponding field on the DER encoded CSR.
28 commonName?: string
29
30 // DNSNames is a list of DNS names that should be included as part of the Order
31 // validation process.
32 // This field must match the corresponding field on the DER encoded CSR.
33 dnsNames?: [...string]
34
35 // Duration is the duration for the not after date for the requested certificate.
36 // This is set on order creation as per the ACME spec.
37 duration?: string
38
39 // IPAddresses is a list of IP addresses that should be included as part of the Order
40 // validation process.
41 // This field must match the corresponding field on the DER encoded CSR.
42 ipAddresses?: [...string]
43
44 // IssuerRef references a properly configured ACME-type Issuer which should
45 // be used to create this Order.
46 // If the Issuer does not exist, processing will be retried.
47 // If the Issuer is not an 'ACME' Issuer, an error will be returned and the
48 // Order will be marked as failed.
49 issuerRef!: {
50 // Group of the issuer being referred to.
51 // Defaults to 'cert-manager.io'.
52 group?: string
53
54 // Kind of the issuer being referred to.
55 // Defaults to 'Issuer'.
56 kind?: string
57
58 // Name of the issuer being referred to.
59 name!: string
60 }
61
62 // Profile allows requesting a certificate profile from the ACME server.
63 // Supported profiles are listed by the server's ACME directory URL.
64 profile?: string
65
66 // Replaces is the ARI CertID (RFC 9773 ยง4.1) of the certificate that this
67 // Order is intended to replace. When set, cert-manager will include the
68 // "replaces" field on the newOrder request to the ACME server if and only
69 // if the server advertises ARI support in its directory. The CertID has
70 // the form "base64url(AKI).base64url(serial)" and is derived locally from
71 // the currently issued leaf certificate.
72 replaces?: string
73
74 // Certificate signing request bytes in DER encoding.
75 // This will be used when finalizing the order.
76 // This field must be set on the order.
77 request!: string
78 }
79 status?: {
80 // Authorizations contains data returned from the ACME server on what
81 // authorizations must be completed in order to validate the DNS names
82 // specified on the Order.
83 authorizations?: [...{
84 // Challenges specifies the challenge types offered by the ACME server.
85 // One of these challenge types will be selected when validating the DNS
86 // name and an appropriate Challenge resource will be created to perform
87 // the ACME challenge process.
88 challenges?: [...{
89 // Token is the token that must be presented for this challenge.
90 // This is used to compute the 'key' that must also be presented.
91 token!: string
92
93 // Type is the type of challenge being offered, e.g., 'http-01', 'dns-01',
94 // 'tls-sni-01', etc.
95 // This is the raw value retrieved from the ACME server.
96 // Only 'http-01' and 'dns-01' are supported by cert-manager, other values
97 // will be ignored.
98 type!: string
99
100 // URL is the URL of this challenge. It can be used to retrieve additional
101 // metadata about the Challenge from the ACME server.
102 url!: string
103 }]
104
105 // Identifier is the DNS name to be validated as part of this authorization
106 identifier?: string
107
108 // InitialState is the initial state of the ACME authorization when first
109 // fetched from the ACME server.
110 // If an Authorization is already 'valid', the Order controller will not
111 // create a Challenge resource for the authorization. This will occur when
112 // working with an ACME server that enables 'authz reuse' (such as Let's
113 // Encrypt's production endpoint).
114 // If not set and 'identifier' is set, the state is assumed to be pending
115 // and a Challenge will be created.
116 initialState?: "valid" | "ready" | "pending" | "processing" | "invalid" | "expired" | "errored"
117
118 // URL is the URL of the Authorization that must be completed
119 url!: string
120
121 // Wildcard will be true if this authorization is for a wildcard DNS name.
122 // If this is true, the identifier will be the *non-wildcard* version of
123 // the DNS name.
124 // For example, if '*.example.com' is the DNS name being validated, this
125 // field will be 'true' and the 'identifier' field will be 'example.com'.
126 wildcard?: bool
127 }]
128
129 // Certificate is a copy of the PEM encoded certificate for this Order.
130 // This field will be populated after the order has been successfully
131 // finalized with the ACME server, and the order has transitioned to the
132 // 'valid' state.
133 certificate?: string
134
135 // FailureTime stores the time that this order failed.
136 // This is used to influence garbage collection and back-off.
137 failureTime?: time.Time
138
139 // FinalizeURL of the Order.
140 // This is used to obtain certificates for this order once it has been completed.
141 finalizeURL?: string
142
143 // Reason optionally provides more information about a why the order is in
144 // the current state.
145 reason?: string
146
147 // State contains the current state of this Order resource.
148 // States 'success' and 'expired' are 'final'
149 state?: "valid" | "ready" | "pending" | "processing" | "invalid" | "expired" | "errored"
150
151 // URL of the Order.
152 // This will initially be empty when the resource is first created.
153 // The Order controller will populate this field when the Order is first processed.
154 // This field will be immutable after it is initially set.
155 url?: string
156 }
157
158 _embeddedResource: {
159 apiVersion!: string
160 kind!: string
161 metadata?: {...}
162 }
163 apiVersion: "acme.cert-manager.io/v1"
164 kind: "Order"
165 metadata!: {
166 name!: string
167 namespace!: string
168 labels?: [string]: string
169 annotations?: [string]: string
170 ...
171 }
172}