agreeable-microphone-83376
08/11/2023, 3:38 PMOathkeeper-kratos-Kong
example mentioned here: https://www.ory.sh/zero-trust-api-security-ory-tutorial/
Example: https://github.com/ory/examples/tree/master/kratos-oathkeeper-kong
If I run the Self hosted Kratos and Oathkeeper in docker, the kong example works perfectly fine.
But, I am using Ory Cloud, and want to use the Kratos Identities
from cloud.
When I replace the Kratos url to <http://localhost:4000/sessions/whoami>
and error handler to <http://localhost:4000/ui/login>
, it gives CORS issue.
To fix this, I tried using Ory Tunnel via CLI on windows. I used following command for Tunnel:
ory tunnel --project <my-ory-slug-> --dev <http://localhost:8000>
Tunnel starts, runs and also gives me the access on <http://localhost:4000>
and I am able to login as well.
But when I run the service to call hello
or world
using: <http://localhost:8000/hello>
or <http://localhost:8000/world>
I get unauthorized error.
and if I use <http://127.0.0.1:8000/hello>
or <http://127.0.0.1:8000/world>
I get Forbidden error.
Will be thankful if you can share how to solve this.steep-lamp-91158
localhost
!= 127.0.0.1
steep-lamp-91158
/sessions/whoami
directly to see if it is a oathkeeper config errorsteep-lamp-91158
steep-lamp-91158
steep-lamp-91158
agreeable-microphone-83376
08/11/2023, 4:55 PMagreeable-microphone-83376
08/11/2023, 4:56 PMlocalhost
- <http://localhost:4000>
2. http://localhost:4000/sessions/whoami in browser gives me a proper response of whoami
3. WHat will be cookies name for Kratos in case of Ory Cloud Identities?
Following is my current cookies session section in oathkeeper.yml
cookie_session:
enabled: true
config:
check_session_url: <http://localhost:4000/sessions/whoami>
preserve_path: true
extra_from: "@this"
subject_from: "identity.id"
only:
- ory_kratos_session
steep-lamp-91158
agreeable-microphone-83376
08/11/2023, 11:00 PMsteep-lamp-91158
ory_session_xxxx
where xxx is some random part that is unique per projectsteep-lamp-91158
only
key