Giter VIP home page Giter VIP logo

irma_mobile's Introduction

This project is deprecated and therefore not maintained anymore. The live repository of the IRMA app is now at github.com/privacybydesign/irmamobile (without underscore).

irma_mobile

Authentication made easy, privacy-friendly, and secure

IRMA offers a privacy-friendly, flexible and secure solution to many authentication problems, putting the user in full control over his/her data.

The IRMA app manages the user's IRMA attributes: receiving new attributes, selectively disclosing them to others, and attaching them to signed statements. These attributes can be relevant properties, such as: "I am over 18", "my name is ..." and "I am entitled to access ....". They are only stored on the user's device and nowhere else.

Screenshot of the IRMA app on Android, showing the 'Your Attributes' screen with four credentials.   Screenshot of the IRMA app on iOS, showing the 'Your Attributes' screen with two credentials.   Screenshot of the IRMA app on Android, showing the 'disclose these attributes?' screen. Screenshot of the IRMA app on iOS, showing the PIN entry screen during a disclosure session.  

Building the app for development

  • Follow the steps for "Installing dependencies" for "Building Projects with Native Code" (not the "Quick Start"):

  • Install the Go toolchain and Dep package manager:

  • Install and init gomobile:

    • This will take a (quiet) while:
    go get golang.org/x/mobile/cmd/gomobile
    gomobile init
    
    • Android:
      • gomobile init should automatically pickup the Android NDK if it is installed through the SDK Manager and $ANDROID_HOME is set. Otherwise you need to use the -ndk option.
  • Clone this project so it is located inside your $GOPATH:

    • go get github.com/privacybydesign/irma_mobile should do the trick
    • You can ignore the no Go code warning; we fetch the dependencies of the irmagobridge subpackage via Dep.
  • Install Javascript dependencies using Yarn or NPM, and vendor Go dependencies:

    cd $GOPATH/src/github.com/privacybydesign/irma_mobile
    yarn install
    dep ensure
    
  • Connect your phone with a cable, or use a simulator

    • iOS:
      • By default, a new simulator is automatically created when building the app in the next step. See yarn run react-native run-ios --help for more options.
    • Android:
      • If using a physical phone, verify that the device is visible with the command adb devices
      • To create an Android Virtual Device, follow the steps under "Preparing the Android device" for "Building Projects with Native Code": https://facebook.github.io/react-native/docs/0.51/getting-started.html
      • By default, the only available device or simulator will be used when running the app in the next step. See yarn run react-native run-android --help for more options.
  • Build and run the app for development:

    yarn run ios
    

    or

    yarn run android
    
    • Alternatively, Xcode or Android Studio can be used to launch the app and use the IDE tools.

Troubleshooting

  • If Javascript compilation fails with an error that some source cannot be resolved or located (i.e. cannot resolve 'lib/...', 'store/...'), it often helps to clear the Babel build cache with yarn start --reset-cache. You may need to kill old Node server (killall node) if you get a port binding error.

  • If you get the following error during compilation of the go bridge on Go 1.10, package gobind: cannot find package "gobind" in any of" by upgrade go and gomobile, try to upgrade gomobile to the latest version and run gomobile init again (see gomobile issue 108336).

  • If you get this error during compilation of the go bridge for Android:

    seq_android.c:213:3: error: implicitly declaring library function 'memcpy' with type 'void *(void *, const void *, unsigned long)' [-Werror,-Wimplicit-function-declaration]
    seq_android.c:213:3: note: include the header <string.h> or explicitly provide a declaration for 'memcpy'
    

    Then you have a too new version of the Android NDK (>=r16), see here: golang/go#22766

    You can workaround this by including string.h in the following file: $GOPATH/src/golang.org/x/mobile/bind/java/seq_android.c.support

  • If you get this error during running on Android in debug mode:

    adb server version (36) doesn't match this client (39); killing...
    

    Then try adb reconnect

  • If your iOS build seems to fail with error: An organization slug is required (provide with --org), this actually isn't a fatal error and IRMA.app will be successfully installed to your device. The error is due to a sentry.properties file which isn't necessary in development. This should be fixed to not be a failure in development.

  • If running gomobile init gives the error:

    gomobile: /usr/local/go/bin/go install golang.org/x/mobile/cmd/gobind failed: exit status 1
    ../src/golang.org/x/mobile/internal/importers/ast.go:37:2: cannot find package "golang.org/x/tools/go/packages" in any of:
    

    Install the following package: go get golang.org/x/tools/go/packages.

Manual testing

We use BrowserStack to test on actual devices:

irma_mobile's People

Contributors

aykevl avatar confiks avatar davidv1992 avatar ivard avatar joostholslag avatar koen92 avatar leonbotros avatar sietseringers 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

Watchers

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

irma_mobile's Issues

Grammatical error in iOS

After clicking “IRMA account verwijderen” in the iOS app a text is displayed with an error in Dutch grammar. Should probably be “Weet u zeker dat u uw IRMA account en alle attributen permanent wilt verwijderen?”
I’d love to create a pr for this myself but I can’t locate the text.
3504FFF5-AB12-4E4C-A50B-4D3D1C7D591A

[build] detox: Command failed, exit code: 65

Hi,

I am trying to follow Readme.md and build application to iOS.

After yarn install I am getting following error message:

[4/4] 📃  Building fresh packages...
[-/4] ⡀ waiting...
[2/4] ⡀ @sentry/cli
[3/4] ⡀ detox
error /Users/vn/go/src/github.com/privacybydesign/irma_mobile/node_modules/detox: Command failed.
Exit code: 65
Command: scripts/postinstall.sh
Arguments: 
Directory: /Users/vn/go/src/github.com/privacybydesign/irma_mobile/node_modules/detox
Output:
irma_mobile [master] % node -v
v8.12.0
irma_mobile [master] % yarn -v
1.10.1
irma_mobile [master] % git rev-parse HEAD
4ce95722b16ff8fa4f0bab5762f043fda804a14a

Could you please suggest something for fixing it?
Looks like detox is not yet built, when it trying to use it.

Signing with unknown attribute crashes app

To reproduce:
Construct a contract with an attribute which the user does not have
Scan the QR
The app crashes without error.

Details:
OS: iOS
App version: 5.5.3 (35)

Request: clientReturnUrl or similar also in QR workflow

The clientReturnUrl functionality is designed to work in the mobile-only flow. It however is not intended to work when starting the session on a separate machine and using the QR-code flow.

For my current use case I am interested in using the clientReturnUrl or something similar to initialize an Irma session on a computer or tablet, disclose using a phone, and subsequently to start calling a phonenumber with the tel:+123456 scheme.

I am able to submit a merge request for this, as soon as a decision can be made concerning the desirability and proper interface for this change.

Android irmagobridge rebuild

The current android build system does not properly rebuild the irmagobride when making changes to the irmagobridge go files.

Crash when requesting credential

One of my clients tried requesting a credential pbdf.pbdf.email, whilst intending to request the attribute pbdf.pbdf.email.email. Once the app has scanned the QR code and the session is started, the app hard-crashes without showing an error dialog.

JWT payload

{
  "sub": "verification_request",
  "sprequest": {
    "request": {
      "@context": "https://irma.app/ld/request/disclosure/v2",
      "disclose": [
        [
          [
            "pbdf.pbdf.email"
          ]
        ]
      ]
    },
    "validity": 30
  },
  "iss": "<knip>",
  "iat": 1578914140
}

Android log

I have attached the Android systemlog for this crash: irma-stacktrace.txt

[iOS] Problems scanning multiple QR codes in a row

I am experiencing some problems on my iOS device when scanning multiple QR codes in a row. The first code scans fluently, but the next ones don't scan at all. When I force close the application (swipe up in iOS application list) and reopen the application, the same code scans again immediately.

App version: 5.4.1
iOS version: 12.1.4
Device: iPhone 8, 64GB (MQ6G2ZD/A)

New feature: Add fingerprint scanner support

Describe the issue

The last few years fingerprint scanners and other identity validation technologies have been moved into smartphones. Thus soon or later the request for a fingerprint scanner or facial recognition sign-in method to the IRMA app will be raised. Currently the app supports signing in via an app specific PIN code. Will it be possible to replace this for a fingerprint scanner check?

Test case

Steps to reproduce

Scenario A: When the user doesn't have an IRMA account yet:

  1. Open the app and create a new account.
  2. Enter your pin code and complete next steps.
  3. Sign in to the app with your PIN code.

Scenario B: When the user does have an IRMA account:

  1. Open the IRMA app and sign in with your PIN code.
  2. Open the menu and select "Change pin".
  3. Enter your current and new PIN.

Expected result

At step A2 and B2 there should be an option to toggle change the authentication method to fingerprint scanner.

Actual result

There is only an option to use a PIN code as authentication method.

[iOS 5.4.1] CredentialDashboard buttons become unusable after session

Na binnenhalen credentials (accepteren) kom je weer in de lijst met credentials. Dan kun je nog wel verticaal door de lijst scrollen en credentials uitklappen, maar de twee buttons links- en rechtsboven werken niet meer.
Het slotje rechtsboven verandert nog wel van helderheid wanneer je het aanraakt - maar triggert geen lock

Changing pin when already being blocked by the keyshare server results in a generic error message

This is mostly irma_keyshare_server, but the resulting bug can be seen in irma_mobile:

  • If you block yourself first and then resubmit any pin, you'll get a generic error of type USER_BLOCKED, instead of a nice error message (that you do get when first blocking yourself)
  • In irma_keyshare_server, there seems to be a conflation of a blocked user via the ENABLED_FIELD and a blocked pin. Only in the latter case there is a release time.
  • The returned statuses of the PinResource are confusing, with STATUS_FAILURE and STATUS_ERROR actually being an incorrect pin and a blocked user respectively.

Peer to peer validation

It might be desirable to support peer-to-peer validation. Meaning that anybody can “sign” attributes of their peers from their IRMA app. It can make IRMA more scalable and lower the barriers to adoption.

In essense this would allow me to say; I will make a new attribute; greatDancer, and have my friends sign it. If I then go to a party of a friends friend, I can prove that our mutual friend thinks I am a great dancer. 🕺🏻

Another one; I make an attribute “hasAFever” and I have my mother sign (and timestamp) it, I can now prove I was sick yesterday and therefore didn’t do my homework. (I used to able to forge my moms signature in high school, so this would actually be a step backwards 😛)

By making this possible, IRMA can support the widest amount of usecases.

I’m curious to hear thoughts on the concept and technical feasiblity.

Slow

The app is really slow. Checking my pin, opening the lock screen. Starting up the camera etc.
App version 5.5.3 (35)
Device: iPhone 5s with iOS 12.2

Refreshing attribute 'phone number' creates duplicate

My phone number (issued by SPbD) expired. When trying to refresh, IRMA created a new attribute 'phone number' and also kept the old, expired attribute. Phone number is the same, no changes in number, IMEI or provider.

expected behaviour: after refreshing the attribute gets a new expiry date, with the rest of the data staying the same.

Multiple citizenship requires walled off identities

If the user has multiple citizenship, each country may make requirements about their disclosure of attributes. This means that the client MUST have sufficient abstraction for the grouping of a single citizen "identity" under a separate, (or the same) PIN. This will also help with the duress resistance and deniability features that the client app require.

It would be nice if the user also has the option to view all attributes in all of their citizenship's at once, (but some very good UI/UX is required to help the user sign with their intended citizenship.)

Additionally this will help with heirloom identities that can/will be passed between users. (If I become Dean of another University, I can import that attribute from my predecessor, to show continuity.)

Contact info missing at screen 'Over IRMA'

On the screen 'Over IRMA' the sentence 'Mocht u problemen tegenkomen ... graag van horen' is not followed by reference were to post the comments. Please explain how to get into contact for feed back.
Consider that github.com is for ordinary users too technical.

Hide 'Uw attributen' behind pin option

I can always open IRMA and get a view on my attributes. Some attributes are very private like BSN so consider to give the user the option to hide the attributes behind the app's pin code as an extra security measure.
The next thing to consider is then what to do when the user wants to authenticate intimidate afterwards: enter pin again or has a grace period of 10 seconds.

Why do attributes expire?

I just got my attributes from BRP using the IRMA app, very cool, congratulations!

I was wondering. Why do you set an expiry date instead of timestamping it?

Timestamping is like saying; we, municipality x, state that currently “19-02-2018” these attributes are valid. After that, the verifying party can decide if that date is close enough to the present for them to be valuable. For example I might want to prove I was living somewhere a couple years ago, so then I just care about when it was true, not if the party that gave out the credentials thinks they are still valid.

Just wondering if this choice has a conceptual or technical reasoning, or that it can be an improvement, in that case please see this as a feature request :)

[Android] Vault animation

Two things that maybe should be separate issues:

  • Some users report stuttering animations for the vault
  • The animation duration seems a tiny bit long when you have to use the app multiple times a day

Go compilation fails with Go 1.10.x for Android

It seems to be an issue with the Gradle plugin passing the -i flag, and this somehow becoming a problem with Go 1.10.x. See golang/go#25076 and https://go-review.googlesource.com/c/mobile/+/109144.

Workaround is to downgrade to 1.9.x, or to manually compile the irmagobridge with:

gomobile bind -target android github.com/privacybydesign/irma_mobile/irmagobridge /path/to/irma_mobile/android/irmagobridge/irmagobridge.aar

and replace irma_mobile/android/irmagobridge/build.gradle with:

configurations.maybeCreate("default")
artifacts.add("default", file('irmagobridge.aar'))

Signup does not let user specify their own IRMA server

During initial account configuration the client app on the phone should, (MUST?) offer the user the option to specify their own IRMA back-end server. (We should look to Mozilla and how they let anyone install their own Firefox Accounts server.)

Copy/move irma account to other device.

I know that the attributes are only stored in the local device and not on the server. When I get a new phone, I need to make a new account and go over all the attribute publishers.

Please consider to use same account on multiple devices and copy a (set of) attributes via QR code from one device to another, optionally via authentication via the MijnIrma.

The login to MijnIrma can be done via e-mail, but it might be that the email is linked to multiple accounts in case of multiple registrations. It looks like that email login does not work any more in that case.

Authenticate without qr-code

Hi,
Is there an accessibility option built-in in the irma app for people that can't use there camera on a smartphone?

It is possible to extract the data of a qr by software like zbar and it would be really nice if you can use this extracted as input in the irma app.

If there is an other way to authenticate without using a qr-code as input, let me know

Starting the app with intent

Starting the application with a intent that has a fallback_url will cause the application to go to that url when you disclose the attributies instead of going back to the place the intent came from.

const intent = `intent://${url}#Intent;package=org.irmacard.cardemu;scheme=cardemu;l.timestamp=${Date.now()};S.browser_fallback_url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dorg.irmacard.cardemu;end`;

Update README to correctly configure NDK

After following the instructions in the README, I have an NDK in $ANDROID_HOME/ndk/20.0.5594570, but yarn run android fails with:

> Task :irmagobridge:gobind FAILED
/home/aengelen/dev/go/bin/gomobile: no Android NDK found in $ANDROID_HOME/ndk-bundle nor in $ANDROID_NDK_HOME

I'm not sure if the fix is to somehow initialize gomobile with the correct NDK path or to document setting ANDROID_NDK_HOME - but the latter seems to work for me ;).

Might be related to golang/go#28449

Authenticate without qr-code

Hi,
Is there an accessibility option built-in in the irma app for people that can't use there camera on a smartphone?

It is possible to extract the data of a qr by software like zbar and it would be really nice if you can use this extracted as input in the irma app.

If there is an other way to authenticate without using a qr-code as input, I like it to hear.

IRMA needs internet

Hello!

I have installed the irmago server and I am trying to test a demo session with the IRMA app, which I've downloaded from Google Play. The problem is that whenever I scan the QR code it tells me that it doesn't have an internet connection after loading for a while. I have tried going into developer mode but it is still the same.

Lock screen delay lets user see attributes

The lock screen takes too much time to show (>5 seconds) on my iPhone 5s. This gives a user enough time to see sensitive information. Also it delays the interaction resulting in a negative UX.

[Metro Bundler] bundling failed: Error: Cannot find module 'babel-preset-react-native'

