0

I'm trying to understand how authentication works in Kong.
I have a route and a service configured that connect to my API.
I have configured the basic-auth on both and its working correctly.

But, I would like to configure different authentication method on the route and the service.

For example: route --> authenticate using key
service --> authenticate using the basic-auth

Basically what I would like to do is to authenticate the route using key-auth. Once authenticated on the route, the consumer forwards the basic-auth configured to the service.

Is that possible? Or I will have to do a transformation in the middle?
I made the configuration I mention, but I'm getting a 401 Unauthorized.

By the way, I'm using Kong 0.14.1

Thanks

radicaled
  • 2,369
  • 5
  • 30
  • 44

1 Answers1

0

After configuring basic auth for the service and key-auth for the route, you can try creating one consumer for service and another consumer for route. And using the acl plugin, put the first consumer in the whitelist on the service level and the second consumer in the white list on the route level.

EngelbertCoder
  • 777
  • 2
  • 9
  • 29