Skip to content

T13648 firewall#14078

Merged
niden merged 24 commits into
phalcon:4.0.xfrom
niden:T13648-firewall
May 15, 2019
Merged

T13648 firewall#14078
niden merged 24 commits into
phalcon:4.0.xfrom
niden:T13648-firewall

Conversation

@niden

@niden niden commented May 15, 2019

Copy link
Copy Markdown
Member

Hello!

In raising this pull request, I confirm the following:

  • I have read and understood the Contributing Guidelines
  • I have checked that another pull request for this purpose does not exist
  • I wrote some tests for this PR
  • I updated the CHANGELOG

this pr is adding Firewall component, way to protect routes against unauthorized roles to access certain routes. It's done using listener on dispatcher/micro on beforeExecute/afterBinding event.

In dispatcher you can either use Annotations or Acl based firewall. In micro there is only Acl based firewall.

Would appreciate any comments etc.

This PR is commits/changes from other PRs etc stuff so don't bother them, i will rebase everything if all will be merged.
Thanks

Related:
#11389
#582

Based on work from @Jurigag #12561

Thanks

@niden niden added the new feature request Planned Feature or New Feature Request label May 15, 2019
@niden

niden commented May 15, 2019

Copy link
Copy Markdown
Member Author

cc @sergeyklay

@niden niden mentioned this pull request May 15, 2019
3 tasks
sergeyklay
sergeyklay previously approved these changes May 15, 2019
Jurigag
Jurigag previously approved these changes May 15, 2019

@Jurigag Jurigag left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine, needs to implement all those added tests which my branch didn't cover.

@niden niden dismissed stale reviews from Jurigag and sergeyklay via 250c8da May 15, 2019 12:23
@codecov

codecov Bot commented May 15, 2019

Copy link
Copy Markdown

Codecov Report

Merging #14078 into 4.0.x will increase coverage by 0.38%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##            4.0.x   #14078      +/-   ##
==========================================
+ Coverage   70.75%   71.13%   +0.38%     
==========================================
  Files         479      479              
  Lines       93829    93836       +7     
==========================================
+ Hits        66385    66747     +362     
+ Misses      27444    27089     -355
Impacted Files Coverage Δ
ext/phalcon.c 97.69% <0%> (+0.02%) ⬆️
ext/phalcon/http/request.zep.c 81.04% <0%> (+0.04%) ⬆️
ext/phalcon/annotations/parser.c 81.86% <0%> (+1.22%) ⬆️
ext/phalcon/annotations/collection.zep.c 74.02% <0%> (+1.29%) ⬆️
ext/phalcon/acl/adapter/memory.zep.c 82% <0%> (+1.42%) ⬆️
ext/phalcon/mvc/micro.zep.c 72.35% <0%> (+3.83%) ⬆️
ext/phalcon/dispatcher.zep.c 88.86% <0%> (+5.02%) ⬆️
ext/phalcon/annotations/adapter.zep.c 74.54% <0%> (+21.21%) ⬆️
ext/phalcon/mvc/model/binder.zep.c 72.63% <0%> (+69.59%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dca688f...b1b8402. Read the comment docs.

@niden niden added the documentation Documentation required label May 15, 2019
@niden niden merged commit 3a2ce89 into phalcon:4.0.x May 15, 2019
This was referenced May 15, 2019
@ruudboon

Copy link
Copy Markdown
Member

Awesome!!

@niden niden deleted the T13648-firewall branch May 19, 2019 02:58
@niden niden added the 4.0 label Dec 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Documentation required new feature request Planned Feature or New Feature Request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants