Permalink
Switch branches/tags
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
188 lines (188 sloc) 5.74 KB
openapi: '3.0.0'
info:
version: '1.0.0'
title: 'Kyma Connector API'
paths:
/v1/remoteenvironments/{remoteEnvName}/tokens:
post:
parameters:
- in: path
name: remoteEnvName
description: 'Name of remote environment.'
required: true
schema:
type: string
tags:
- internal API
summary: 'Creates a token used for certificate signing flow.'
responses:
'201':
description: 'Successful operation.'
content:
application/json:
schema:
$ref: '#/components/schemas/tokenResponse'
'500':
description: 'Server error.'
content:
application/json:
schema:
$ref: '#/components/schemas/appError'
/v1/remoteenvironments/{remoteEnvName}/info:
get:
parameters:
- in: path
name: remoteEnvName
description: 'Name of remote environment.'
required: true
schema:
type: string
- in: query
name: token
description: 'Access Token fetched from /tokens endpoint.'
required: true
schema:
type: string
tags:
- external API
summary: 'Allows for fetching proper information for future CSR.'
responses:
'200':
description: 'Successful operation.'
content:
application/json:
schema:
$ref: '#/components/schemas/infoResponse'
'403':
description: 'Invalid token'
content:
application/json:
schema:
$ref: '#/components/schemas/appError'
'500':
description: 'Server error.'
content:
application/json:
schema:
$ref: '#/components/schemas/appError'
/v1/remoteenvironments/{remoteEnvName}/client-certs:
post:
parameters:
- in: path
name: remoteEnvName
description: 'Name of remote environment.'
required: true
schema:
type: string
- in: query
name: token
description: 'Access Token fetched from /tokens endpoint.'
required: true
schema:
type: string
tags:
- external API
summary: 'Signs CSR.'
requestBody:
description: 'The CSR to be signed'
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/csrRequest'
responses:
'201':
description: 'Successful operation.'
content:
application/json:
schema:
$ref: '#/components/schemas/csrResponse'
'400':
description: 'Improper subject values or lack of values in CSR.'
content:
application/json:
schema:
$ref: '#/components/schemas/appError'
'403':
description: 'Invalid token'
content:
application/json:
schema:
$ref: '#/components/schemas/appError'
'404':
description: 'Not found'
content:
application/json:
schema:
$ref: '#/components/schemas/appError'
'500':
description: 'Server error.'
content:
application/json:
schema:
$ref: '#/components/schemas/appError'
components:
schemas:
tokenResponse:
type: 'object'
properties:
url:
type: 'string'
example: 'https://cert-service.kyma.cluster.cx/v1/remoteenvironments/{remote-environment-name}/info?token=1edfc34g'
token:
type: 'string'
example: '1edfc34g'
cert:
type: 'object'
properties:
subject:
type: 'string'
example: 'OU=Test,O=Test,L=Blacksburg,ST=Virginia,C=US,CN={remote-environment-name}'
extensions:
type: 'string'
key-algorithm:
type: 'string'
example: 'rsa2048'
apiURLs:
type: 'object'
properties:
metadataUrl:
type: 'string'
example: 'gateway.wormhole.kyma.cluster.cx/{remote-environment-name}/v1/metadata/services'
eventsUrl:
type: 'string'
example: 'gateway.wormhole.kyma.cluster.cx/{remote-environment-name}/v1/events'
certificatesUrl:
type: 'string'
example: 'certificate-service.kyma.cluster.cx/v1/remoteenvironments/{remote-environment-name}'
infoResponse:
type: 'object'
properties:
url:
type: 'string'
example: 'https://cert-service.kyma.cluster.cx/v1/remoteenvironments/{remote-environment-name}/client-certs?token=1edfc34g'
api:
$ref: '#/components/schemas/apiURLs'
certificate:
$ref: '#/components/schemas/cert'
appError:
type: 'object'
properties:
code:
type: 'integer'
error:
type: 'string'
csrRequest:
type: 'object'
properties:
csr:
type: 'string'
description: 'Base64 encoded certificate signing request file.'
example: 'LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tDQpBTllfQ0VSVElGSUNBVEVfRklMRV9USElTX0lTX0pVU1RfQU5fRVhBTVBMRQ0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQ0K'
csrResponse:
type: 'object'
properties:
crt:
type: 'string'
description: 'Base64 encoded certificates chain.'
example: 'LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCkNMSUVOVCBDRVJUSUZJQ0FURSBGSUxFIChUSElTIElTIEpVU1QgQU4gRVhBTVBMRSkKLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQotLS0tLUJFR0lOIENFUlRJRklDQVRFLS0tLS0KU0VSVkVSIENFUlRJRklDQVRFIEZJTEUgKFRISVMgSVMgSlVTVCBBTiBFWEFNUExFKQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0t'