Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Access security #11

Closed
wouterj opened this issue Mar 5, 2015 · 5 comments · Fixed by #40
Closed

Access security #11

wouterj opened this issue Mar 5, 2015 · 5 comments · Fixed by #40
Milestone

Comments

@wouterj
Copy link
Member

wouterj commented Mar 5, 2015

If I don't miss something, this bundle allows everyone to request the API URLs. At this moment, it means one can retrieve all tree information, even from nodes that shouldn't be showed to other people.

Besides that, when we implement more things than just GET (#6), even more things will be provided to the hacker.

@dantleech
Copy link
Member

Yes, at the moment all of the configured resource trees are available. We would need to configure which ones are exposed and also think about how to filter what is made available.

Of course all of this should normally be behind a firewall.

@dbu
Copy link
Member

dbu commented Mar 6, 2015

maybe the controller should by default check for isGranted CMF_RESOURCE_READER and CMF_RESOURCE_EDITOR to at least not expose things when the bundle is accidentally dropped into a project.

@wouterj wouterj modified the milestone: 1.0 Apr 24, 2015
@lsmith77
Copy link
Member

I also see this as mainly a job for the firewall to cover. Once we add write support we should make sure that we can handle the different operations using isGrant checks.

@ElectricMaxxx
Copy link
Member

I would also add to the "global" CMF_RESOURCE_READER" some constructed roles as sonata does. i.e. when having a resource with paht/cms/content/collection/name" i would see the following roles to check for:

  • CMF_RESOURCE_CMS_CONTENT_COLLECTION_NAME_VIEW
  • CMF_RESOURCE_CMS_CONTENT_COLLECTION_NAME_EDIT
  • CMF_RESOURCE_CMS_CONTENT_COLLECTION_NAME_DELETE
  • CMF_RESOURCE_CMS_CONTENT_COLLECTION_CREATE

so you wil have a control to every kind of resource in the tree.

@dbu
Copy link
Member

dbu commented Jul 20, 2015

so you would translate the whole path to role names? with deep path, this could end up in a lot of role checks. imho that would just be duplicating what you can do with the firewall.

i think the way to go further would be custom security voters that can look at whatever application specific things (document type, information in the phpcr tree) to decide. which means the controller could ask with the document in question as well. maybe only ask with that, and have a security voter that checks for the CMF_RESOURCE_READER/EDITOR role.

@dantleech dantleech changed the title Isn't this bundle a big security leak? Access security May 18, 2016
ElectricMaxxx added a commit that referenced this issue Nov 16, 2017
# This is the 1st commit message:

DevKit updates

# This is the commit message #2:

improvements to get the tests running

# This is the commit message #3:

try to call unit tests only

# This is the commit message #4:

DevKit updates

# This is the commit message #5:

add correct cache/log path to gitignor

# This is the commit message #6:

DevKit updates

# This is the commit message #7:

DevKit updates

# This is the commit message #8:

DevKit updates

# This is the commit message #9:

DevKit updates

# This is the commit message #10:

DevKit updates

# This is the commit message #11:

DevKit updates

# This is the commit message #12:

restriction on sebastion/exporter

# This is the commit message #13:

fix composer.json

# This is the commit message #14:

use higher versions

# This is the commit message #15:

use higher version

# This is the commit message #16:

DevKit updates

# This is the commit message #17:

DevKit updates

# This is the commit message #18:

DevKit updates

# This is the commit message #19:

try verbose

# This is the commit message #20:

try testdox

# This is the commit message #21:

try makefile change

# This is the commit message #22:

try travis

# This is the commit message #23:

back

# This is the commit message #24:

restrict sebastianbergmann/environment

# This is the commit message #25:

restrict sebastianbergmann/environment

# This is the commit message #26:

try to turn around

# This is the commit message #27:

support symfony 3.4, new testing app folder structure

# This is the commit message #28:

support symfony 3.4, new testing app folder structure

# This is the commit message #29:

use caret operator for symfony-cmf/resource-bundle
ElectricMaxxx added a commit that referenced this issue Nov 16, 2017
* # This is a combination of 29 commits.
# This is the 1st commit message:

DevKit updates

# This is the commit message #2:

improvements to get the tests running

# This is the commit message #3:

try to call unit tests only

# This is the commit message #4:

DevKit updates

# This is the commit message #5:

add correct cache/log path to gitignor

# This is the commit message #6:

DevKit updates

# This is the commit message #7:

DevKit updates

# This is the commit message #8:

DevKit updates

# This is the commit message #9:

DevKit updates

# This is the commit message #10:

DevKit updates

# This is the commit message #11:

DevKit updates

# This is the commit message #12:

restriction on sebastion/exporter

# This is the commit message #13:

fix composer.json

# This is the commit message #14:

use higher versions

# This is the commit message #15:

use higher version

# This is the commit message #16:

DevKit updates

# This is the commit message #17:

DevKit updates

# This is the commit message #18:

DevKit updates

# This is the commit message #19:

try verbose

# This is the commit message #20:

try testdox

# This is the commit message #21:

try makefile change

# This is the commit message #22:

try travis

# This is the commit message #23:

back

# This is the commit message #24:

restrict sebastianbergmann/environment

# This is the commit message #25:

restrict sebastianbergmann/environment

# This is the commit message #26:

try to turn around

# This is the commit message #27:

support symfony 3.4, new testing app folder structure

# This is the commit message #28:

support symfony 3.4, new testing app folder structure

# This is the commit message #29:

use caret operator for symfony-cmf/resource-bundle

* merge conflicts

DevKit updates for master branch (#59)

* DevKit updates

* DevKit updates

* merge conflicts

fixes due to StyleCI

fix symfony component version

* re add packages after merging
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants