[Bug] Subscriptions Created via the Gateway Controller Management API Are Revoked After Gateway Redeployment

Abierto
#4,434 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
38/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
go
Área
api

Línea de trabajo

Start by reproducing the steps: create a subscription through POST /api/management/v1/subscriptions, confirm it appears in GET /rest-apis/subscriptions, then restart the Gateway Controller. The issue names no source files, so you will need to find where subscriptions are stored and whether that store is reloaded on startup. Done when subscriptions created through the management API still return 200 OK after a restart and GET /rest-apis/subscriptions lists them.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Aspect/API Severity/Critical Type/Bug
Please select the area the issue is related to

Gateway

Please select the aspect the issue is related to

Aspect/API (API backends, definitions, contracts, interfaces, OpenAPI)

Description

When testing application-based subscriptions through the Gateway Controller Management REST API, we observed that the created subscriptions are lost whenever the Gateway cluster is redeployed.

For example, we create a subscription using the following API:

The subscription is successfully created and available while the Gateway cluster is running. However, after redeploying the Gateway cluster, the previously created subscriptions are no longer available.

Steps to Reproduce
  1. Start a Gateway connected to the Platform API with the API Portal enabled.
  2. Deploy a sample API.
  3. Create an application-based subscription using the Gateway Controller Management REST API:
curl --location 'https://localhost:9090/api/management/v1/subscriptions' \
--header 'Authorization: Basic base64_admin_pass' \
--header 'Content-Type: application/json' \
--data '{
  "apiId": "",
  "subscriptionPlanId": "",
  "subscriptionToken": "",
  "applicationId": ""
}'
  1. Verify that:

    • GET /rest-apis/subscriptions returns the newly created subscription.
    • Requests to the subscribed API are successful and return HTTP 200 OK.
  2. Restart the Gateway Controller

  3. After the restart, verify that:

  • Requests to the previously subscribed API return HTTP 403 Forbidden.
  • GET /rest-apis/subscriptions returns zero subscriptions.
Severity Level of the Issue

Severity/Critical (Core functionality is broken but there is a workaround. Need urgent attention)

Environment Details (with versions)

No response

Lenguaje dominante
Go
Estrellas
85
Forks
142
Merge medio
1 d 7 h
PR fusionados (30 d)
255

Preparar el entorno

  • Sin Dockerfile ni archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de wso2/api-platform

Todos los issues de wso2/api-platform

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.