When I user old JBoss AS, I was able to configure datasource to use security-domain backed with CallerIdentityLoginModule so remote user can connect to database with his username and password. Also, CallerIdentityLoginModule defines username and password which used if there no real user, for example when running EJB scheduled methods.
When using Wildfly (26.1.3 for now) and Elytron I can’t determine a way to configure same behaviour. To use caller identity I can specify authentication-context for datasource which backed by authentication-configuration and security-domain used for authentication. It works for remote users, but not for EJB scheduled methods.
If I specify username and password for datasource — I can’t specify authentication-context and vice versa.
May be there is a way to specify default credentials in authentication-configuration or security-domain, but I can’t figure it.
user3165366 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.