Service Virtualization

Expand all | Collapse all

Authentication failed for user [username=admin]

Jump to Best Answer
  • 1.  Authentication failed for user [username=admin]

    Posted 05-14-2018 12:39 PM

    I´m having authentication problem after moving DevTest to external databases. I have two external MySQL databases. One for Enterprise Dashboard and one for Registry. 

    The error in registry log is:

     

    2018-05-14 16:12:22,429Z (13:12) [ServerRequestResponder 2] ERROR com.itko.lisa.test.LisaSecurityManager - Authentication Error
    org.springframework.security.authentication.BadCredentialsException: Authentication failed for user [username=admin]
    at com.ca.dts.security.authentication.internal.NamedDelegatingAuthenticationProvider.doAuthentication(NamedDelegatingAuthenticationProvider.java:75)
    at com.ca.dts.security.authentication.AbstractDevTestAuthenticationProvider.authenticate(AbstractDevTestAuthenticationProvider.java:195)
    at org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:174)
    at com.itko.lisa.test.LisaSecurityManager.authenticate(LisaSecurityManager.java:754)
    at com.itko.lisa.test.LisaSecurityManager.authenticate(LisaSecurityManager.java:713)
    at com.itko.lisa.coordinator.TestRegistryImpl.authenticate(TestRegistryImpl.java:2279)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.itko.lisa.net.RemoteMethodExec.execute(RemoteMethodExec.java:57)
    at com.itko.lisa.net.ServerRequestHandler.processRMIMessage(ServerRequestHandler.java:533)
    at com.itko.lisa.net.ServerRequestHandler.access$600(ServerRequestHandler.java:70)
    at com.itko.lisa.net.ServerRequestHandler$5.run(ServerRequestHandler.java:451)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
    Caused by: org.springframework.security.authentication.BadCredentialsException: Bad credentials
    at org.springframework.security.authentication.dao.DaoAuthenticationProvider.additionalAuthenticationChecks(DaoAuthenticationProvider.java:99)
    at org.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider.authenticate(AbstractUserDetailsAuthenticationProvider.java:166)
    at com.ca.dts.security.authentication.internal.NamedDelegatingAuthenticationProvider.doAuthentication(NamedDelegatingAuthenticationProvider.java:70)
    ... 18 more
    2018-05-14 16:12:22,429Z (13:12) [ServerRequestResponder 2] WARN com.itko.lisa.net.RemoteMethodExec - InvocationTargetException on invoke authenticate
    java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.itko.lisa.net.RemoteMethodExec.execute(RemoteMethodExec.java:57)
    at com.itko.lisa.net.ServerRequestHandler.processRMIMessage(ServerRequestHandler.java:533)
    at com.itko.lisa.net.ServerRequestHandler.access$600(ServerRequestHandler.java:70)
    at com.itko.lisa.net.ServerRequestHandler$5.run(ServerRequestHandler.java:451)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
    Caused by: org.springframework.security.authentication.BadCredentialsException: Authentication failed for user [username=admin]
    at com.ca.dts.security.authentication.internal.NamedDelegatingAuthenticationProvider.doAuthentication(NamedDelegatingAuthenticationProvider.java:75)
    at com.ca.dts.security.authentication.AbstractDevTestAuthenticationProvider.authenticate(AbstractDevTestAuthenticationProvider.java:195)
    at org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:174)
    at com.itko.lisa.test.LisaSecurityManager.authenticate(LisaSecurityManager.java:754)
    at com.itko.lisa.test.LisaSecurityManager.authenticate(LisaSecurityManager.java:713)
    at com.itko.lisa.coordinator.TestRegistryImpl.authenticate(TestRegistryImpl.java:2279)
    ... 13 more
    Caused by: org.springframework.security.authentication.BadCredentialsException: Bad credentials
    at org.springframework.security.authentication.dao.DaoAuthenticationProvider.additionalAuthenticationChecks(DaoAuthenticationProvider.java:99)
    at org.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider.authenticate(AbstractUserDetailsAuthenticationProvider.java:166)
    at com.ca.dts.security.authentication.internal.NamedDelegatingAuthenticationProvider.doAuthentication(NamedDelegatingAuthenticationProvider.java:70)
    ... 18 more



  • 2.  Re: Authentication failed for user [username=admin]

    Posted 05-15-2018 09:39 AM

    What Database are you trying to connect?  It looks like you are using Bad credentials.   Can you share the connection strings? 



  • 3.  Re: Authentication failed for user [username=admin]

    Posted 05-15-2018 02:32 PM

    I´m trying to connect to MySQL 5.7 database, with admin login.

     

    Here are the connection strings:
    lisadb.pool.common.driverClass=com.mysql.cj.jdbc.Driver
    lisadb.pool.common.url=jdbc:mysql://10.8.4.229:3306/dbregistrysqt?verifyServerCertificate=false&useSSL=true

     

    DevTest do connect to the database. It creates tables and data inside, as we can see in the picture of "acl_users" table below.

     



  • 4.  Re: Authentication failed for user [username=admin]

    Posted 05-15-2018 03:11 PM

    From the screenshot, it looks like the character set may not be UTF-8.  Can you please follow the link below

    Tech Tips: MySQL Cookbook for DevTest 9.1.0 and Later 

    Verify Step 6: 

    mysql> show variables like 'char%';



  • 5.  Re: Authentication failed for user [username=admin]

    Posted 05-15-2018 03:27 PM

    I did create the schema like UTF-8. Here is the screenshot:

     

    I believe the password encryption, from the previous screenshot,  makes it don´t look like UTF-8.



  • 6.  Re: Authentication failed for user [username=admin]
    Best Answer

    Posted 05-15-2018 05:31 PM

    Do you still have the issue?  if so, please open a ticket with CA support. We can do a webex to look at this issue. 

     

     

    Thanks

     

    Shiney 



  • 7.  Re: Authentication failed for user [username=admin]

    Posted 05-18-2018 10:52 AM

    Yes, I do. I've opened a ticket with CA support here in Brazil. They're trying to find the problem. Can we do a webex? It would be great.

     

    Thank you.

     

    Fabrício



  • 8.  Re: Authentication failed for user [username=admin]

    Posted 11-06-2018 10:29 AM

    Hi Fabrício,

     

    Could you please help with your findings as i am also getting the same issue.

     

    Thanks in advance.

     

    Kind Regards,

    Vaibhav J



  • 9.  RE: Re: Authentication failed for user [username=admin]

    Posted 11-04-2019 12:37 AM
    Hi Vaibhav, Greetings...
    Have u got the solution?

    I am unable to login in DevTest portal (new instance of ED)

    Thanks & Best Regards,
    Rohit Sawant


  • 10.  RE: Re: Authentication failed for user [username=admin]

    Posted 11-04-2019 01:00 AM
    HI Vaibhav/Rohit
                   Please can you share the steps and the version on which this problem occurs.

    regards
    Sankar

    ------------------------------
    Sankar Natarajan
    Service Virtualization Product Engineering Team
    Broadcom
    ------------------------------



  • 11.  RE: Re: Authentication failed for user [username=admin]

    Posted 11-04-2019 01:13 AM
    Hi Sankar, Greetings...
    SW in place:-
    OS - Win10
    Version- DevTest 10.2
    External DB - MySQL 5.6
    link referred:- https://ca-broadcom.wolkenservicedesk.com/external/article?articleId=74951

    Able to invoke - EDB, Registry, VSE successfully.

    Able to invoke Portal as well but not able to login and the log has following error:

    DevTest temporary directory 'C:\Users\cd_viewer\lisatmp_10.2.4' set by system property  lisa.tmpdir

    DevTest temporary directory is C:\Users\cd_viewer\lisatmp_10.2.4

    Configuring logging from 'C:\Software\DEVTES~2\logging.properties'

    There is no rules.properties and rules.xml file. No custom rules loaded.

    No custom rules loaded from C:\Software\DEVTES~2\rules.xml

    [DevTest AGENT:C][WARN][10964][1][main][4 Nov, 2019 2:03:13 PM] Could not establish connection to Agent broker at tcp://localhost:2009?daemon=true

    [DevTest AGENT:C][WARN][10964][1][main][4 Nov, 2019 2:03:14 PM] Could not establish connection to Agent broker at tcp://SIA700174DX:2009?daemon=true

    retrofit.RetrofitError: Connection refused: connect

            at retrofit.RetrofitError.networkError(RetrofitError.java:27)

            at retrofit.RestAdapter$RestHandler.invokeRequest(RestAdapter.java:389)

            at retrofit.RestAdapter$RestHandler.invoke(RestAdapter.java:240)

            at com.sun.proxy.$Proxy156.getRegistryConfig(Unknown Source)

            at com.ca.ad.common.Invoke2Service$getRegistryConfig.call(Unknown Source)

            at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)

            at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)

            at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)

            at com.itko.lisa.ApplicationInfoController.index(ApplicationInfoController.groovy:37)

            at org.grails.core.DefaultGrailsControllerClass.invoke(DefaultGrailsControllerClass.java:182)

            at org.grails.web.mapping.mvc.UrlMappingsInfoHandlerAdapter.handle(UrlMappingsInfoHandlerAdapter.groovy:87)

            at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)

            at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)

            at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:969)

            at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:871)

            at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)

            at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:845)

            at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)

            at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)

            at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1689)

            at com.ca.devtest.http.XSSFilter.doFilter(XSSFilter.java:55)

            at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1676)

            at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114)




  • 12.  RE: Re: Authentication failed for user [username=admin]

    Posted 11-04-2019 01:19 AM
    Could you please run the following SQL query against the MySQL DB server and return the results.

    select * from acl_users

    -Sankar

    ------------------------------
    Sankar Natarajan
    Service Virtualization Product Engineering Team
    Broadcom
    ------------------------------



  • 13.  RE: Re: Authentication failed for user [username=admin]

    Posted 11-04-2019 01:45 AM
    Hi Sankar,

    It retrieves userlist from this table. (have check this).

    i am making use of admin/admin as the username/pass

    Thanks & Best Regards,
    Rohit Sawant


  • 14.  RE: Re: Authentication failed for user [username=admin]

    Posted 11-04-2019 01:54 AM
      |   view attached
    select * from acl_users 


  • 15.  RE: Re: Authentication failed for user [username=admin]

    Posted 11-04-2019 01:57 AM

    Can you please share the following log files:

    portal.log
    portal-grails.log
    registry.log
    acl.log ( this file would be in user temp folder)

    regards

    Sankar



    ------------------------------
    Sankar Natarajan
    Service Virtualization Product Engineering Team
    Broadcom
    ------------------------------



  • 16.  RE: Re: Authentication failed for user [username=admin]

    Posted 11-04-2019 02:12 AM
      |   view attached
    Hi Sankar, attached are the logs.

    Thanks & Best Regards,
    Rohit Sawant

    Attachment(s)

    zip
    registry.zip   47K 1 version


  • 17.  RE: Re: Authentication failed for user [username=admin]

    Posted 11-04-2019 07:07 AM
    Thanks Rohit. Please could you check the following:

    1. Please check if you are able to access this URL: http://<lisa server hostname or Ip Address>:1505

    2. Do you see the Registry URL in Portal Login page as shown below in the screenshot ?



    ------------------------------
    Sankar Natarajan
    Service Virtualization Product Engineering Team
    Broadcom
    ------------------------------



  • 18.  RE: Re: Authentication failed for user [username=admin]

    Posted 11-04-2019 07:13 AM
    Hi Sankar, I am able to access the URL and also able to see the Registry.

    Still cannot login... anything else do i need to check?

    Thanks & Best Regards,
    Rohit Sawant


  • 19.  RE: Re: Authentication failed for user [username=admin]

    Posted 11-04-2019 07:17 AM
    Snip from the registry.log
    2019-11-04 12:13:51,818Z (20:13) [qtp1311474566-99] ERROR com.itko.lisa.invoke.resource.AclResource - Error occurred while authenticating user with Registry
    org.springframework.security.authentication.BadCredentialsException: Authentication failed for user [username=admin]
    at com.ca.dts.security.authentication.internal.NamedDelegatingAuthenticationProvider.doAuthentication(NamedDelegatingAuthenticationProvider.java:75)
    at com.ca.dts.security.authentication.AbstractDevTestAuthenticationProvider.authenticate(AbstractDevTestAuthenticationProvider.java:195)
    at org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:174)
    at com.itko.lisa.test.LisaSecurityManager.authenticate(LisaSecurityManager.java:754)
    at com.itko.lisa.test.LisaSecurityManager.authenticateUser(LisaSecurityManager.java:839)
    at com.itko.lisa.invoke.resource.AclResource.authenticateAndAuthorize(AclResource.java:376)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)


  • 20.  RE: Re: Authentication failed for user [username=admin]

    Posted 11-04-2019 07:32 AM
    HI Rohit
                For a detailed diagnosis, please open a support ticket. 
    --
    regards
    Sankar Natarajan





  • 21.  RE: Re: Authentication failed for user [username=admin]

    Posted 11-04-2019 07:34 AM
    Thanks Sankar.

    I will open a support ticket.


  • 22.  RE: Re: Authentication failed for user [username=admin]

    Posted 11-05-2019 01:05 AM
    Hi Rohit,

    I changed the charset encoding of the DB.

    You can use the following command to check the existing configuration:
    SELECT default_character_set_name FROM information_schema.SCHEMATA S WHERE schema_name = "DBNAME";

    Also, in the properties file, change the DB name to the newly created db to avoid any issues with existing default db instance.

    Thanks

    ------------------------------
    Regards,
    Vaibhav Jain
    Capgemini
    ------------------------------



  • 23.  RE: Re: Authentication failed for user [username=admin]

    Posted 11-11-2019 02:14 AM
    Edited by Rohit Sawant 11-11-2019 02:16 AM
    Hi All, Thanks for all your help.

    I was able to fix the issue with the help of support team.

    The problem was with the charset encoding of the DB due to a different location of my.ini file.

    Resolution:
    edit the my.ini file on following window location for UTF8 charset
    Path: C:\ProgramData\MySQL\MySQL Server 5.6\
    and not
    Path: C:\Program Files\MySQL\MySQL Server 5.6\

    useful link https://ca-broadcom.wolkenservicedesk.com/external/article?articleId=74951

    sorry for the late updated.

    Step1

    C:\ProgramData\MySQL\MySQL Server 5.6

    Step2

    my.ini to be updated

    default-character-set=utf8

    character-set-server=utf8

    collation_server=utf8_unicode_ci

    Step3

    mysql> show variables like 'char%';

    +--------------------------+---------------------------------------------------------+

    | Variable_name            | Value                                                   |

    +--------------------------+---------------------------------------------------------+

    | character_set_client     | cp850                                                   |

    | character_set_connection | cp850                                                   |

    | character_set_database   | utf8                                                    |<

    | character_set_filesystem | binary                                                  |

    | character_set_results    | cp850                                                   |

    | character_set_server     | utf8                                                    |<

    | character_set_system     | utf8                                                    |<

    | character_sets_dir       | C:\Program Files\MySQL\MySQL Server 5.6\share\charsets\ |

    +--------------------------+---------------------------------------------------------+

     

    mysql> create database regdb;

    Query OK, 1 row affected (0.00 sec)

     

    mysql> alter database regdb character set utf8;

    Query OK, 1 row affected (0.00 sec)

     

    mysql>  alter database regdb collate utf8_unicode_ci;

    Query OK, 1 row affected (0.01 sec)

     

    mysql> grant all on regdb.* to 'dtuser'@'%' identified by 'your password';

    Query OK, 0 rows affected (0.00 sec)

     

    mysql> grant super on *.* to 'dtuser'@'localhost' identified by 'your password';

    Query OK, 0 rows affected (0.00 sec)



    Thanks & Best Regards,
    Rohit Sawant