Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new remote authorizer that uses request body and headers #416

Merged
merged 1 commit into from
Apr 24, 2020

Conversation

Marlinc
Copy link
Contributor

@Marlinc Marlinc commented Apr 20, 2020

Related issue

None that I know

Proposed changes

This pull request implements a new authorizer that sends the original request body as body to the remote endpoint. This allows the remote endpoint to take the body into account in its decision.

Checklist

  • I have read the contributing guidelines.
  • I have read the security policy.
  • I confirm that this pull request does not address a security
    vulnerability. If this pull request addresses a security. vulnerability, I
    confirm that I got green light (please contact
    [email protected]) from the maintainers to push
    the changes.
  • I have added tests that prove my fix is effective or that my feature
    works.
  • I have added or changed the documentation.

Further comments

@CLAassistant
Copy link

CLAassistant commented Apr 20, 2020

CLA assistant check
All committers have signed the CLA.

@Marlinc Marlinc force-pushed the remote-authorizer branch 8 times, most recently from 37111c3 to 149f1c4 Compare April 20, 2020 20:47
@Marlinc Marlinc marked this pull request as ready for review April 20, 2020 21:08
@Marlinc Marlinc force-pushed the remote-authorizer branch 2 times, most recently from a984de3 to 92fe3ca Compare April 20, 2020 21:27
pipeline/authz/remote.go Outdated Show resolved Hide resolved
pipeline/authz/remote.go Outdated Show resolved Hide resolved
proxy/request_handler.go Outdated Show resolved Hide resolved
@aeneasr
Copy link
Member

aeneasr commented Apr 22, 2020

Sorry, forgot to say, this looks really good! Good job on providing docs and everything in one go :)

@Marlinc Marlinc force-pushed the remote-authorizer branch 5 times, most recently from 8a0b3ce to 25db75d Compare April 23, 2020 11:02
docs/docs/pipeline/authz.md Outdated Show resolved Hide resolved
proxy/request_handler.go Outdated Show resolved Hide resolved
pipeline/authz/remote.go Show resolved Hide resolved
pipeline/authz/utils.go Show resolved Hide resolved
pipeline/authn/authenticator.go Outdated Show resolved Hide resolved
The current remote_json authorizer does not have the ability to send
the request body of the request to authorize. This means this cannot
be taken into account while checking permissions.

Providing the request body as part of the JSON payload won't always
work as JSON cannot handle binary data.
@aeneasr aeneasr merged commit 3a20637 into ory:master Apr 24, 2020
@aeneasr
Copy link
Member

aeneasr commented Apr 24, 2020

Thank you, great job!

@mostafahussein
Copy link

mostafahussein commented Apr 24, 2020

Hello,
What this authorizer offer in comparison with remote_json? I read that it sends the request body itself. Does it mean it sends the normal request body? So for example, if I am submitting a form then the data of this form will be sent to remote without mentioning the path or the http_method?

@aeneasr
Copy link
Member

aeneasr commented Apr 25, 2020

This is documented:

If something is unclear there please propose a change (PR) or open a discussion on the forums/github/slack

@Marlinc Marlinc deleted the remote-authorizer branch April 25, 2020 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants