juspay / hyperswitch

An open source payments switch written in Rust to make payments fast, reliable and affordable
https://hyperswitch.io/
Apache License 2.0
12.2k stars 1.3k forks source link

[FIX] Aggregate API for refunds to use JWT authentication only, removing API Key auth #5989

Open apoorvdixit88 opened 2 weeks ago

apoorvdixit88 commented 2 weeks ago

Feature Description

Refactor /refunds/aggregate API to use JWT authentication only, removing API Key auth

The /refunds/aggregate API is meant for internal use only and should not be accessible via API Key authentication. It should be secured using JWT authentication exclusively, as it is not intended to be used by merchants.

Current Behavior:

Possible Implementation

The route function get_refunds_aggregates should be modified to remove API Key authentication and ensure that only JWT auth is applied.

The route function

pub async fn get_refunds_aggregates(
    state: web::Data<AppState>,
    req: HttpRequest,
    query_params: web::Query<common_utils::types::TimeRange>,
) -> HttpResponse

Hint: Additional context can be taken from paymets aggregate function.

Have you spent some time checking if this feature request has been raised before?

Submission Process:

Refer here for Terms and conditions for the contest.

sangram-mkj-01 commented 1 week ago

Hi, can you assign me to this issue?

gorakhnathy7 commented 1 week ago

Hey @sangram-mkj-01 you had requested for another issue earlier, which has been assigned to you. Kindly let me know, once that is done, i can assign another one to you!

jayantp2003 commented 3 hours ago

I would like to work on this issue.