Skip to content
This repository was archived by the owner on Apr 18, 2020. It is now read-only.
This repository was archived by the owner on Apr 18, 2020. It is now read-only.

Access control not enforced #2

Closed

Description

@74monkeys

I got the app up and running and then request the transactions from the test data user (1) using curl - so I am not passing a token, so I am not authenticated.
It happily returns all the transaction, which it shouldn't

$ curl http://0.0.0.0:4000/api/users/1/transactions
[
{
"id": 1,
"userId": 1,
"accountId": 1,
"pos": "Gas and Test",
"credit": 8283.81,
"time": "2013-01-12T13:52:23.826Z"
},
{
"id": 2,
"userId": 1,
"accountId": 1,
"pos": "Jasmine Tea",
"debit": 236.76,
"time": "2013-03-09T06:35:51.862Z"
},
...

Activity

  1. 74monkeys commented on Dec 23, 2013

    @74monkeys
    Author

    Some more info:

    If I remove the following acl's then the access control works:
    It's as if the property is not been read so it is interpreted as allowing all access.

    {
    "accessType": "",
    "permission": "ALLOW",
    "principalType": "ROLE",
    "property": "findById",
    "principalId": "$owner"
    },
    {
    "accessType": "
    ",
    "permission": "ALLOW",
    "principalType": "ROLE",
    "property": "updateAttributes",
    "principalId": "$owner"
    },
    {
    "accessType": "*",
    "permission": "ALLOW",
    "principalType": "ROLE",
    "property": "logout",
    "principalId": "$everyone"
    }

  2. ritch commented on Dec 23, 2013

    @ritch
    Member

    @74monkeys Thanks for the report. I'm marking this as a bug and opening up a related bug in the loopback repo:

    strongloop/loopback#115

  3. crandmck commented on Jul 8, 2015

    @crandmck
    Contributor

    As strongloop/loopback#115 has been closed, I'm going to close this as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions