Skip to content
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

Restore: check password earlier #2873

Open
dizzzz opened this issue Jul 12, 2019 · 0 comments
Open

Restore: check password earlier #2873

dizzzz opened this issue Jul 12, 2019 · 0 comments
Labels
enhancement new features, suggestions, etc.

Comments

@dizzzz
Copy link
Member

dizzzz commented Jul 12, 2019

What is the problem

When running restore of a backup file, in localmode, the database password inside the backup file set is checked very late, causing any errors to appear very late.

In my case, this error pops-up after a few hours, which is rather inconvenient.

What did you expect

Fast failure for wrong passwords, also in localmode

My RFE: please have the username/password checked at at the beginning of the backup process.

Describe how to reproduce or add a test

exist-distribution-5.0.0-RC8-SNAPSHOT-dir>bin\backup.bat -r full20190409-0300.zip -ouri=xmldb:exist:/// -R -q
Picked up _JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true
Rebuilding application repository ...
URI: xmldb:exist:////db
org.xmldb.api.base.XMLDBException: Wrong password for user [admin]
        at org.exist.xmldb.DatabaseImpl.getUser(DatabaseImpl.java:303)
        at org.exist.xmldb.DatabaseImpl.getLocalCollection(DatabaseImpl.java:200)
        at org.exist.xmldb.DatabaseImpl.getCollection(DatabaseImpl.java:178)
        at org.exist.xmldb.DatabaseImpl.getCollection(DatabaseImpl.java:169)
        at org.xmldb.api.DatabaseManager.getCollection(DatabaseManager.java:235)
        at org.exist.backup.Main.restoreWithoutGui(Main.java:286)
        at org.exist.backup.Main.process(Main.java:243)
        at org.exist.backup.Main.main(Main.java:441)
        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 org.exist.start.Main.invokeMain(Main.java:116)
        at org.exist.start.Main.runEx(Main.java:246)
        at org.exist.start.Main.run(Main.java:121)
        at org.exist.start.Main.main(Main.java:60)
        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 org.codehaus.mojo.appassembler.booter.AppassemblerBooter.executeMain(AppassemblerBooter.java:257)
        at org.codehaus.mojo.appassembler.booter.AppassemblerBooter.main(AppassemblerBooter.java:77)
Caused by: org.exist.security.AuthenticationException: Wrong password for user [admin]
        at org.exist.security.internal.RealmImpl.authenticate(RealmImpl.java:252)
        at org.exist.security.internal.SecurityManagerImpl.authenticate(SecurityManagerImpl.java:404)
        at org.exist.xmldb.DatabaseImpl.getUser(DatabaseImpl.java:301)
        ... 21 more
caused by
org.exist.security.AuthenticationException: Wrong password for user [admin]
        at org.exist.security.internal.RealmImpl.authenticate(RealmImpl.java:252)
        at org.exist.security.internal.SecurityManagerImpl.authenticate(SecurityManagerImpl.java:404)
        at org.exist.xmldb.DatabaseImpl.getUser(DatabaseImpl.java:301)
        at org.exist.xmldb.DatabaseImpl.getLocalCollection(DatabaseImpl.java:200)
        at org.exist.xmldb.DatabaseImpl.getCollection(DatabaseImpl.java:178)
        at org.exist.xmldb.DatabaseImpl.getCollection(DatabaseImpl.java:169)
        at org.xmldb.api.DatabaseManager.getCollection(DatabaseManager.java:235)
        at org.exist.backup.Main.restoreWithoutGui(Main.java:286)
        at org.exist.backup.Main.process(Main.java:243)
        at org.exist.backup.Main.main(Main.java:441)
        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 org.exist.start.Main.invokeMain(Main.java:116)
        at org.exist.start.Main.runEx(Main.java:246)
        at org.exist.start.Main.run(Main.java:121)
        at org.exist.start.Main.main(Main.java:60)
        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 org.codehaus.mojo.appassembler.booter.AppassemblerBooter.executeMain(AppassemblerBooter.java:257)
        at org.codehaus.mojo.appassembler.booter.AppassemblerBooter.main(AppassemblerBooter.java:77)

Context information

Please always add the following information

  • eXist-db version : v5 RCx
  • Java version (e.g. Java8u201)
  • Operating system (Windows 10)
  • 64 bit
  • How is eXist-db installed? (clone from GitHub, exist-distribution-5.0.0-RC8-SNAPSHOT-dir)
  • Any custom changes in e.g. conf.xml - none
@triage-new-issues triage-new-issues bot added the triage issue needs to be investigated label Jul 12, 2019
@duncdrum duncdrum added the enhancement new features, suggestions, etc. label Jul 16, 2019
@triage-new-issues triage-new-issues bot removed the triage issue needs to be investigated label Jul 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement new features, suggestions, etc.
Projects
None yet
Development

No branches or pull requests

2 participants