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

API: IP Blacklisting on workspaces #127

Open
rajdip-b opened this issue Feb 8, 2024 · 10 comments
Open

API: IP Blacklisting on workspaces #127

rajdip-b opened this issue Feb 8, 2024 · 10 comments
Labels
difficulty: 3 foss hack Clustering all the curated issues for Foss Hack 2024 good first issue Good for newcomers priority: medium scope: api Everything related to the API type: enhancement New feature or request
Milestone

Comments

@rajdip-b
Copy link
Member

rajdip-b commented Feb 8, 2024

Description

Add a feature that will enforce security of the workspaces by blocking users from accessing it if their IP addresses are in the blacklist. We would support both IPv4 and IPv6 address blacklisting. Workspace administrators would be able to update the blacklist of the workspaces.

Solution

  • Update the workspace schema to hold a list of blacklisted IP addresses
  • Create a guard that will run only if: the user is authenticated, they are trying to access a workspace or related resources. If the user's IP address is blacklisted, we don't allow them to access it by throwing an unauthorized exception
@rajdip-b rajdip-b added type: enhancement New feature or request good first issue Good for newcomers scope: api Everything related to the API labels Feb 8, 2024
@rajdip-b rajdip-b added this to the Release v2 milestone Feb 8, 2024
@rajdip-b rajdip-b moved this to Todo in keyshade-api Feb 8, 2024
@rajdip-b
Copy link
Member Author

@rajdip-b rajdip-b added difficulty: 3 foss hack Clustering all the curated issues for Foss Hack 2024 labels Jun 6, 2024
@Z-xus
Copy link
Contributor

Z-xus commented Jul 18, 2024

/attempt for fosshack

Copy link

Assigned the issue to @Z-xus!

@rajdip-b rajdip-b moved this from Todo to In progress in keyshade-api Jul 18, 2024
@MelloB1989
Copy link

Hey I am Kartik Deshmukh. I am one of the participants in the FOSS Hack. We want to contribute to this issue and I feel confident my contribution will help!
/attempt

@rajdip-b
Copy link
Member Author

@MelloB1989 hello! Please make sure that no one's assigned to the issue before you try to get assigned since that's against the guidelines for this hackathon.

@Z-xus
Copy link
Contributor

Z-xus commented Jul 26, 2024

Hi, I have created the guard and schema, I wanted to know which controller methods require the guard and also do you need another controller method to update the blacklistedIps[] or just a service method?

@rajdip-b
Copy link
Member Author

Hi, I have created the guard and schema, I wanted to know which controller methods require the guard and also do you need another controller method to update the blacklistedIps[] or just a service method?

We would need a separate guard that will work on every endpoint related to workspaces. And yes, we want to allow another endpoint that would allow workspace admins to update the blacklisted IP addresses. Ideally, this should be in workspace controller.

@rajdip-b rajdip-b changed the title IP Blacklisting on workspaces API: IP Blacklisting on workspaces Nov 5, 2024
@rajdip-b
Copy link
Member Author

rajdip-b commented Nov 5, 2024

@Z-xus you still on this?

@Z-xus
Copy link
Contributor

Z-xus commented Nov 15, 2024

Sorry, I loved working here but I can't spare the time to do so anymore..

@Z-xus Z-xus removed their assignment Nov 15, 2024
@rajdip-b
Copy link
Member Author

Ah man, that's sad. It's okay. We would be glad to have you back dropping more PRs when you can! Appreciate all the help that you have been so far.

@rajdip-b rajdip-b moved this from In progress to Todo in keyshade-api Nov 17, 2024
@rajdip-b rajdip-b moved this from Todo to Backlog in keyshade-api Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty: 3 foss hack Clustering all the curated issues for Foss Hack 2024 good first issue Good for newcomers priority: medium scope: api Everything related to the API type: enhancement New feature or request
Projects
Status: Backlog
Development

No branches or pull requests

3 participants