Skip to content

Commit

Permalink
Remove test token feature
Browse files Browse the repository at this point in the history
  • Loading branch information
barreiro committed Oct 17, 2024
1 parent 90da37d commit ec91d5e
Show file tree
Hide file tree
Showing 53 changed files with 197 additions and 1,608 deletions.
247 changes: 0 additions & 247 deletions docs/site/content/en/openapi/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -609,12 +609,6 @@ paths:
schema:
$ref: "#/components/schemas/Access"
example: 0
- name: token
in: query
description: Horreum internal token. Incompatible with Keycloak
schema:
type: string
example: 094678029a2aaf9a2847502273099bb3a1b2338c2b9c618ed09aef0181666e38
- name: schema
in: query
description: Schema URI
Expand Down Expand Up @@ -829,12 +823,6 @@ paths:
schema:
$ref: "#/components/schemas/Access"
example: 0
- name: token
in: query
description: API token
schema:
type: string
example: 094678029a2aaf9a2847502273099bb3a1b2338c2b9c618ed09aef0181666e38
requestBody:
content:
application/json:
Expand All @@ -859,12 +847,6 @@ paths:
format: int32
type: integer
example: 202
- name: token
in: query
description: Run API token
schema:
type: string
example: 094678029a2aaf9a2847502273099bb3a1b2338c2b9c618ed09aef0181666e38
responses:
"404":
description: If no Run have been found with the given id
Expand All @@ -891,12 +873,6 @@ paths:
format: int32
type: integer
example: 202
- name: token
in: query
description: Run API token
schema:
type: string
example: 094678029a2aaf9a2847502273099bb3a1b2338c2b9c618ed09aef0181666e38
- name: schemaUri
in: query
description: FIlter by Schmea URI
Expand Down Expand Up @@ -935,28 +911,6 @@ paths:
responses:
"201":
description: Created
/api/run/{id}/dropToken:
post:
tags:
- Run
description: Remove access token for Run
operationId: dropToken
parameters:
- name: id
in: path
description: Token ID
required: true
schema:
format: int32
type: integer
example: 102
responses:
"200":
description: OK
content:
application/json:
schema:
type: string
/api/run/{id}/labelValues:
get:
tags:
Expand Down Expand Up @@ -1076,12 +1030,6 @@ paths:
format: int32
type: integer
example: 202
- name: token
in: query
description: Run API token
schema:
type: string
example: 094678029a2aaf9a2847502273099bb3a1b2338c2b9c618ed09aef0181666e38
- name: schemaUri
in: query
description: Filter by Schmea URI
Expand Down Expand Up @@ -1125,29 +1073,6 @@ paths:
- 101
- 102
- 103
/api/run/{id}/resetToken:
post:
tags:
- Run
description: Regenerate access token for Run
operationId: resetToken
parameters:
- name: id
in: path
description: Token ID
required: true
schema:
format: int32
type: integer
example: 102
responses:
"200":
description: OK
content:
application/json:
schema:
type: string
example: 094678029a2aaf9a2847502273099bb3a1b2338c2b9c618ed09aef0181666e38
/api/run/{id}/schema:
post:
tags:
Expand Down Expand Up @@ -1198,12 +1123,6 @@ paths:
format: int32
type: integer
example: 202
- name: token
in: query
description: Run API token
schema:
type: string
example: 094678029a2aaf9a2847502273099bb3a1b2338c2b9c618ed09aef0181666e38
responses:
"404":
description: If no Run have been found with the given id
Expand Down Expand Up @@ -1476,12 +1395,6 @@ paths:
format: int32
type: integer
example: 101
- name: token
in: query
description: API token for authorization
schema:
type: string
example: 101
responses:
"404":
description: No Schema with the given id was found
Expand Down Expand Up @@ -1510,24 +1423,6 @@ paths:
responses:
"204":
description: No Content
/api/schema/{id}/dropToken:
delete:
tags:
- Schema
description: Remove access token for schema
operationId: dropToken
parameters:
- name: id
in: path
description: Token ID
required: true
schema:
format: int32
type: integer
example: 102
responses:
"204":
description: No Content
/api/schema/{id}/export:
get:
tags:
Expand All @@ -1550,29 +1445,6 @@ paths:
application/json:
schema:
$ref: "#/components/schemas/SchemaExport"
/api/schema/{id}/resetToken:
post:
tags:
- Schema
description: Regenerate access token for schema
operationId: resetToken
parameters:
- name: id
in: path
description: Token ID
required: true
schema:
format: int32
type: integer
example: 102
responses:
"200":
description: OK
content:
application/json:
schema:
type: string
example: 094678029a2aaf9a2847502273099bb3a1b2338c2b9c618ed09aef0181666e38
/api/schema/{id}/updateAccess:
post:
tags:
Expand Down Expand Up @@ -1984,35 +1856,6 @@ paths:
responses:
"204":
description: No Content
/api/test/{id}/addToken:
post:
tags:
- Test
description: "Add a Test API Token for access to provide access to a test data\
\ for integrated tooling, e.g. reporting services"
operationId: addToken
parameters:
- name: id
in: path
description: ID of test to add token to
required: true
schema:
format: int32
type: integer
example: 101
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/TestToken"
responses:
"200":
description: OK
content:
application/json:
schema:
format: int32
type: integer
/api/test/{id}/export:
get:
tags:
Expand Down Expand Up @@ -2298,56 +2141,6 @@ paths:
responses:
"201":
description: Created
/api/test/{id}/revokeToken/{tokenId}:
delete:
tags:
- Test
description: Revoke a Token defined for a Test
operationId: dropToken
parameters:
- name: id
in: path
description: Test ID to revoke token
required: true
schema:
format: int32
type: integer
example: 101
- name: tokenId
in: path
description: ID of token to revoke
required: true
schema:
format: int32
type: integer
example: 202
responses:
"204":
description: No Content
/api/test/{id}/tokens:
get:
tags:
- Test
description: A collection of Test Tokens for a given Test
operationId: tokens
parameters:
- name: id
in: path
description: ID of test to retrieve list of tokens
required: true
schema:
format: int32
type: integer
example: 101
responses:
"200":
description: OK
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/TestToken"
/api/test/{id}/transformers:
post:
tags:
Expand Down Expand Up @@ -3887,8 +3680,6 @@ components:
description: test ID run relates to
type: integer
example: 101
token:
type: string
testname:
description: test ID run relates to
type: string
Expand Down Expand Up @@ -3975,10 +3766,6 @@ components:
, \"$id\": \"https://example.com/product.schema.json\", \"title\": \"\
Product\", \"description\": \"A product in the catalog\", \"type\":\
\ \"object\"}"
token:
description: Array of API tokens associated with test
type: string
example: ""
SchemaDescriptor:
required:
- id
Expand Down Expand Up @@ -4432,11 +4219,6 @@ components:
format: int32
description: backend ID for backing datastore
type: integer
tokens:
description: Array of API tokens associated with test
type: array
items:
$ref: "#/components/schemas/TestToken"
timelineLabels:
description: List of label names that are used for determining metric to
use as the time series
Expand Down Expand Up @@ -4594,35 +4376,6 @@ components:
description: Datastore id
type: integer
example: 1
TestToken:
required:
- id
- value
- permissions
- description
type: object
properties:
id:
format: int32
description: Unique Token id
type: integer
example: 101
testId:
format: int32
description: Test ID to apply Token
type: integer
example: 201
value:
description: Test value
type: string
example: 094678029a2aaf9a2847502273099bb3a1b2338c2b9c618ed09aef0181666e38
permissions:
format: int32
type: integer
description:
description: Token description
type: string
example: my reporting service token
TransformationLog:
description: Transformation Log
required:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ public class Schema extends ProtectedType {
"}")
public JsonNode schema;

@org.eclipse.microprofile.openapi.annotations.media.Schema(description = "Array of API tokens associated with test", example = "")
public String token;

public Schema() {
access = Access.PUBLIC;
}
Expand All @@ -48,7 +45,6 @@ public Schema(Schema s) {
this.name = s.name;
this.description = s.description;
this.schema = s.schema;
this.token = s.token;
this.access = s.access;
this.owner = s.owner;
}
Expand Down
Loading

0 comments on commit ec91d5e

Please sign in to comment.