You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Calling authz endpoints only from local network or from a dedicated hostname
#36846
For security reasons, the admin REST API can easily be secured to only allow requests from the local network or from a dedicated hostname that can be easily secured with a reverse proxy (KC_HOSTNAME_ADMIN). Securing the authz REST API in the same way do not seems to be so easy. It is possible to only permit requests to authz endpoints from the local network by blocking external requests at the reverse proxy level with some paths patterns (i.e./realms/*/authz/*) but it is not very convenient. Moreover, when resource servers make protection requests (i.e. RPT from the policy enforcer) from the local network and without SSL, it generate a lot of Non-secure context detected; cookies are not secured, and will not be available in cross-origin POST requests warn logs.
Is there a way to prevent this logs?
I guess there are some scenarios where authz endpoints must be exposed but it I guess it is also a best practice to not expose these endpoints if it is not necessary?
Does adding a dedicated param (like KC_HOSTNAME_ADMIN for admin apis) could be a relavant feature to prevent exposing authz endpoints ?
I didn't found much information in the documentation regarding the authz endpoints exposition and best practices.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi,
For security reasons, the admin REST API can easily be secured to only allow requests from the local network or from a dedicated hostname that can be easily secured with a reverse proxy (KC_HOSTNAME_ADMIN). Securing the authz REST API in the same way do not seems to be so easy. It is possible to only permit requests to authz endpoints from the local network by blocking external requests at the reverse proxy level with some paths patterns (i.e.
/realms/*/authz/*) but it is not very convenient. Moreover, when resource servers make protection requests (i.e. RPT from the policy enforcer) from the local network and without SSL, it generate a lot ofNon-secure context detected; cookies are not secured, and will not be available in cross-origin POST requestswarn logs.Is there a way to prevent this logs?
I guess there are some scenarios where authz endpoints must be exposed but it I guess it is also a best practice to not expose these endpoints if it is not necessary?
Does adding a dedicated param (like KC_HOSTNAME_ADMIN for admin apis) could be a relavant feature to prevent exposing authz endpoints ?
I didn't found much information in the documentation regarding the authz endpoints exposition and best practices.
Thanks in advance!
All reactions