Skip to content

docs: warden resource names are wrong on apiary #268

@nikolay-turpitko

Description

@nikolay-turpitko

At http://docs.hdyra.apiary.io/#reference/warden:-access-control-for-resource-providers/check-if-an-access-tokens-subject-is-allowed-to-do-something/check-if-an-access-token's-subject-is-allowed-to-do-something

Access Control Requirements
Resource: rn:hydra:warden:token:allowed:<id>

What exactly is <id>? Is it id of another policy which this token allowed to check or something else?

Particularly, we want to create set of policies, to manage access to particular API methods of our app. Like:
token xxx allowed to do GET requests to /api/profile,
token yyy allowed to do also POST requests to /api/profile, etc.

In our middleware we are trying to check if access token from web client allowed to do particular task.

Now we are struggling with policies setup. I understood that we must allow to server-to-server token to do requests to validate other tokens like:
hydra policies create --allow -r "rn:hydra:warden:token:allowed:<[^:]+>" -s "<.*>" -a "decide" --skip-tls-verify (allow everyone to decide). And hydra policies create --allow -r "/api/profile" -s "<.*>" -a "GET" --skip-tls-verify (allow everyone to access particular URL).

With this setup we get 403 Forbidden in Hydra log. What we are missing?
Also, is it allowed to use slashes in resource field?

Is it possible to restrict access to particular URL for some client_id in this request?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions