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 21, 2024
1 parent d2fbf0f commit 0d9e6a6
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 @@ -612,12 +612,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 @@ -832,12 +826,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 @@ -862,12 +850,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 @@ -894,12 +876,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 @@ -938,28 +914,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 @@ -1079,12 +1033,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 @@ -1128,29 +1076,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 @@ -1201,12 +1126,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 @@ -1479,12 +1398,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 @@ -1513,24 +1426,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 @@ -1553,29 +1448,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 @@ -1987,35 +1859,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 @@ -2301,56 +2144,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 @@ -4258,8 +4051,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 @@ -4346,10 +4137,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 @@ -4803,11 +4590,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 @@ -4965,35 +4747,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 0d9e6a6

Please sign in to comment.