This authentication SPI allows to implement 2factor authentication by sending verification code using Firebase on mobile applications
-
RHSSO instance
-
mvn 3.6.2+
-
java jdk 1.8
-
Firebase configuration
- Provide Firebase Admin SDK, JSON-formatted file (service account credentials) and place it inside the project (eg: src/resources/META-INF/google)
- Change the path and defaults in pushauthconstants.java
mvn clean install
Add the jar to the rhsso server:
$ cp target/rhsso-push-authenticator-jar-with-dependencies.jar _RHSSO_HOME_/providers/
Add two templates to the rhsso server:
$ cp themes/push-notification-2fa _RHSSO_HOME_/themes/
Add the jar to the rhsso server:
mvn clean install wildfly:deploy
Add two templates to the rhsso server:
$ cp themes/push-notification-2fa _RHSSO_HOME_/themes/
-
Create a new Realm (eg. Push 2FA)
-
Under new Realm > Under Authentication > Flows:
- Copy 'Browse' flow and set name as '2FA Push Browser' flow
- Click on 'Actions > Add execution on the '2FA Push Browser Forms' line and add the 'Push notification - Firebase'
- Set 'Push notification - Firebase' to 'REQUIRED'
-
Under new Ream > Under Authentication > Bindings:
- Select '2FA Push Browser' as the 'Browser Flow' for the REALM.
-
Under new Ream > Themes:
- Set Login theme as 'push-notification-2fa'.