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

Oathkeeper access rules appear to be missing paths to get the UI working with quickstart-oathkeeper #2048

Closed
4 of 6 tasks
theotherian opened this issue Dec 9, 2021 · 3 comments · Fixed by #2058
Closed
4 of 6 tasks
Labels
bug Something is not working.

Comments

@theotherian
Copy link
Contributor

theotherian commented Dec 9, 2021

Preflight checklist

Describe the bug

The configuration at

url: "http://127.0.0.1:4455/<{error,recovery,verify,auth/*,**.css,**.js}{/,}>"
seems to exclude paths that are used by the UI when using quickstart-oathkeeper.

I believe this:

id: "ory:kratos-selfservice-ui-node:anonymous"
  upstream:
    preserve_host: true
    url: "http://kratos-selfservice-ui-node:4435"
  match:
    url: "http://127.0.0.1:4455/<{error,recovery,verify,auth/*,**.css,**.js}{/,}>"
    methods:
      - GET

Should have the following value for url:

id: "ory:kratos-selfservice-ui-node:anonymous"
  upstream:
    preserve_host: true
    url: "http://kratos-selfservice-ui-node:4435"
  match:
    url: "http://127.0.0.1:4455/<{welcome,registration,login,verification,error,recovery,verify,auth/*,**.css,**.js,**.png}{/,}>"
    methods:
      - GET

Adding those paths locally allows me to hit the http://127.0.0.1:4455/welcome resource specified in https://www.ory.sh/kratos/docs/guides/zero-trust-iap-proxy-identity-access-proxy/

Reproducing the bug

I literally just used the steps in https://www.ory.sh/kratos/docs/guides/zero-trust-iap-proxy-identity-access-proxy/ and the UI wasn't working for paths like http://127.0.0.1:4455/welcome which returned a 404

git clone https://github.com/ory/kratos.git
cd kratos
git checkout v0.8.0-alpha.3
docker-compose \
  -f quickstart.yml \
  -f quickstart-oathkeeper.yml \
  up --build --force-recreate

Relevant log output

oathkeeper_1                  | {"audience":"application","error":{"debug":"","message":"Requested url does not match any rules","reason":"","status":"Not Found","status_code":404},"granted":false,"http_host":"127.0.0.1:4455","http_method":"GET","http_url":"http://127.0.0.1:4455/welcome","http_user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36","level":"warning","msg":"Access request denied","service_name":"ORY Oathkeeper","service_version":"v0.38.15-beta.1","time":"2021-12-09T21:43:40Z"}
oathkeeper_1                  | {"code":404,"debug":"","details":{},"error":"Requested url does not match any rules","level":"error","msg":"An error occurred while handling a request","reason":"","request-id":"","status":404,"time":"2021-12-09T21:43:40Z","writer":"JSON"}


### Relevant configuration

```yml
I'm using the defaults from the linked quickstart page.

Version

v0.8.0-alpha.3

On which operating system are you observing this issue?

macOS

In which environment are you deploying?

Docker Compose

Additional Context

No response

@theotherian theotherian added the bug Something is not working. label Dec 9, 2021
@aeneasr
Copy link
Member

aeneasr commented Dec 13, 2021

Thank you for the report! I think you are right here indeed! Would you mind opening a PR for this? :)

@theotherian
Copy link
Contributor Author

@aeneasr happy to; I'll get one open in a little while and link it to this.

@theotherian
Copy link
Contributor Author

Opened #2058

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants