| # | |
| # Licensed to the Apache Software Foundation (ASF) under one or more | |
| # contributor license agreements. See the NOTICE file distributed with | |
| # this work for additional information regarding copyright ownership. | |
| # The ASF licenses this file to You under the Apache License, Version 2.0 | |
| # (the "License"); you may not use this file except in compliance with | |
| # the License. You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, | |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| # See the License for the specific language governing permissions and | |
| # limitations under the License. | |
| # | |
| additionalProperties: false | |
| else: | |
| required: | |
| - key | |
| - cert | |
| if: | |
| properties: | |
| type: | |
| enum: | |
| - server | |
| then: | |
| oneOf: | |
| - required: | |
| - sni | |
| - key | |
| - cert | |
| - required: | |
| - snis | |
| - key | |
| - cert | |
| properties: | |
| snis: | |
| items: | |
| pattern: ^\*$|^\*?[0-9a-zA-Z-._\[\]:]+$ | |
| type: string | |
| minItems: 1 | |
| type: array | |
| update_time: | |
| type: integer | |
| readOnly: true | |
| ssl_protocols: | |
| items: | |
| enum: | |
| - TLSv1.1 | |
| - TLSv1.2 | |
| - TLSv1.3 | |
| maxItems: 3 | |
| description: set ssl protocols | |
| uniqueItems: true | |
| type: array | |
| key: | |
| $ref: ./PrivateKeyOrReference.yaml | |
| description: PEM-encoded private key or an APISIX secret/environment reference. | |
| create_time: | |
| type: integer | |
| readOnly: true | |
| labels: | |
| $ref: ./Labels.yaml | |
| status: | |
| default: 1 | |
| description: SSL status. | |
| enum: | |
| - 1 | |
| - 0 | |
| type: integer | |
| x-enumDescriptions: | |
| "0": Disabled. | |
| "1": Enabled (default). | |
| cert: | |
| $ref: ./CertificateOrReference.yaml | |
| description: PEM-encoded certificate or an APISIX secret/environment reference. | |
| client: | |
| required: | |
| - ca | |
| properties: | |
| ca: | |
| $ref: ./CertificateOrReference.yaml | |
| description: PEM-encoded CA certificate or an APISIX secret/environment reference. | |
| skip_mtls_uri_regex: | |
| uniqueItems: true | |
| minItems: 1 | |
| items: | |
| type: string | |
| description: uri regular expression to skip mtls | |
| type: array | |
| depth: | |
| default: 1 | |
| minimum: 0 | |
| type: integer | |
| type: object | |
| sni: | |
| pattern: ^\*$|^\*?[0-9a-zA-Z-._\[\]:]+$ | |
| type: string | |
| certs: | |
| items: | |
| $ref: ./CertificateOrReference.yaml | |
| type: array | |
| keys: | |
| items: | |
| $ref: ./PrivateKeyOrReference.yaml | |
| type: array | |
| id: | |
| $ref: ./ResourceId.yaml | |
| desc: | |
| maxLength: 256 | |
| type: string | |
| type: | |
| enum: | |
| - server | |
| - client | |
| description: Certificate type. | |
| default: server | |
| type: string | |
| x-enumDescriptions: | |
| server: HTTPS termination matched by SNI. | |
| client: Client certificate for mTLS with upstream services. | |
| type: object | |
| x-source: apisix/schema_def.lua |