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

feat: use uri-reference for errors redirect to allow relative urls #516

Merged
merged 5 commits into from Sep 16, 2020

Conversation

xlanor
Copy link
Contributor

@xlanor xlanor commented Sep 15, 2020

This is related to ory/kratos#617

Similar to that of the original PR, we are running a multi-domain setup for our cluster(s).

The original PR for kratos greatly assisted with our deployment process.

However, we are also utilising oathkeeper as a proxy in our cluster, and as .oathkeeper.yml's errors:handlers:redirect:config:to only allows absolute URIs, we have had to deploy an instance of oathkeeper per domain.

This PR aims to allow for a relative error redirect URL in the oathkeeper configuration file.

I have not built a container to test this yet as I am currently still on leave, but once I'm back in the office I will build it to test directly - it's my first time submitting a PR here, so I would like to get some eyes on it :)

Related issue

Proposed changes

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
    security@ory.sh) 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 Sep 15, 2020

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@zepatrik zepatrik left a comment

Choose a reason for hiding this comment

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

I'm not quite sure if I read the diff correctly but can you make sure there are all old test cases as well as the new ones? I'd expect 4 cases in total, for each of absolute and relative a 301 and 302 case.

pipeline/errors/error_redirect_test.go Show resolved Hide resolved
Copy link
Member

@zepatrik zepatrik left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM.

Copy link
Member

@aeneasr aeneasr left a comment

Choose a reason for hiding this comment

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

Awesome, thank you for your contribution!

@aeneasr aeneasr merged commit 0d39674 into ory:master Sep 16, 2020
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.

None yet

4 participants