The latest code on the master branch is unable to be bundled with Metro

Loading dependency graph, done.
error: bundling failed: Error: Cannot find module 'babel-preset-react-native' from '/Users/vn/go/src/github.com/privacybydesign/irma_mobile'
- If you want to resolve "react-native", use "module:react-native"

I tried to use "module:react-native" in .babelrc, but it does not help.
Where to dig? 🔬

[Android] Attribute order

The order of attributes in the "Your attributes" list seems non-deterministic. When I remove attributes, the order changes. Which is extra annoying when removing multiple attributes and having to go through the mental task of find the right ones to delete each time I click.

Extra bonus request: Sort the expired attributes to the bottom?

Is it possible to delete or archive attributes?

In IRMA I've got some old or expired attributes that are 'polluting' my vault. Like the entry to the beerfridge of a certain field lab ;-). Is it possible to delete or archive these attributes?

Seriously, for longterm users I think this is a necessary function: people change their mail adress, phone number or bank provider. Now the old attributes of the same kind stay in the vault with an 'expired date'.

Also from the context of 'regie op gegevens', every user should be able to delete attributes when not used or required anymore.

Avoid use of front (selfie) camera

Describe the issue

Currently when I open the scan function in the Irma App on my Oppo Reno smartphone. The front camera also pops out. Where as with other scanner apps like the one of ING app, this doesn't happen. The rear camera is the only camera being used.

Presumably I therefor make the conclusion that the IRMA app activates both camera's for the scanner app, however it only uses one.

Test case

Steps to reproduce

  1. Launch the IRMA app.
  2. Enter your pin.
  3. Press the button "Scan QR Code".

Expected result

Only the rear camera is activated and all visual input is received.

Actual result

On my phone the front camera slides out/pops up and thus seems to be activated, as well as the rear camera. However the rear camera seems to stream its visual input to the app. The front camera doesn't seem to share any input with the app.

README improvements

In the general README for setting up IRMA mobile two minor things can be improved.
In this part:

  • Install javascript dependencies using Yarn or NPM:
    cd $GOPATH/github.com/privacybydesign/irma_mobile
    
    

the path should be $GOPATH/src/github.com/privacybydesign/irma_mobile

  • In irma_configuration the timestamp file is missing. This should be added or in the README should be added that someone must create this file. The error message saying that this file is missing is very vague and can only be found in one of the information lines of logcat (in case of Android), so this issue is difficult to find.

A missing attribute does not cancel the session

When a disclosure requires an attribute currently not in the irma-app of the user, the following error shows:
IMG_3200

But the session does not get cancelled and the verifier has no way to tell the user what has happened.

Enter PIN automatically when using 7 digits

Proposal: When using 7 digits, enter the PIN automatically when the 7th digit is selected.

This is more intuitive, saves a tap on "done", and is an incentive to use a 7 digit PIN.

Please change button name from "Dismiss" to "OK"

Dear IRMA-team,

my preliminary usability evaluations have revealed some issues with the "Dismiss" button. We think it would be better to call this button "OK" (whenever the user just has to acknowledge that something has happened.)

Best,
Hanna

[Build failed] glog-0.3.4 is not configured before usage in irma_mobile

Hello,

I am trying to build irma_mobile by the instructions provided in README.md.

yarn run react-native run-ios

But I am getting following error

In file included from /Users/vn/go/src/github.com/privacybydesign/irma_mobile/node_modules/react-native/third-party/glog-0.3.4/src/logging.cc:32:
In file included from /Users/vn/go/src/github.com/privacybydesign/irma_mobile/node_modules/react-native/third-party/glog-0.3.4/src/utilities.h:73:
/Users/vn/go/src/github.com/privacybydesign/irma_mobile/node_modules/react-native/third-party/glog-0.3.4/src/base/mutex.h:105:10: fatal error: 'config.h' file not found
#include "config.h"           // to figure out pthreads support
         ^~~~~~~~~~


** BUILD FAILED **
irma_mobile [master●] % git rev-parse HEAD                    
4ce95722b16ff8fa4f0bab5762f043fda804a14a

Is it somewhere stable branch or tag to try with README.md?

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.