Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve API Security by Implementing Authentication in the next stage #53

Open
YuechengHao626 opened this issue Sep 30, 2024 · 0 comments
Labels
warning warning

Comments

@YuechengHao626
Copy link
Contributor

Description:

Currently, because we are on the beginning stage, the project does not implement any authentication or authorization mechanisms for the API. API requests are solely based on userId to fetch data. While this approach may suffice for the initial phase of development, as the project scales and sensitive or private data is exposed through the API, this method poses significant security risks.

By relying only on userId to access API data, the system lacks a robust security layer, making it vulnerable to several potential attacks, including unauthorized access, data exposure, and exploitation of user data.

Current Scenario:

API Access via userId:
Currently, the API requests require only the userId as a parameter to fetch data, without any form of authentication or token validation.

Risk:

Lack of Identity Verification: Without authentication, anyone who can guess or obtain a userId can potentially access that user's data.

Lack of Access Control: There is no control over which users can access which endpoints, leaving the API open to abuse or misuse.

Potential Data Exposure: As more sensitive data is exposed via the API (such as personal information, payment data, etc.), the risk of unauthorized access increases significantly.

Proposed Solution:

Implement Authentication:
JWT (JSON Web Token): Use JWT as the primary mechanism for securing API requests. JWT allows you to authenticate users and ensure that only authorized users can access certain endpoints.

@YuechengHao626 YuechengHao626 added the warning warning label Sep 30, 2024
@YuechengHao626 YuechengHao626 changed the title Improve API Security by Implementing Authentication (Consider JWT) Improve API Security by Implementing Authentication in the next stage (Consider JWT) Sep 30, 2024
@YuechengHao626 YuechengHao626 changed the title Improve API Security by Implementing Authentication in the next stage (Consider JWT) Improve API Security by Implementing Authentication in the next stage Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
warning warning
Projects
Status: Todo
Development

No branches or pull requests

1 participant