irmago is an IRMA implementation in Go. It contains multiple libraries and applications:
- The commandline tool
irma, which contains an IRMA server; subcommands for manipulating IRMA schemes, generating IRMA issuer public/private keypairs, performing test IRMA sessions on the command line; and more. - The Go library
irmaserverproviding a HTTP server that handles IRMA session with the IRMA mobile app, and functions for starting and managing IRMA sessions. - The root package
irmacontains generic IRMA functionality used by all other components below, such as parsing IRMA schemes, parsing IRMA metadata attributes, and structs representing messages of the IRMA protocol. - The Go package
irmaclientis a library that serves as the client in the IRMA protocol; it can receive and disclose IRMA attributes and store and read them from storage. It also implements the keyshare protocol and handles registering to keyshare servers. The IRMA mobile app usesirmaclient.
Technical documentation of all components of irmago and more can be found at https://irma.app/docs.
go get -d -u github.com/privacybydesign/irmago
irmago and its subpackages uses dep for its dependencies. After Installing dep if necesssary, run
cd $GOPATH/src/github.com/privacybydesign/irmago
dep ensure
to download and vendor the correct version of
each dependency. To install the irma command line tool:
go install ./irma
For running the unit tests, you need to run irma_keyshare_server and irma_api_server locally.
-
Copy or symlink the
irma_configurationfolder fromtestdata/to the configuration of the Keyshare server.- Note that a
gradle appRunwon't automatically use the newirma_configurationfolder if it was already built with an old one. For this, usegradle clean.
- Note that a
-
Add the keyshare user used in the unit tests to the keyshare database by a command like this:
mysql -uirma -pirma irma_keyshare < keyshareuser.sql -
Make sure
check_user_enabledis set to false in the Keyshare server configuration. Other options are already setup correctly in the example configuration.
- Copy or symlink the
irma_configurationfolder fromtestdata/to the configuration of the IRMA api server.- Note that a
gradle appRunwon't automatically use the newirma_configurationfolder if it was already built with an old one. For this, usegradle clean.
- Note that a
The tests can be run by using:
go test -v ./...