Giter Site home page Giter Site logo

auth's People

Contributors

aholovko avatar baha-ai avatar birtony avatar dependabot[bot] avatar fqutishat avatar heidihan0000 avatar moopli avatar rolsonquadras avatar serenahacker avatar sudeshrshetty avatar talwinder50 avatar troyronda avatar vkubiv avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

auth's Issues

Implement SSO - Single Sign On as authentication service

service must return same identifier when same user login.

  • Service must return the same identifier for the user/client combination. The user's identifier remains stable for each client but is different among clients.
  • Service successfully authenticates user to a client only for as long as the user has consented to it (or is it of one time use?)

BDD tests with Hydra

Could not be added at this time because Hydra is not set up in the BDD tests.

setup UI endpoint to serve the UI

PR #37 is adding the UI stuff but not actually serving it.

This is a followup for task #19 : need to redirect the user to the UI endpoint when finished handling the OIDC callback. The redirectURL should contain a handle of some sort that can be used by the UI to fetch the user's bootstrap info and offer it to the wallet via CHAPI.

OIDC implementation for GitHub

  1. Handle the login request
    • id token the sub inside the token should be stable per client id atleast
  2. Handle the callback

hydra configuration script

The exit code for the hydra command invocation is not checked, therefore the hydra configuration script always succeeds whether the command failed or not.

To aid troubleshooing, we should check the exit code and fail properly.

Make TLS optional

If the cert/key path are not passed to the container, it intermittently fails without a clear cause. Breaks the expectation of the cert/key parameters being optional.

Error: open : no such file or directory

Enable oidc client registration in hub-auth

Hub-auth will act as oidc provider as well where the client like kms will registerr the application
Before using hub-auth with your application, you must register your application with the service. This is done through a registration form in the “developer” or “API” portion of the service’s website, where you will provide the following information (and probably details about your application):

Application Name
Application Website
Redirect URI or Callback URL

Once your application is registered, the service will issue “client credentials” in the form of a client identifier and a client secret.

Accept plain OAuth2 Bearer Tokens, not base64-encoded

I still believe that RFC6750 mandates the base64-encoding of the access_token in the Authorization header but after further research into it I've realized that many if not all vendors process the token in plain form (more precisely, in the same format, byte-for-byte, as was delivered in the access token response (RFC6749 section 4.1.4)).

Client components impacted by this change are:

https://github.com/trustbloc/hub-auth/blob/413a3517d5d5a373780c7f55d7f866456db5a31a/pkg/restapi/operation/operations.go#L806-L833

Setup Configuration API

Instead of starting the one oidc client , this api will provide the crud operation to create the multiple oidc clients .. like google . apple, twitter etc

User devices store

Followup to PR #57 .

We need a new store for the user's devices. The user's devices are not part of their bootstrap data.

When a user logs in using their device ("wallet unlock"), the user's device info will serve to locate the user's bootstrap profile, which will be served back to the wallet.

Support Wallet Login & Lock/Unlock

hub-auth resources

View
resource type sensitive? served? usage
key server URLs list of URLs no yes edge-agent Vue.js sets up key stores, then initializes wallet
sds server URLs list of URLs no yes edge-agent Vue.js sets up vaults, then initializes wallet
keyStoreIDs list of IDs yes yes edge-agent aries-framework-go KMS
SDS vault IDs list of IDs yes yes edge-agent aries-framework-go storage
user devices info list of tuples {AAGUID publicKey, x509_cert} yes no when unlocking: validate if device is registered and to which user before giving access to bootstrap resources (primary key is wiped from devices when locked, needs to be fetched from network)
locations of user primary key shares list of SDS locations of the user's primary key shares (split w/SSS) yes yes a) when unlocking: edge-agent Vue.js needs location + authZ to fetch those shares; b) key server needs locations + authZ to fetch those shares to unlock the user's key store and do crypto operations
authorized wallet callback URIs list of URIs no no configuration: helps restrict processing of authZ requests to authorized wallets

Breakdown

View
  • hub-auth
    • /login endpoint #50
      • serve page with OIDC provider options
      • invokes /oauth2/request endpoint and redirects
    • handleOIDCCallback() should accept login request at hydra and redirect back to hydra
    • /consent endpoint
      • accept consent request at hydra and redirect back to hydra
    • BDD Tests with Hydra #52
    • setup Hydra
    • BDD Tests
    • GET /bootstrap
      • protect with access_token
      • introspect at Hydra - use sub to locate the user's bootstrap data
    • PUT /bootstrap
      • protect with access_token
      • updates user's bootstrap data
    • configure allowed user devices
      • TODO collection of tuples: {AAGUID, x509_cert} ?
    • POST /device
      • protect with access_token
      • TODO model: {AAGUID, x509_cert} ?
      • validate: AAGUID/x509_cert are allowed
  • session expiry
    • expiry of access_tokens #55

Initial Issuer Server

Initial issuer server with one test handler. makefile targets to start, configure, stop and test Hydra OAuth2 server.

Third party OIDC providers

We need OIDC client credentials for Google's/Apple's/Microsoft's/GitHub's authentication service that we can use to login the user.

Handle user data

if the token is a JWT then the derived token can simply include a hash of the original + claims with the identity of the key server and resources they are authorized to access. This new token is encrypted for hub-auth.

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.