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

Make rocket-authz middleware #93

Closed
hsluoyz opened this issue Apr 7, 2020 · 24 comments
Closed

Make rocket-authz middleware #93

hsluoyz opened this issue Apr 7, 2020 · 24 comments
Assignees
Labels
enhancement New feature or request

Comments

@hsluoyz
Copy link
Member

hsluoyz commented Apr 7, 2020

Rocket is one of the top web frameworks in Rust. We already made a Actix middleware (#92) but haven't got a Rocket one.

I think this demo (https://github.com/oiatz/Rocket_Casbin_Demo) is not enough. We will need a full-fledged rocket-authz middleware here: https://github.com/casbin-rs/rocket-authz

The Rocket community has urgent need for good authorization:

@hsluoyz hsluoyz self-assigned this Apr 7, 2020
@hsluoyz hsluoyz added enhancement New feature or request help wanted Extra attention is needed labels Apr 7, 2020
@GopherJ
Copy link
Member

GopherJ commented Apr 7, 2020

Who can help on Rocket?

@GopherJ
Copy link
Member

GopherJ commented Apr 9, 2020

seems @hackerchai wants to work on this. I'm not sure if Rocket supports middleware...

@hackerchai
Copy link
Member

I will check it these days.@GopherJ

@hsluoyz hsluoyz changed the title Make a Casbin middleware for Rocket.rs as soon as possible Make a Casbin middleware for Rocket.rs May 4, 2020
@hsluoyz hsluoyz pinned this issue May 4, 2020
@hsluoyz
Copy link
Member Author

hsluoyz commented May 4, 2020

Can anyone work on this?

@hackerchai
Copy link
Member

Can anyone work on this?

@hsluoyz I have researched for rocket middleware. I will take this task. If anyone can implement it right now it is also welcomed.

@hackerchai
Copy link
Member

Can anyone work on this?

@hsluoyz I think this issue is high priority. I will start to work on this right now.

@GopherJ GopherJ unpinned this issue May 9, 2020
@hsluoyz
Copy link
Member Author

hsluoyz commented May 19, 2020

@GopherJ @nodece @hackerchai @PsiACE @kingiw any update on this issue?

@hackerchai hackerchai self-assigned this May 19, 2020
@hackerchai
Copy link
Member

@GopherJ @nodece @hackerchai @PsiACE @kingiw any update on this issue?

@hsluoyz I am working on this.

@hsluoyz
Copy link
Member Author

hsluoyz commented May 19, 2020

@hackerchai OK. I have created the repo here: https://github.com/casbin-rs/rocket-authz. Looking forward to your progress and PRs! This step means a lot to us and should be highly prioritized.

@hackerchai
Copy link
Member

hackerchai commented May 19, 2020

@hackerchai OK. I have created the repo here: https://github.com/casbin-rs/rocket-authz. Looking forward to your progress and PRs! This step means a lot to us and should be highly prioritized.

@hsluoyz Now the current job in my hand is making real-world-example using actix casbin middleware. After done that, I will put myself in the rocket middeware.

@ghost
Copy link

ghost commented Aug 25, 2020

Just need to add Enforcer to Rocket State, and get this in Request Guards.
I've written a demo for this Rocket_Casbin_Demo

@hsluoyz
Copy link
Member Author

hsluoyz commented Aug 26, 2020

@simoin can you add a README?

@ghost
Copy link

ghost commented Aug 26, 2020

@hsluoyz Done

@hsluoyz
Copy link
Member Author

hsluoyz commented Aug 26, 2020

I'm not an expert on either Rust or Rocket. @GopherJ @hackerchai @PsiACE Can you give some comments on: https://github.com/simoin/Rocket_Casbin_Demo ?

@hackerchai
Copy link
Member

Just need to add Enforcer to Rocket State, and get this in Request Guards.
I've written a demo for this Rocket_Casbin_Demo

@simoin Thanks for your work. Maybe Fairing is a better method to implement Casbin middleware for Rocket.

@ghost
Copy link

ghost commented Aug 26, 2020

@hackerchai Exactly, you could refer to rocket_contrib::database do

@hsluoyz
Copy link
Member Author

hsluoyz commented Aug 26, 2020

@simoin can you add this middleware to our official site?

@ghost
Copy link

ghost commented Aug 26, 2020

@hsluoyz it is just a binary, not a middleware library.

@hsluoyz
Copy link
Member Author

hsluoyz commented Aug 26, 2020

@simoin Can it be regarded as an example project to show how to integrate Casbin-RS into Rocket?

@ghost
Copy link

ghost commented Aug 26, 2020

I've rewrote the proj with Fairing.

@hsluoyz
Copy link
Member Author

hsluoyz commented Aug 26, 2020

OK. Can you add this to our official site?

@ghost
Copy link

ghost commented Aug 26, 2020

@hsluoyz I've sent a PR to casbin-website.

@hsluoyz
Copy link
Member Author

hsluoyz commented Aug 26, 2020

@simoin thanks! Merged: casbin/casbin-website#122

@hsluoyz hsluoyz closed this as completed Aug 26, 2020
@hsluoyz hsluoyz removed the help wanted Extra attention is needed label Aug 26, 2020
@GopherJ GopherJ unpinned this issue Aug 31, 2020
@hsluoyz hsluoyz reopened this Feb 3, 2021
@hsluoyz hsluoyz added the help wanted Extra attention is needed label Feb 3, 2021
@hsluoyz hsluoyz pinned this issue Feb 3, 2021
@hsluoyz hsluoyz changed the title Make a Casbin middleware for Rocket.rs Make rocket-authz middleware Feb 3, 2021
@hackerchai
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants