Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
language: android
jdk: oraclejdk8
sudo: true

before_cache:
# Do not cache a few Gradle files/directories (see https://docs.travis-ci.com/user/languages/java/#Caching)
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/

cache:
directories:
# Gradle dependencies
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/

# Android build cache (see https://developer.android.com/studio/build/build-cache.html)
- $HOME/.android/build-cache

before_script:
- mkdir -p $ANDROID_HOME/licenses
- echo "8933bad161af4178b1185d1a37fbf41ea5269c55" > $ANDROID_HOME/licenses/android-sdk-license
- echo "d56f5187479451eabf01fb78af6dfcb131a6481e" >> $ANDROID_HOME/licenses/android-sdk-license
- mkdir -p $HOME/.android # silence sdkmanager warning
- echo 'count=0' > $HOME/.android/repositories.cfg # silence sdkmanager warning
- echo y | $ANDROID_HOME/tools/bin/sdkmanager 'tools' 'platform-tools' 'build-tools;27.0.3' > /dev/null
- echo y | $ANDROID_HOME/tools/bin/sdkmanager 'platforms;android-27' > /dev/null
- echo y | $ANDROID_HOME/tools/bin/sdkmanager 'ndk-bundle' 'cmake;3.6.4111459' 'lldb;3.1' > /dev/null

script:
- ./gradlew clean build
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,12 @@ Authorizer does not require root permissions when it is allowed to write to /dev

### Compatibility

| Features | Windows | Linux (⚠️) | macOS (⚠️) | iOS | Android |
| -------------------- | :-----: | :---: | :---: | :---: | :-----: |
| AutoType - USB | ✅ | ✅ | ✅ | ✅ | ✅ |
| AutoType - Bluetooth | ✅ | ✅ | ✅ | ✅ | ✅ |
| FIDO U2F | ✅ | ✅ | ✅ | ✅ | ✅ |
| FIDO WebAuthn | ✅ | ✅ | ✅ | ✅ | ✅ |

⚠️ For macOS and Linux, Chrome or other compatible browser is required. Firefox does not support FIDO / FIDO2 over Bluetooth natively on these platforms.
| Features | Windows | Linux | MacOS | iOS | Android |
| ----------------- | :-----: | :---: | :---: | :---: | :-----: |
| AutoType - USB | X | X | X | X | X |
| AutoType - Bluetooth | X | X | X | X | X |
| FIDO U2F | X | X | | | X |
| FIDO WebAuthn | X | X | | | X |

## Features in Detail

Expand Down Expand Up @@ -125,6 +123,7 @@ In progress
- The experience of Bluetooth-stack stability can differ between devices, as it is dependent on both the Android version and the specific device being used.
- Due to limitations in the Bluetooth-stack, Authorizer can only be paired as Keyboard OR as FIDO Security key and not both.
- It is important to unpair from the other device as well to prevent unexpected behavior, when establishing a new pairing under a separate profile (like Keyboard or FIDO).
- FIDO U2F & WebAuthn is currently not compatible with Apple MacOS and Apple iOS, as they expecting a different HID_REPORT_SIZE.
- Currently, FIDO credentials can't be added to existing records.


Expand Down
85 changes: 24 additions & 61 deletions authorizer/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import java.text.SimpleDateFormat

/*
* Copyright (©) 2016 Jeff Harris <[email protected]>
* All rights reserved. Use of the code is allowed under the
Expand All @@ -10,31 +8,17 @@ import java.text.SimpleDateFormat

apply plugin: 'com.android.application'

static def gitRevision() {
def cmd = "git rev-parse --short HEAD"
return cmd.execute().text.trim()
}

static def buildTime() {
def df = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss Z")
return df.format(new Date())
}

android {
namespace 'net.tjado.passwdsafe'

compileSdk 34
compileSdkVersion 33
defaultConfig {
applicationId 'net.tjado.passwdsafe'
minSdkVersion 21
minSdkVersion 26
resourceConfigurations += ['de']
targetSdkVersion 34
targetSdkVersion 33
versionCode 500
versionName '0.5.0'

buildConfigField 'String', 'BUILD_ID', "\"${gitRevision()}\""
buildConfigField 'String', 'BUILD_DATE', "\"${buildTime()}\""

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

//Reference them in .xml files.
Expand All @@ -52,21 +36,15 @@ android {
debug {
debuggable true
minifyEnabled false
proguardFiles += getDefaultProguardFile(
'proguard-android-optimize.txt')
proguardFiles += 'proguard-rules.pro'
proguardFiles += 'proguard-rules-debug.pro'
testProguardFiles += getDefaultProguardFile(
'proguard-android-optimize.txt')

testProguardFiles += 'proguard-rules-test.pro'
ndk {
debugSymbolLevel "FULL"
}
}
release {
minifyEnabled true
proguardFiles += getDefaultProguardFile(
'proguard-android-optimize.txt')
proguardFiles += 'proguard-rules.pro'

ndk {
Expand All @@ -75,8 +53,8 @@ android {
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
productFlavors {
}
Expand All @@ -102,33 +80,17 @@ if (project.file('../sign/sign.gradle').exists()) {
}

dependencies {
def room_version = "2.5.2"
def yubikey_version = "2.3.0"
def espresso_version = "3.5.1"

api 'androidx.annotation:annotation:1.7.0'
api 'androidx.cardview:cardview:1.0.0'
api 'androidx.constraintlayout:constraintlayout:2.1.4'
api 'androidx.gridlayout:gridlayout:1.0.0'
api 'androidx.legacy:legacy-preference-v14:1.0.0'
api 'androidx.legacy:legacy-support-v4:1.0.0'
api 'androidx.lifecycle:lifecycle-viewmodel:2.6.2'
api 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.2'
api 'androidx.preference:preference:1.2.1'
api 'com.google.android.material:material:1.9.0'

// Avoiding duplicate class errors
implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.8.22"))

implementation 'androidx.appcompat:appcompat:1.7.0-alpha03'
def room_version = "2.4.3"

implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation project(':lib')

implementation 'androidx.appcompat:appcompat:1.6.0-rc01'
implementation 'androidx.biometric:biometric:1.1.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.3.1'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'androidx.recyclerview:recyclerview-selection:1.1.0'

implementation "com.yubico.yubikit:yubiotp:$yubikey_version"
implementation "com.yubico.yubikit:android:$yubikey_version"
implementation 'com.github.tony19:logback-android:3.0.0'

implementation 'com.github.bmelnychuk:atv:1.2.9'
implementation 'com.mikepenz:iconics-core:2.8.1@aar'
Expand All @@ -138,12 +100,13 @@ dependencies {
implementation 'com.mikepenz:fastadapter:2.0.0@aar'
implementation 'org.bouncycastle:bcprov-jdk18on:1.71.1'
implementation 'org.bouncycastle:bcpg-jdk18on:1.71.1'
implementation 'org.bouncycastle:bcpkix-jdk18on:1.71.1'
implementation 'io.fotoapparat.fotoapparat:library:1.4.1'
implementation 'com.google.zxing:core:3.5.1'

// FIDO (WebAuthn/U2F) dependencies
implementation 'co.nstant.in:cbor:0.9'
implementation 'com.google.code.gson:gson:2.9.0'
implementation 'com.google.code.gson:gson:2.8.9'
implementation 'com.google.guava:guava:31.1-android'
implementation 'rocks.xmpp:precis:1.1.0'

Expand All @@ -155,25 +118,25 @@ dependencies {
androidTestImplementation 'androidx.test:core:1.5.0'

// AndroidJUnitRunner and JUnit Rules
androidTestImplementation 'androidx.test:runner:1.5.2'
androidTestImplementation 'androidx.test:runner:1.5.1'
androidTestImplementation 'androidx.test:rules:1.5.0'

// Assertions
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.ext:junit:1.1.4'
androidTestImplementation 'androidx.test.ext:truth:1.5.0'
androidTestImplementation 'com.google.truth:truth:1.1.3'

// Espresso dependencies
androidTestImplementation "androidx.test.espresso:espresso-core:$espresso_version"
androidTestImplementation "androidx.test.espresso:espresso-contrib:$espresso_version"
androidTestImplementation "androidx.test.espresso:espresso-intents:$espresso_version"
androidTestImplementation "androidx.test.espresso:espresso-accessibility:$espresso_version"
androidTestImplementation "androidx.test.espresso:espresso-web:$espresso_version"
androidTestImplementation "androidx.test.espresso.idling:idling-concurrent:$espresso_version"
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0'
androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.5.0'
androidTestImplementation 'androidx.test.espresso:espresso-intents:3.5.0'
androidTestImplementation 'androidx.test.espresso:espresso-accessibility:3.5.0'
androidTestImplementation 'androidx.test.espresso:espresso-web:3.5.0'
androidTestImplementation 'androidx.test.espresso.idling:idling-concurrent:3.5.0'

// The following Espresso dependency can be either "implementation"
// or "androidTestImplementation", depending on whether you want the
// dependency to appear on your APK's compile classpath or the test APK
// classpath.
androidTestImplementation "androidx.test.espresso:espresso-idling-resource:$espresso_version"
androidTestImplementation 'androidx.test.espresso:espresso-idling-resource:3.5.0'
}
9 changes: 0 additions & 9 deletions authorizer/proguard-rules-debug.pro
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,3 @@

-keep,includedescriptorclasses class androidx.** { *; }
-dontwarn androidx.window.**

-keepclassmembers class **.R$* {
public static <fields>;
}

#
# Needed for tests which use Kotlin
#
-keep public class kotlin.LazyKt
30 changes: 1 addition & 29 deletions authorizer/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -20,32 +20,4 @@
-keep class net.tjado.authorizer.*
-keepclasseswithmembernames,includedescriptorclasses class org.pwsafe.lib.crypto.SHA256Pws {
native <methods>;
}

#
# logback-android. From project wiki narrowed to just what is needed for logcat
#

# Issue #229
-keepclassmembers class ch.qos.logback.classic.pattern.* { <init>(); }

-keep public class org.slf4j.impl.** { *; }
-keep public class ch.qos.logback.classic.** { *; }
-keepattributes *Annotation*
-dontwarn ch.qos.logback.core.net.*

#
# For stack traces
#
-keepattributes LineNumberTable,SourceFile
-renamesourcefileattribute SourceFile

#
# Misc
#
-dontwarn edu.umd.cs.findbugs.annotations.SuppressFBWarnings
-dontwarn javax.annotation.Nonnull
-dontwarn javax.annotation.Nullable


#-printconfiguration /tmp/full-r8-config.txt
}
12 changes: 5 additions & 7 deletions authorizer/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,6 @@
<uses-feature
android:name="android.hardware.nfc"
android:required="false"/>
<uses-feature
android:name="android.hardware.usb.host"
android:required="false"/>

<uses-sdk xmlns:tools="http://schemas.android.com/tools"
tools:overrideLibrary="android.support.v14.preference" />

<queries>
<provider android:authorities="net.tjado.passwdsafe.file" />
Expand All @@ -68,7 +62,6 @@
<activity
android:name=".PasswdSafe"
android:launchMode="singleTop"
android:configChanges="keyboard|keyboardHidden"
android:exported="true"
android:windowSoftInputMode="stateAlwaysVisible|adjustPan">

Expand All @@ -79,6 +72,11 @@
<category android:name="android.intent.category.MULTIWINDOW_LAUNCHER"/>
</intent-filter>

<intent-filter>
<action android:name="android.nfc.action.TECH_DISCOVERED"/>
</intent-filter>


<!-- View files -->
<intent-filter>
<action android:name="net.tjado.passwdsafe.action.VIEW"/>
Expand Down
23 changes: 0 additions & 23 deletions authorizer/src/main/assets/logback.xml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
package net.tjado.authorizer;

public interface OutputInterface {
public enum Language { en_US, en_GB, de_DE, AppleMac_de_DE, de_CH, fr_CH, fr_FR, neo }
public enum Language { en_US, en_GB, de_DE, AppleMac_de_DE, de_CH, fr_CH, neo }
public boolean setLanguage(OutputInterface.Language lang);
public int sendText(String text) throws Exception;
public int sendReturn() throws Exception;
Expand Down
Loading