Giter VIP home page Giter VIP logo

jpass's Introduction

JPass Java CI with Maven Java CI with Gradle

Overview

JPass is a simple, small, portable password manager application with strong encryption. It allows you to store user names, passwords, URLs and generic notes in an encrypted file protected by one master password.

Features:

  • Strong encryption - AES-256-CBC algorithm (PBKDF2-HMAC-SHA-256 is used as password-based key derivation function)
  • Portable - single jar file which can be carried on a USB stick
  • Built-in random password generator
  • Organize all your user name, password, URL and notes information in one file
  • Data import/export in XML format

JPass

Usage

Java 8 or later is recommended to run JPass. You can run the application from the command line by typing (the password file is optional):

java -jar jpass-1.0.6-SNAPSHOT.jar [password_file]

For convenience, batch/shell scripts are also available for launching JPass for various platforms (i.e. jpass.bat for Windows, jpass.sh for Linux, jpass.command for macOS). Please make sure PATH, or JAVA_HOME environment variables point to a valid Java installation.

Download

You can find the latest distribution package under the releases link.

Alternatively, for Windows, you can also download and install JPass using scoop:

scoop bucket add extras
scoop install jpass

For Linux, JPass is not available in a standard software package, but you can install it into /opt/jpass via the install.sh shell script (experimental).

How to compile

  • Gradle: gradle clean build (preferred)
  • Maven: mvn clean package

Configuration

Default configurations can be overridden in jpass.properties file:

Configuration key Value type Default value
ui.theme.dark.mode.enabled boolean false
clear.clipboard.on.exit.enabled boolean false
default.password.generation.length integer 14
date.format string yyyy-MM-dd
entry.details list TITLE,MODIFIED
file.chooser.directory string ./
language.languageSetting string en-US

Regarding language.languageSetting please check languages resources folder for possible configuration values.

Each configuration property can be overridden by system properties, with the jpass. key prefix, e.g.

java -Djpass.entry.details=TITLE -jar jpass-1.0.6-SNAPSHOT.jar

jpass's People

Contributors

bovirus avatar demoth avatar dependabot[bot] avatar edimoral avatar gaborbata avatar gioagu17 avatar jbeguna04 avatar lorenzobn avatar rafalrusin avatar svzdvd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jpass's Issues

Lag

I've been using this program for over a year now and it has been great. Unfortunately as I added entries and as time went on I noticed significant lag compared to how fluid it was before. I guess it just needs to be optimized? Just wanted to let you know.

Thanks

Problem with FlatLaf Look & Feel dependencies with Java 11 on Windows 10

Dear Gabor Bata,

first of all I would like to thank you for sharing this application. I have used it for quite some time on different platforms and it used to work without any effort. Now I have upgraded to your latest release to be able to work in a Java 11 environment.

On Windows 10, however, I have encountered a show stopping classloading problem with the com.formdev.flatlaf.FlatLaf look and feel, which stalled the applications at startup, no password prompting popup window will show up. Strange enough the stalling doesn't happen on my Linux Mint laptop (though the same java.lang.NoClassDefFoundError stacktrace is shown in the console). See below for a detailed description and work around.

Kind regards,
Willem van Es

Problem description

When building the latest snapshot with

  • maven 3.6.3 (mvn clean package)
  • Java 11, Oracle JDK 11.0.9

and running the resulting jpass-0.1.21-SNAPSHOT.jar from a command line terminal also with Java 11,
I see the following stacktrace logging in the console:

java -jar jpass-0.1.21-SNAPSHOT.jar mypasswords.jpass
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: com/formdev/flatlaf/util/MultiResolutionImageSupport$MappedMultiResolutionImage
        at com.formdev.flatlaf.ui.FlatTitlePaneIcon.create(FlatTitlePaneIcon.java:38)
        at com.formdev.flatlaf.ui.FlatTitlePane.updateIcon(FlatTitlePane.java:321)
        at com.formdev.flatlaf.ui.FlatTitlePane.addNotify(FlatTitlePane.java:351)
        at java.desktop/java.awt.Container.addNotify(Container.java:2800)
        at java.desktop/javax.swing.JComponent.addNotify(JComponent.java:4783)
        at java.desktop/java.awt.Container.addNotify(Container.java:2800)
        at java.desktop/javax.swing.JComponent.addNotify(JComponent.java:4783)
        at java.desktop/javax.swing.JRootPane.addNotify(JRootPane.java:733)
        at java.desktop/java.awt.Container.addNotify(Container.java:2800)
        at java.desktop/java.awt.Window.addNotify(Window.java:786)
        at java.desktop/java.awt.Frame.addNotify(Frame.java:490)
        at java.desktop/java.awt.Window.show(Window.java:1048)
        at java.desktop/java.awt.Component.show(Component.java:1716)
        at java.desktop/java.awt.Component.setVisible(Component.java:1663)
        at java.desktop/java.awt.Window.setVisible(Window.java:1031)
        at jpass.ui.JPassFrame.<init>(JPassFrame.java:207)
        at jpass.ui.JPassFrame.getInstance(JPassFrame.java:220)
        at jpass.JPass.lambda$main$0(JPass.java:75)
        at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
        at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
        at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
        at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
        at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Caused by: java.lang.ClassNotFoundException: com.formdev.flatlaf.util.MultiResolutionImageSupport$MappedMultiResolutionImage
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
        ... 31 more

There is one crucial difference in the behavior in my Linux Mint laptop and the Windows 10 Laptop from the company I work for:

  • under Linux I am still prompted for the master password and the application window opens and works normal, so no big deal
  • under Windows 10, however, the process stalls with the error stacktrace in the console and I am unable to continue with the application.

First analysis

Investigating the com.formdev:flatlaf:0.43 dependency reveals that the inner class com.formdev.flatlaf.util.MultiResolutionImageSupport$MappedMultiResolutionImage is indeed missing from both the flatlaf-043.jar and the resulting jpass-0.1.21-SNAPSHOT.jar.
Maybe this problem could easily be resolved with updating the com.formdev:flatlaf:0.43, but I did not pursue this possibility yet.

Work around

In my fork of this project at https://github.com/wjc-van-es/jpass I just disabled the use of the com.formdev.flatlaf.FlatLaf lookAndFeel in jpass.JPass#main and used the platform default instead.
I admit this is a rather quick and dirty solution, but it works fine for me as the application now starts normally with the default Windows 10 look and feel without any errors.

Here is what I changed to make it work:

public static void main(final String[] args) {
        try {
         //// Start of block of dead code - I left it in to demonstrate it didn't cause NoClassDefFoundError   
            FlatLaf lookAndFeel;
            if (Configuration.getInstance().is("ui.theme.dark.mode.enabled", false)) {
                FlatDarkLaf.install();
                lookAndFeel = new FlatDarkLaf();
            } else {
                FlatLightLaf.install();
                lookAndFeel = new FlatLightLaf();
            }
        //// End of block of dead code ///////////////////////////////////
            
            JFrame.setDefaultLookAndFeelDecorated(true);
            JDialog.setDefaultLookAndFeelDecorated(true);

            // Ultimately results in a java.lang.NoClassDefFoundError during the call to the 
            // jpass.ui.JPassFrame.JPassFrame constructor: 
            // com/formdev/flatlaf/util/MultiResolutionImageSupport$MappedMultiResolutionImage
            //UIManager.setLookAndFeel(lookAndFeel);
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); //falling back on system default
        } catch (Exception e) {
            LOG.log(Level.CONFIG, "Could not set look and feel for the application", e);
        }

        SwingUtilities.invokeLater(() -> JPassFrame.getInstance((args.length > 0) ? args[0] : null));
    }

Improve application icon rendering on Windows taskbar

Improve application icon rendering on Windows taskbar by providing multiple image sizes for the application, e.g.:

Image image = new ImageIcon(...).getImage();
setIconImages(Stream.of(16, 20, 32, 40, 64, 80, 128, 160)
    .map(size -> image.getScaledInstance(size, size, Image.SCALE_SMOOTH))
    .collect(Collectors.toList()));

Preferably, use SVG instead of getScaledInstance.

Logo/Icon Proposal

Hi good day! Im Jibbie Eguna, a graphics designer, I would like to ask for your permission to propose a new designs of logo in your application/project. I would like to help projects in open-source .I would just like to propose new designs if you are needing it. Hoping for your positive response Thank You!

Demand suggestions

1.Provide memory of password file
It can automatically remember the password file opened last time, which is convenient for each use
2.Extend functionality to save common form contents such as name, mobile number, mailbox, etc.
3.It would be perfect if you could automatically populate a website or application.
4.Enable saved passwords to synchronize PC with mobile phone
Perhaps you can use the HTTP protocol for transport over a local area network?

Store the date of last modification of an entry

Hi, and many thanks for your work that I use almost every day.

Would you mind to add a property to the entries to store the date of creation / last modification of a password? (Note that if you are OK, I might propose a code change, albeit I am a bit rusty with swing)

Password strength estimation feature

Hey @gaborbata, I'd like to add a password strength estimation process during password generation. This will allow users to decide if they should use that password or generate another stronger. I have a POC for this:
01

Also, I'd like to add similar feature to Edit Entry Dialog to show current password strength.
02

Let me know what you think and if it's ok to proceed.

Possible contribution

Hello!

I am Giovanni, a student from University of Illinois at Chicago and I just cloned your repo for doing a homework with your application!

Since I created an sbt script in order to build and run the application and all the tests, I would like to know whether I could contribute to this repo with this script. Also, I've tested a class that wasn't covered.

Let me know!
Thank you,
Giovanni

Open File Dialog in the actual Directory

diff --git a/src/main/java/jpass/ui/action/MenuActionType.java b/src/main/java/jpass/ui/action/MenuActionType.java
index 4b1b3e9..f1e9e66 100644
--- a/src/main/java/jpass/ui/action/MenuActionType.java
+++ b/src/main/java/jpass/ui/action/MenuActionType.java
@@ -73,7 +73,7 @@

     @Override
     public void actionPerformed(ActionEvent ev) {
  •        openFile(JPassFrame.getInstance());
    
  •        openFile(JPassFrame.getInstance("."));
       }
    
    }),
    SAVE_FILE(new AbstractMenuAction("Save", getIcon("save"), getKeyStroke(KeyEvent.VK_S, CTRL_MASK)) {

Multilanguage interface

@gaborbata

Could you please consdier to modify sorurce code to have multilanguage interface?

Is it possible to use external file for list of strings?

Is it possible to use your program to open an URL and fillin user/password?

Cannot process document (Not in GZIP format)

Hello,
looks like my password db got corrupted somehow (not sure how though) and I cannot open it anymore.
Dummy me, I should have made a backup after the last change (it was just a password regeneration, but will be hard to reset again without the last one).
Is it possible to revive this file somehow?
Thanks!

image

EDIT: I reverted back to previous version of my password db and I have the same problem. So the issue is happening on the application level.

jpass.properties is ignored when the application is started from other directory where the jar file is

Related details from #19:

In windows I start the jar from a batch file that is in the same directory as the jar and the jpass.properties file.
In linux I had a bash file in a different location and in the bash file uses variables:
${java11Home}/bin/java -jar ${jpassDir}/${jarFile} ${jpassDir}/${jpFile}
Here the ${jpassDir} specifies the directory that contains the jar, the jpass.properties and the encrypted *.jpass file containing the password entries. I did this mainly because I was comparing different versions of jpass builds (different resulting jars) and run with different versions of the JDK, each configuration run with its own bash file. (In Windows I only have the JDK 11.0.9 installed).

Now I noticed that running jpass this way the jpass.properties is ignored. I took more notice because I changed the ui.theme.dark.mode.enabled=true to see if the FlatDarkLaf was really used with your fix. On Windows I saw the dark look and feel, but in Linux I didn't.
However, when I run in a console in the same directory where jar, jpass.properties and *.jpass file are in then the dark theme is enabled, which looks cool, by the way.
~/resources/pw/jpass$ /home/willem/App/Java/jdk-11.0.5/bin/java -jar jpass-0.1.21-SNAPSHOT.jar myPasswords.jpass 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.