To anyone who is familiar with the username (user) value being set by the claims of OIDC in Azure AD Delegation. CAS is setting the username to the subject (sub) claim. This totally trashes the ability to use JDBC attribute resolution like:
2021-07-29 13:47:18,371 DEBUG [org.springframework.jdbc.core.JdbcTemplate] - <Executing prepared SQL query>
2021-07-29 13:47:18,372 DEBUG [org.springframework.jdbc.core.JdbcTemplate] - <Executing prepared SQL statement [SELECT username BANNER_LDAP, udc_id BANNER_UDC_ID, s_id BANNER_SID, banner_id BANNER_OID, dob BANNER_DOB, last4 BANNER_LAST4 FROM idmap WHERE username = ?]>
2021-07-29 13:47:18,377 DEBUG [org.springframework.jdbc.datasource.DataSourceUtils] - <Fetching JDBC Connection from DataSource>
2021-07-29 13:47:18,727 TRACE [org.springframework.jdbc.core.StatementCreatorUtils] - <Setting SQL statement parameter value: column index 1, parameter value [oASsZI-izB_hpkO3eXXXXXXXXXRqxY6uh6BkvzYNkY], value class [java.lang.String], SQL type unknown>
This is not the username. The UPN and other values look perfect - except this. I cannot find anything in the CAS docs or with Azure AD that allows me to compensate for this. Since the JDBC argument injection is so primitive there is no way for me to adjust and substitute another value at the time this gets invoked for additional attributes.
Can anyone shed light on this?
Thank you!
Bill