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

Aperta
#4,434 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
38/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
go
Ambito
api

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
Go
Stelle
85
Fork
142
Merge medio
1g 7h
PR unite (30g)
255

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di wso2/api-platform

Tutte le issue di wso2/api-platform

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.