How to configure RedHat APIMan Authorization Policy for unprotected endpoints?

164 Views Asked by At

We have installed and configured RedHat APIMan for our working API and the plan is migration form current home-grown tiny gateway to APIMan. The problem is that we have some unprotected endpoints which do not need login (Not everyone role! No login required at all). We are using Keycloak OAuth plugin for roles, and Authorization Policy for API security. When Authorization policy is not added, I can allow unauthenticated requests via a boolean value in Keycloak OAuth policy, but after adding Authorization policy, there is no way to let unauthenticated requests pass!

Policy Configuration

Keyclock OAuth Policy COnfiguration

Allow other enpoints!

Result

1

There are 1 best solutions below

0
On

Kamyar. Apiman developer here.

Please file a feature request for this over at https://github.com/apiman/apiman/issues.

I think what you are trying to do may not currently be possible easily because the authentication policy is expecting a successful auth of some sort before it is hit (to get the roles, etc).

We probably need a slightly more detailed explanation of your use-case, and then we can figure out whether we can support it. It seems like it should be doable without major changes if I understand correctly.

If and when we add support for the specifics of your requirement, I will endeavour to update this ticket.