diff --git a/docs/v3/openapi.json b/docs/v3/openapi.json index 9f6229c44..e4975d47f 100644 --- a/docs/v3/openapi.json +++ b/docs/v3/openapi.json @@ -6409,7 +6409,7 @@ "patch": { "summary": "Add a system to a template", "description": "Add a system authenticated by its client identity certificate to a template", - "operationId": "addTemplateSystem", + "operationId": "addTemplateSubscribedSystem", "parameters": [ { "name": "template_id", @@ -6421,17 +6421,6 @@ } } ], - "requestBody": { - "description": "Request body", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/controllers.TemplateSystemsUpdateRequest" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", @@ -6472,8 +6461,7 @@ { "RhIdentity": [] } - ], - "x-codegen-request-body-name": "body" + ] } }, "/templates/{template_id}/systems": { diff --git a/manager/controllers/template_subscribed_systems_update.go b/manager/controllers/template_subscribed_systems_update.go index 8ae418863..71feadaed 100644 --- a/manager/controllers/template_subscribed_systems_update.go +++ b/manager/controllers/template_subscribed_systems_update.go @@ -14,11 +14,10 @@ import ( // @Summary Add a system to a template // @Description Add a system authenticated by its client identity certificate to a template -// @ID addTemplateSystem +// @ID addTemplateSubscribedSystem // @Security RhIdentity // @Accept json // @Produce json -// @Param body body TemplateSystemsUpdateRequest true "Request body" // @Param template_id path string true "Template ID" // @Success 200 // @Failure 400 {object} utils.ErrorResponse diff --git a/manager/middlewares/authentication.go b/manager/middlewares/authentication.go index f0f30447a..a7d262807 100644 --- a/manager/middlewares/authentication.go +++ b/manager/middlewares/authentication.go @@ -134,7 +134,7 @@ func SystemCertAuthenticator() gin.HandlerFunc { slices.Contains(validSystemCertTypes, xrhid.Identity.System.CertType) && findAccount(c, xrhid.Identity.OrgID)) { c.AbortWithStatusJSON(http.StatusUnauthorized, - utils.ErrorResponse{Error: "Invalid x-rh-identity system header"}) + utils.ErrorResponse{Error: "Invalid system identity header"}) return } c.Set(utils.KeySystem, xrhid.Identity.System.CommonName)