question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to configure jaas.conf to use mysql backend authentication?

See original GitHub issue

After a clean install of the docker container with the latest version, and inserting a user in the mysql database, I get this error when I try to login to the frontend ui.

wherehows-frontend_1       | 2018-08-01 22:43:12 WARN  application:390 - Authentication error!
wherehows-frontend_1       | javax.naming.AuthenticationException: javax.security.auth.login.LoginException: No LoginModules configured for WHZ-Authentication
wherehows-frontend_1       |    at security.AuthenticationManager.authenticateUser(AuthenticationManager.java:38) ~[wherehows-frontend.jar:na]
wherehows-frontend_1       |    at controllers.Application.authenticate(Application.java:388) ~[wherehows-frontend.jar:na]
wherehows-frontend_1       |    at router.Routes$$anonfun$routes$1$$anonfun$applyOrElse$7$$anonfun$apply$7.apply(Routes.scala:3006) [wherehows-frontend.jar:na]

Is there a way to configure the jaas.conf to use the mysql backend?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:24 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
mbd-dbc-dkcommented, Sep 27, 2018

@sauravGit : To get a user into the local database, I used the method from #874:

INSERT INTO wherehows.users (name, email, username, password_digest, password_digest_type, authentication_type) VALUES ('Your Name', 'username@domain.com', 'YourUsername, SHA1('YourPassword'), 'SHA1', 'default');

Seems you have done the same(?), so not sure what the problem is. However, to get the frontend to use the passwordbased auth mechanism, I added

ENV JAVA_OPTS -Djava.security.auth.login.config=/application/conf/jaas.conf

to the frontend Dockerfile. I was then able to get through the auth without LDAP, but then got an error (see above). I have not been able to test it further since then. Hoping to by the end of next month.

1reaction
sauravGitcommented, Sep 26, 2018

@mbd-dbc-dk : I tried inserting the records in users table. Still it not working

mysql> select * from users; ±—±------------±------------------±---------±------------------±-----------------------------------------±---------------------±-------------------------±--------------------+ | id | name | email | username | department_number | password_digest | password_digest_type | ext_directory_ref_app_id | authentication_type | ±—±------------±------------------±---------±------------------±-----------------------------------------±---------------------±-------------------------±--------------------+ | 1 | Paul | spau0004@XXXX.com | Paul | NULL | d033e22ae348aeb5660fc2140aec35850c4da997 | SHA1 | NULL | default |

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to configure jaas.conf to use mysql backend ... - GitHub
The sample config provided in jaas.conf uses LDAP. I am sure there are other modules that use MySQL database (ex: https://developer.jboss.org/thread/42212).
Read more >
JAAS authentication using a MySQL database - JBoss.org
Hi, I'm trying to use a MySQL database as a DataSource for JAAS authentication. I followed all the instructions in getting started guide...
Read more >
The JAAS Login Configuration File - Progress Documentation
If you choose to specify a login configuration file with the java.security.auth.login.config system property, you may use the JDBCDriverLogin.conf installed ...
Read more >
Create JAAS configuration files - Hortonworks Data Platform
Create the following JAAS configuration files on the HBase Master, RegionServer ... ="-Djava.security.auth.login.config= $HBASE_CONF_DIR /hbase-client.jaas" ...
Read more >
Configuring JAAS for database authentication - IBM
You can use a JAAS login context entry to specify a custom login module to use for setting the username and password to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found