Skip to content

General architectural level queries #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
hassankhan986 opened this issue Aug 9, 2019 · 1 comment
Closed

General architectural level queries #22

hassankhan986 opened this issue Aug 9, 2019 · 1 comment

Comments

@hassankhan986
Copy link

Hi,

Thanks for the great connector.

I had a couple of questions as below:

  1. Is there a way to specify valve setting in context per web app level ? (currently I am specifying the valve in the tomcat level -context.xml file)

  2. What is the security implication of having the client secret in plain view inside context.xml file on the server? are there ways to hash/hide it further?

  3. The final step in the authentication workflow of looking up of the user id in the tomcat Realms, what is the purpose of doing it ? can roles be also communicated by the IDP, can we disable this lookup?

Thanks

@levahim
Copy link
Contributor

levahim commented Aug 13, 2019

Hi,

  1. Yes, you can totally define the valve in the webapp level context.

  2. The context.xml file is a server-side file, it is not exposed anywhere outside the server. So, all the server security applies. You can't hash the client secret because you need the actual value. If you encrypt it, you still need a place to save the encryption key. However, none of that is necessary since access to the Tomcat setup and its files is supposed to be restricted by other means.

  3. Separation of authentication and user database (the realm) is part of Tomcat's architecture. It's a very good and wise thing actually. If you don't need the realm, you can easily implement a dummy realm that simply always returns the user being looked up. To get the roles from the IdP you can either make a separate call to the IdP's API, if available, or have the roles included in the JWT returned by the IdP. The JWT is made available to the webapp by the authenticator in the HTTP session object.

Best

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants