Casbin官方博客站  ›  hackerchai  ›  All Replies
Total Replies  12

Weekly Report 13 (August 24 - August 30)

Achievement this week

  1. Document wrting
  2. General improvements of real-world-app

Milestone

Summary

Plan for next week

  1. Submit final evaluation

Weekly Report 12 (August 17 - August 23)

Achievement this week

  1. Casbin middleware intergrated
  2. Solve casbin deadlock problem, bump version of middleware and actor
  3. Project real-world-app finish
  4. Test for real-world-app

Milestone

Summary

This week, I successfully intergrated casbin middleware into real-world-app. Althouth the dead lock problem costs me few days to work on it. But thanks to my mentor's help, I finally found the problem.

The real-world-app development is finished.

Plan for next week

  1. Submit code
  2. Document writing
  3. Prepare to submit final evaluation

Weekly Report 11 (August 10 - August 16)

Achievement this week

  1. csv_util finish
  2. casbin structure design
  3. casbin actor intergrated

Milestone

Summary

This week, I intergrate casbin actor into the project and encountered bugs. Because casbin new version doesn't dupport pattern in g policies (like "g2, /post/:id, post_group"), so I have to use p policies instead.

Plan for next week

  1. WIP Working with real-world app
  2. Casbin middleware intergrate

Weekly Report 10 (August 3 - August 9)

Achievement this week

  1. Post controller finish
  2. Some authentication code
  3. JWT middleware finish
  4. Add LoginSesion to user table

Milestone

Summary

This week, I add JWT middleware to real-world-app. Due to support the casbin middleware I put user's username into Actix Extensions which can be also retieved in the HttpRequest when handling data. To difference user's login state, I add LoginSession into user table, and put it into JWT body to check whether whe user is logout.

Plan for next week

  1. WIP Working with real-world app
  2. Intergrate casbin into app

Weekly Report 9 (July 27 - August 2)

Achievement this week

  1. Add get/set enforcer to middleware & actor
  2. Post model and service finish
  3. Solve serde default field issue

Milestone

Summary

In my coding time this week, I found that in real-world we can not generate two enforcers in the app. Or it will be mistakes with data syncing. So the middleware and actor should share the same enforcer. So I make commits to implement this.

Besides, I am woking on Post model and service. When handling new_post object, there are some fields not providing by the user's request, so I use serde default field feature to implement this finally.

Plan for next week

  1. WIP Working with real-world app
  2. Post controller

  3. JWT middleware

  4. Add needed authentication code in service code

Weekly Report 8 (July 20 - July 26)

Achievement this week

  1. Finish User controller and service
  2. Unit-test for user controller
  3. Solve several Diesel bug in repo

Milestone

Summary

This week, I am working on the service and controller part of user system. I met some Diesel issues and they are tough to solve. With the help of my mentor and blog posts, I finally solved them.

Plan for next week

  1. WIP Working with real-world app
  2. Post model and post service.

Weekly Report 6&7 (July 6 - July 19)

Achievement this week

  1. Finsih real-world-app User password handle logic
  2. Few pull request from casbin community (version upgrade)
  3. Basic operation of model User finish
  4. Database table user unit-test

Milestone

Summary

Due to the final exam in university, merge two weeks into one report. Mainly working on the User model of real-world-app.

Plan for next week

  1. WIP Working with real-world app
  2. User service and controller.

Weekly Report 5 (June 29 - July 5)

Achievement this week

  1. Change middleware casbin conf and bump version
  2. Writing API document
  3. Encryption selection for real-world-app
  4. Hash(bcrypt) util finish

Milestone

Summary

Since pattern is removed from casbin new version, I use KeyMatch function in p policies instead. So I bump a new version of casbin.

Plan for next week

  1. WIP Working with real-world app
  2. User password logic

Weekly Report 4 (June 22 - June 28)

Achievement this week

  1. Remove add_match_fn from actix-casbin-auth](https://github.com/casbin-rs/actix-casbin-auth)
  2. Finish mock API test for real-world app
  3. Finsh database migration for real-world app
  4. Finish database part of real-world app

Milestone

Summary

Since add_matching_fn function has been deprecated in casbin 1.0.0, I found that without matching_fn function I ccan still implement similiar feature using KeyMatch2 in confifuration file. So we will still use this in the real-world app.

Plan for next week

  1. WIP Working with real-world app
  2. JWT middleware for real-world app

Weekly Report 3 (June 15 - June 21)

Achievement this week

  1. Finish real-world app API document draft
  2. Update casbin-rs dependency to 1.0.0
  3. Set up development server CI webhook

Milestone

Summary

Casbin-rs has released the 1.0.0 version. Some functions have been made into sync and some functions have been deprecated. Through the benchmark, casbin-rs has a huge performance improvement.

Besides, the add_matching_fn function has been deprecated. But it is needed in real-world circumstance. So it is of necessity to bring it back in next release and also improve its performance.

Plan for next week

  1. WIP Working with real-world app
  2. Bringadd_matching_fn function back

Weekly Report 2 (June 8 - June 14)

Achievement this week

  1. Update async runtime and other dependencies in repos
  2. Finish setting up docker environment for example app
  3. Designing database structure and set up development server

Milestone

Summary

For docker environment, I am using https://github.com/hackerchai/docker-rust-web.

Plan for next week

  1. Draft API document for real-world app
  2. Start coding for real-world app

Weekly Report 1 (June 1 - June 7)

Achievement this week

  1. Getting familiar with Diesel orm library and trying to optimize SQL in sqlx adapter
  2. Reading source code of other application written by Actix and diesel
  3. Reading documents of Rocket to check how Roccket implements Middleware

Milestone

Summary

First of all, the highest priority job is to implement a real-world-app using actix-casbin-auth, after discussion with my mentor, I decide to write an anonymous shudong to give an example of casbin-rs with RBAC model. I will choose PostgreSQL as database backend and JWT as default authentication method.

As for Rocket, the middleware is called Fairings. So it is available for us to implement a middleware similar to Actix.

Plan for next week

  1. Update dependencies in reops
  2. Design database structure and api document for actix-realworld-app
  3. Set up docker environment for actix-realworld-app
About   ·   FAQ   ·   API   ·   Mission   ·   Advertise   ·   Thanks   ·   Tools   ·   10 Online   Highest 30   ·     Select Language  ·     Select Editor
Community of Creators
World is powered
VERSION: 2c477f2 · 0ms · UTC 20:40 · PVG 04:40 · LAX 13:40 · JFK 16:40
♥ Do have faith in what you're doing