While authentication and authorization are often either custom in the product or external via LDAP, there is a lot of sense to use an integration layer. The advantages of using keycloak as an integration layer over the direct approach are that there is one way of authentication and authorization in the product, OOTB support for SSO for sources such as LDAP, database, GMAIL, Facebook, okta, etc. Moreover, you don’t have to reinvent the wheel security-wise. Keycloak is a comprehensive all-in-one solution, including fine-grained authorization like PBAC, ABAC, RBAC.