Hi, maybe a dump question, but we are using Ory Kr...
# talk-oathkeeper
s
Hi, maybe a dump question, but we are using Ory Kratos for User Management, I would like to secure one of our API, with Oathkeeper in NestJS, we are planning to generate access tokens to user and than they can call the mentioned API with that toke. There is any examples for these type of usage? Is this a valid usecase?
f
Hi Levente I guess you could try
Copy code
# Global configuration file oathkeeper.yml
authenticators:
  bearer_token:
    # Set enabled to true if the authenticator should be enabled and false to disable the authenticator. Defaults to false.
    enabled: true

    config:
      check_session_url: <https://session-store-host>
      token_from:
        header: Custom-Authorization-Header
        # or
        # query_parameter: auth-token
        # or
        # cookie: auth-token
in config file
and then in rules file you can use
bearer_token
for you endpoint
s
Okey, I'm confused a little bit, what'll the session store host?
My Kratos service URL?
m
See the Oathkeeper examples here as well: https://github.com/ory/examples
s
So session store will be Kratos..
Thanks for the link, I'll dig deeper on the topic, otherhand awesome project 🙂
f
So session store will be Kratos..
it depends 🙂 You can have the custom one as well.
s
Its okey, but I don't really know, what is session store in this context
@magnificent-energy-493 the 2nd example was a pretty good one, my only question is, there is any method that i can call the /hello service with jwt or bearer token (pure rest api calls) instead of the csrf and ory cookie session?
How I can get the jwt, who is the issuer?