GithubHelp home page GithubHelp logo

wso2-extensions / identity-outbound-auth-push Goto Github PK

View Code? Open in Web Editor NEW
3.0 58.0 18.0 3.21 MB

Aims at implementing biometric authentication for WSO2 IS.

License: Apache License 2.0

Kotlin 16.41% Java 74.59% CSS 0.64% JavaScript 0.02% TypeScript 8.33%

identity-outbound-auth-push's Introduction

identity-outbound-auth-push

Stackoverflow Join the chat at https://join.slack.com/t/wso2is/shared_invite/enQtNzk0MTI1OTg5NjM1LTllODZiMTYzMmY0YzljYjdhZGExZWVkZDUxOWVjZDJkZGIzNTE1NDllYWFhM2MyOGFjMDlkYzJjODJhOWQ4YjE License Twitter


Introduction

Push-Based Authentication lets a user authorize an authentication request using a dedicated mobile application. The technology used for sending the authentication request to the mobile phone is push notifications. By using this technology, it is possible to complete a secure and convenient multi-factor authentication flow.

Documentation

For installing the push-based authentication extension

For enabling push-based authentication and using it as a multi-factor authentication factor

For understanding the architecture and components of the push-based authenticator

For developing mobile apps to use push-based authentication

Contribute

Please read Contributing to the Code Base for details on our code of conduct, and the process for submitting pull requests to us.

Reporting Issues

We encourage you to report issues, improvements, and feature requests creating Github Issues.

Important: And please be advised that security issues must be reported to [email protected], not as GitHub issues, in order to reach the proper audience. We strongly advise following the WSO2 Security Vulnerability Reporting Guidelines when reporting the security issues.

License

This project is licensed under the Apache License 2.0. See the LICENSE file for details.

identity-outbound-auth-push's People

Contributors

avishkajayasundara avatar dependabot[bot] avatar janakamarasena avatar kalanadananjaya avatar kushanb avatar maheshika avatar mevan-karu avatar piraveena avatar pulasthi7 avatar rajithacharith avatar sachiniwettasinghe avatar sahandilshan avatar vivekvinushanth avatar wso2-jenkins-bot avatar yasara-y avatar

Stargazers

 avatar  avatar  avatar

Watchers

 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

identity-outbound-auth-push's Issues

Improve authentication flow for instance of selecting one out of multiple registered devices

Description:

Currently, the flow consists of

  1. Check if 1 or more devices is registered
  2. If more than 1 then redirect to the device selection page
  3. When a device is selected it calls the sendRequest method through the servlet

It should be changed such that

  1. Check if 1 or more devices is registered
  2. Authentication instance is marked as incomplete and re-directed to device selection page
  3. Send the selection back to the authenticator from commonauth API
  4. Re-initialize auth at canHandle and call sendRequest from there

Update the authentication request payload to support SDK requirements

Description:
The current data payload structure doesn't support the required information that needs to be displayed for an authentication request. Update the data sent from the server-side to support the below requirement

  • Connection code
  • Username
  • Email
  • Organization
  • Service Provide / Application
  • SP URL
  • Device accessing the SP
  • Web browser used
  • IP Address
  • Location (approximate/optional)

Use a unique value for getting the list of devices in the device handler

Description:

The current implementation gets the list of devices using the username of the user which is used to get the User ID. While this implementation will work for the super tenant, conflicts may occur when more than 1 tenant is available as the same username may appear in multiple places.

The following changes will have to be made to fix the issue

  • User ID passed as the argument from push authenticator class
  • User ID passed as the argument from API

Handle scenario of attempting to register an already registered device

Description:
Attempting to register an already registered device throws a SQL exception on the server side and returns an error 500 to the mobile app. The device can be registered with only 1 user that is in the same database.

The issue is caused by the PushID being considered as a unique value.

The response should be handled on the mobile app SDK and the QR code that should be scanned in order to register should be replaced with a message acknowledging the request was received and that it was for an already registered device.

Change signing algorithm for mobile authentication

Description:
The current implementation uses DSA as the signing algorithm. The libraries for React Native have a minimal support for DSA. The process can be aligned with TOTP standards by changing the signing algorithm to ECDSA or RSA.

Change endpoint for remove device API for mobile app use

Description:

The current implementation handles requests to remove the device that is called from the mobile app using the servlet. Instead use an endpoint from the Me API to handle the scenario as it should align with the functionalities of the Me API.

Create Firebase test account

Description:
Create a Firebase account that can be used to have the test project for managing the push notifications sent to WSO2 Verify.

Change API to support the authentication method

Description:
Currently only the 3-factor authentication (basic login + accept on app + biometric) is supported. Change the API to support 2-factor authentication (basic login + accept on app) as well.

Related Issues:
#20

Handle login attempt when a device isn't registered on IS for push-auth

Description:

If the user hasn't registered a device with the IS for push-based authentication, the devices page is displayed with no other links to either register a device or a message asking to register a device through my account.

Either

  1. Add an option to register a device during the authentication
  2. Display a message stating that a device should be registered in order to authenticate and give a hyperlink to my account

Merge opened PRs

Description:
Merge the opened pull requests related to biometric authentication

PRs to be merged

