Change JWT Auth to Middleware Handler

Caveat: Cache is per endpoint
This commit is contained in:
2024-06-26 05:31:28 +02:00
parent 826658f762
commit 6d5594a376
7 changed files with 120 additions and 147 deletions

View File

@@ -17,30 +17,32 @@
"host": "localhost:8082",
"basePath": "/api/",
"paths": {
"/clusters/": {
"get": {
"/debug/": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Write metrics to store",
"produces": [
"application/json"
],
"tags": [
"free"
"debug"
],
"summary": "Debug endpoint",
"parameters": [
{
"type": "string",
"description": "up to timestamp",
"name": "to",
"description": "Selector",
"name": "selector",
"in": "query"
}
],
"responses": {
"200": {
"description": "ok",
"description": "Debug dump",
"schema": {
"type": "string"
}
@@ -72,32 +74,30 @@
}
}
},
"/debug/": {
"post": {
"/free/": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Write metrics to store",
"produces": [
"application/json"
],
"tags": [
"write"
"free"
],
"summary": "Debug endpoint",
"parameters": [
{
"type": "string",
"description": "Job Cluster",
"name": "selector",
"description": "up to timestamp",
"name": "to",
"in": "query"
}
],
"responses": {
"200": {
"description": "Debug dump",
"description": "ok",
"schema": {
"type": "string"
}

View File

@@ -100,7 +100,43 @@ info:
title: cc-metric-store REST API
version: 1.0.0
paths:
/clusters/:
/debug/:
post:
description: Write metrics to store
parameters:
- description: Selector
in: query
name: selector
type: string
produces:
- application/json
responses:
"200":
description: Debug dump
schema:
type: string
"400":
description: Bad Request
schema:
$ref: '#/definitions/api.ErrorResponse'
"401":
description: Unauthorized
schema:
$ref: '#/definitions/api.ErrorResponse'
"403":
description: Forbidden
schema:
$ref: '#/definitions/api.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/api.ErrorResponse'
security:
- ApiKeyAuth: []
summary: Debug endpoint
tags:
- debug
/free/:
get:
parameters:
- description: up to timestamp
@@ -134,42 +170,6 @@ paths:
- ApiKeyAuth: []
tags:
- free
/debug/:
post:
description: Write metrics to store
parameters:
- description: Job Cluster
in: query
name: selector
type: string
produces:
- application/json
responses:
"200":
description: Debug dump
schema:
type: string
"400":
description: Bad Request
schema:
$ref: '#/definitions/api.ErrorResponse'
"401":
description: Unauthorized
schema:
$ref: '#/definitions/api.ErrorResponse'
"403":
description: Forbidden
schema:
$ref: '#/definitions/api.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/api.ErrorResponse'
security:
- ApiKeyAuth: []
summary: Debug endpoint
tags:
- write
/query/:
get:
consumes: