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

Đang mở
#4,434 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
38/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
go
Lĩnh vực
api

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
Go
Star
85
Fork
142
Merge trung bình
1 ngày 7 giờ
Pull request đã merge (30 ngày)
255

Chuẩn bị môi trường

  • Không có Dockerfile hay tệp Docker Compose
  • Có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của wso2/api-platform

Tất cả issue của wso2/api-platform

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.