identity-outbound-auth-biometric

  • #5 "WSO2 Verify" Mobile Application

  • #12 Update pom files of the component

  • #9 Model classes of the bio-metric device handler component

  • #6 Biometric Device Handler Cache

  • #8 Device handler exceptions

  • #11 Device handler bundle activator and util classes

  • #7 Device handler dao

  • #10 Device handler core classes

  • #13 "WSO2 Verify" Android mobile application

  • #14 Modify Authentication flow to support device handler functions

  • #15 Extend the Android Mobile app to support device registration and Improve the Authentication Flow

identity-apps

  • wso2/identity-apps#973 Implement New Module to support the Biometric Authenticator Device Management Functionalities

Note
The version of the node modules for babel should be updated to v7.9.0 in the package.json file

identity-api-user

identity-rest-dispatcher

Rename the repository

Description:
Rename the repository to give a more meaningful name when the QR code authentication feature is added

Test Biometric Authenticator integrated in the Identity Server

Description:
Setup biometric authentication in the Identity Server and test its functionality using the mobile application by adding biometric as the outbound authentication method for an app using the identity server.

Suggested Labels:
Task, Milestone

Change SQL queries to refer to push authenticator table

Description:

The current implementation works with the table for Biometric authentication in the database. Change the table name and the required queries as Push authentication as the authenticator name has been changed.

Implement a function to resend the QR Code in case FCM fails

Description:
Currently the users do not have a secondary way of getting the details required for authentication through the mobile application in a scenario FCM fails. In order to avoid the issue a secondary method, preferably displaying a QR code containing the same data sent through firebase. The method used in the registration flow in order to scan the QR code can be modified and used for this function as well.

Optimise registration flow by changing attributes in QR code and server response

Description:

Currently, the QR code for registration contains multiple attributes that are not needed for the registration process but only required for storing the account information.

Have only the attributes required for the registration in the QR code and send all the account information back as the response to the registration request from the server when the request is completed.

Parameters duplicated in request to FCM to initiate authentication push message causing a false OK response

Description:
Some of the fields in the request sent to Firebase cloud messaging to send the authentication push notification to the mobile device have been duplicated causing the push notification to not arrive, but the server to get a response code 200.

How to fix:
Adjust the request to take the following format

{
    "notification": {
        "body": "admin is trying to log into pickup-dispatch at localhost",
    },
    "content_available": true,
    "data": {
        "sessionDataKey": "f089dfe7-d789-491b-9296-bb34ad8d5dde",
        "challenge": "2da478cd-ca29-4696-8b26-0451746d0612",
        "body": "admin is trying to log into pickup-dispatch at localhost",
        "click_action": "AuthenticateActivity",
        "deviceId": "ac17f16f-c12c-4138-95ef-0af6e2c5824d"
    },
    "to": "fQrUKjM_TyWc2w4QrK8vyB:APA91bFsNHubZZJJnhrxD_VG....",
    "priority": "high"
}

Changes should be made in identity-outbound-auth-biometric/components/org.wso2.carbon.identity.application.authenticator.biometric/src/main/java/org/wso2/carbon/identity/application/authenticator/biometric/notification/handler/impl/FirebasePushNotificationSenderImpl.java

Handle exception for get device API when a device is not found

Description:

The server throws an exception when polled to check if the device to be registered has got added to the database causing the exception to be thrown multiple times in the server with the full stack trace. The API returns 500 Internal server error

Handle the exception from the API component and return a 404 HTTP status code for the API call to indicate that the device is not found.

Add functionality to select authentication mechanism ex: biometric or push notification only

Description:
Ability to select either biometric authentication or push notification only when prompting to authenticate

  • #33 - Change API to support the authentication method
  • #34 - Add capability to the device to send at registration the authentication method it supports
  • #35 - Add capability for an Identity Developer to define authentication methods to be used
  • #36 - Add capability to login portal UI for a user to select the authentication method at login time
  • #37 - Add capability to send the selected login method data to the device and to make the device honor the selection

Sign the challenge sent from Identity Server to the Device

Description:
Sign the challenge sent from Identity Server to the Device. This will be used by the device to verify that the push notification came from the Identity Server. Since we will be using a 3rd party service to send push notification this will be useful.

Implement UI as a component

Description:
Create the UI elements required for the QR code authenticator as a component of the biometric authenticator.

Function to Send notifications to the device when changes are been made from the user portal

Description:
Currently the feature does not consists of a function to send the mobile device a notification when device details have been altered or removed from the user portal. While the device should simply get notification when the device name is changed the notification sent when a device is removed should also remove the data from the device upon clicking the notification.

Refactor Discovery Data method name to be more meaningful

Description:

Discovery data can appear in many authenticator components leading to confusion as to its purpose. Refactor to a more meaningful name for this instance such as getRegistrationDiscoveryData()

Changes should be made in the components below

  • Device handler component
  • API component where the method gets called

Auth request gets allowed for any response keyword

Description:

When the authorization request is sent the keyword "SUCCESSFUL" or "DENIED" should be given as auth_status. While the request gets denied only when the proper keyword is added, the request gets authorized with any keyword placed instead of "SUCCESSFUL"

Do proper validation on the server-side

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.