openapi: 3.1.0 info: title: Tournament activity security-credentials API description: CrunchDAO Tournament Platform API Endpoints version: v2 servers: - url: http://api.hub.crunchdao.com description: Generated server url security: [] tags: - name: security-credentials paths: /v1/security-credentials/tls/issue-certificate: x-service-id: competition-service post: tags: - security-credentials summary: Show the authority certificate. operationId: issueTlsCertificate requestBody: content: application/json: schema: $ref: '#/components/schemas/IssueTlsCertificateForm' required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/IssuedTlsCertificate' /v1/competitions/{competitionIdentifier}/projects/{userLogin}/{projectIdentifier}/security-credentials: x-service-id: competition-service post: tags: - security-credentials summary: Create a security credentials. operationId: createSecurityCredentials parameters: - name: competitionIdentifier in: path required: true style: simple explode: false schema: type: string - name: userLogin in: path required: true style: simple explode: false schema: type: string - name: projectIdentifier in: path required: true style: simple explode: false schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/SecurityCredentialsCreateForm' required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/SecurityCredentials' security: - accessToken: [] - apiKey: [] ? /v1/competitions/{competitionIdentifier}/projects/{userLogin}/{projectIdentifier}/security-credentials/{securityCredentialsId} : x-service-id: competition-service patch: tags: - security-credentials summary: Show a security credentials. operationId: updateSecurityCredentials parameters: - name: competitionIdentifier in: path required: true style: simple explode: false schema: type: string - name: userLogin in: path required: true style: simple explode: false schema: type: string - name: projectIdentifier in: path required: true style: simple explode: false schema: type: string - name: securityCredentialsId in: path required: true style: simple explode: false schema: type: integer format: int64 requestBody: content: application/json: schema: $ref: '#/components/schemas/SecurityCredentialsUpdateForm' required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/SecurityCredentials' security: - accessToken: [] - apiKey: [] /v1/security-credentials/authority: x-service-id: competition-service get: tags: - security-credentials summary: Show the authority certificate. operationId: getAuthorityCredentials responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/AuthorityCredentials' components: schemas: IssueTlsCertificateForm: type: object properties: tlsPublicKeyPemString: type: string commonName: type: string isClient: type: boolean isServer: type: boolean sanDns: type: string daysValid: type: integer format: int32 required: - commonName - daysValid - isClient - isServer - sanDns - tlsPublicKeyPemString SecurityCredentialsCreateForm: type: object properties: hotKey: type: string cruncherWalletPublicKey: type: string required: - cruncherWalletPublicKey - hotKey SecurityCredentials: type: object properties: id: type: integer format: int64 description: For now, same as `projectId`. projectId: type: integer format: int64 description: The ID of the project this security credentials belong to. certificatePublicKey: type: string description: The public key of the certificate used for signing. hotKey: type: string description: The hot key used for signing the message. cruncherWalletPublicKey: type: string description: The cruncher's wallet owning the hot key. message: type: string description: The message to be signed. signed: type: boolean description: Is the message signed? signedAt: type: string format: date-time description: When was the message signed. `null` if not yet signed. signature: type: string description: The signature of the message. `null` if not yet signed. createdAt: type: string format: date-time description: When was the entity created. IssuedTlsCertificate: type: object properties: authorityCertificatePemString: type: string description: The authority certificate. tlsCertificatePemString: type: string description: The issued tls certificate. SecurityCredentialsUpdateForm: type: object properties: signature: type: string required: - signature AuthorityCredentials: type: object properties: certificatePemString: type: string description: The authority certificate used for signing other credentials. securitySchemes: apiKey: type: apiKey name: apiKey in: query scheme: token accessToken: type: http in: header scheme: Bearer externalDocs: description: docs.crunchdao.com url: https://docs.crunchdao.com