This project provides an opens source Freja eID Authenticator plug-in for the Curity Identity Server. This allows an administrator to add functionality to Curity which will then enable end users to login using their Freja eID credentials.
You can build the plugin by issue the command mvn package
. This will produce a JAR file in the target
directory, which can be installed.
To install the plugin, copy the compiled JAR (and all of its dependencies) into the ${IDSVR_HOME}/usr/share/plugins/${pluginGroup}
on each node, including the admin node. For more information about installing plugins, refer to the curity.io/plugins.
To configure a new Freja eID authenticator using the Curity admin UI, do the following after logging in:
Go to the
Authenticators
page of the authentication profile wherein the authenticator instance should be created.Click the
New Authenticator
button.Enter a name (e.g.,
freja-eid1
).For the type, pick the
Freja eID
option.On the next page, you can define all of the standard authenticator configuration options like any previous authenticator that should run, the resulting ACR, transformers that should be executed, etc. At the bottom of the configuration page, the Freja eID-specific options can be found.
Certain required configuration settings should be provided. One of these required settings is the
HTTP Client
setting. This is the HTTP client that will be used to communicate with the Freja eID OAuth server. You need to configure aClient SSL Keystore
and aServer Trust Store
before you create a Http Client.
- Click the
Facilities
button at the top-right of the screen.- Next to
Client SSL Keys
underCrypto
, clickNew
.- Enter some name (e.g.,
freja-eid-clientSSLKeystore
).- Select
Upload Existing
and clickNext
.- Upload the
Keystore
and enter itspassword
with an optionalalias
.- Click
Add & Commit
.
- Click the
Facilities
button at the top-right of the screen.- Next to
Server Trust Stores
underCrypto
, clickNew
.- Enter some name (e.g.,
frejaEidTrustStore
).- Upload
Public key file
.- Click
Add
.
- Click the
Facilities
button at the top-right of the screen.- Next to
HTTP
, clickNew
.- Enter some name (e.g.,
freja-eidClient
).- Enable
Use Truststore
toggle button.- Select the keystore that you just created in the steps above from the
Client Keystore
dropdown.- Click
Apply
.
Back in the Freja eID authenticator instance that you started to define, select the new HTTP client from the dropdown.
Select the
Environment
to use, eitherProduction
orPre Production
.Select the
User Info Type
from dropdown. It hasEmail
orSSN
as the allowed options.SSN
corresponds toUsername
.If applicable, you may also need to configure the
Relying Party ID
.
Once all of these changes are made, they will be staged, but not committed (i.e., not running). To make them active, click the Commit
menu option in the Changes
menu. Optionally enter a comment in the Deploy Changes
dialogue and click OK
.
Once the configuration is committed and running, the authenticator can be used like any other.
When QR Code Authentication is enabled, the authenticator will not present the user with a field to enter their identifier (email/ssn/phone). Instead, a QR code will be displayed that the user must scan in order to perform authentication. The Freja API returns N/A as the userInfo in this case, so the subject of the authentication must be taken from the attributesToReturn. The authenticator will select the subject based on which attributes where present in the response in the following order:
- Custom Identifier
- Integrator Specific User ID
- Relying Party User ID
- Social Security Number
If none of these attributes above are returned, the authentication will fail and the user will be redirected to the authentication endpoint so they may try a different authenticator (if configured) or try to login again.
Note: When QR Code is enabled, the authenticator will try to autostart the Freja e-id mobile app. This can be disabled by overriding the template freja-eid/authenticate/wait.vm and removing the parsing of authentication-app-launcher fragment. In case the authenticator is to be used by a specific mobile app, it is possible to override freja-eid/handle-auto-start-uri.vm to pass an extra parameter to the url so the Freja e-id application can go back to the original application.
To test the plugin in Pre Production
environment, follow the below instructions.
- Download app from
AppStore
orPlayStore
. - Start the app in
Test Mode
by following instructions from Verisec. - Activate your ID by entering your email and confirming it.
- Now you can use this email for testing.
- In order to use
SSN
for testing, you need to vet your ID first - Upgrade your account from mobile app
- Vet your ID by following the instructions from Verisec.
- After that you can use your
SSN
for testing.
Note :: You can find detailed instructions from documentation provided by Verisec.
You can also use mock node server for testing which will act as Freja e-id server.
Follow the instructions below to run and use mock node server.
Start the node server using docker compose. Docker and Docker compose should be installed on your machine.
docker-compose up
Change the host value to
localhost
inFrejaEidAuthenticatorPluginConfig.kt
like below.Rebuild the plugin and test the authentication flow using test mock server.
Please visit curity.io for more information about the Curity Identity Server.