GithubHelp home page GithubHelp logo

authomator's People

Contributors

phish108 avatar

Watchers

 avatar  avatar

authomator's Issues

storage backends for user scopes

Currently the user scopes are part of the configuration. This makes things extremely inflexible.

Allow for storage backends for user scopes. authomator needs only read access to these backends. Management of user scopes can be entirely externalised.

A storage backend should return for a provided ( login | backend ) pair the corresponding scope.

Scope Management can be located:

  • memory/configuration (source, Key value pairs)
  • service (url, access info, method, extra data, userkey, scopekey)

others?

  • redis (service, access info, namespace, userkey)
  • sqllite (name, relation, usercol, scopecol)
  • mysql/maria sql (name, access info, relation, usercol, scopecol)
  • LDAP/AD (name, access info, baseCN, query, userkey, scopekey)

Separate frontends from the service core

In order to have maximum flexibility for customization, the UI should be separate from the service. The service should provide only data endpoints

  • info endpoint - provides the available issuers
  • User endpoint - provides the user info
  • Admin/issuer - provide admin details about the issuers
  • Admin/sessions - provide admin details about the current sessions (user+issuer)
  • Admin/users - configure the user scopes and origins
  • Admin/paths - allows checker to run against all URLs and use internal configs rather then server configs.
  • Internal and server configs must word side by side
  • The admin/* endpoints are checker protected.
  • The UI is checker protected
  • The UI has a separate repo/deployment
  • The ui uses the service endpoints to configure itself.

This separation gives more flexibility to integrate auth functions into a more complex application. An application can ask the endpoints to receive or update certain functions of the UI.

Impelement access interface

  • rest api
  • Gql api
  • Ldiff api
  • yaml api
  • Json api

The user management must not be part of authomator but provided by a separate backend/subsystem.

add context support to the config backend

the resolve function of config/index.mjs needs to be context aware. If a reference is made, it should be treated in the context of the containing file.

This makes the logic more complex, but also more user friendly.

support for multiple sites

If we have two sites with different CNAMEs, then authomator works only for one of them.

The service needs to register, which request URL has been posted.

This needs a bit of adaptation for different sites. The only common element across sites are the ports of the services.

Our configuration may change to:

common: 
    frontend: 
        port: 8080
    checker:
        port: 8081
sites: 
  - common:
          base_url: "https://site1" // some host url for the baseline for all requests
          entrypoint: /auth/ // the entrypoint for the authomator
          success_target: "/home/" // where to point users after successfull authentication
    backend: 
          backendname:
              name: Display Name
              icon: FontAwesomeIcon
              type: github
              baseurl: https://github.com
              client_id: githubs client_id
              client_secret: githubs client_secret
    user:
       - login: username
         scope: internal user scope for acl
  - common: 
          base_url: "https://site2" // some host url for the baseline for all requests
          entrypoint: /auth/ // the entrypoint for the authomator
          success_target: "/success/" // where to point users after successfull authentication
    backend: 
          backendname:
              name: Display Name
              icon: FontAwesomeIcon
              type: github
              baseurl: https://github.enterprise.com
              client_id: githubs client_id
              client_secret: githubs client_secret
    user:
       - login: otherusername
         scope: internal user scope for acl

ephermal sessions using JWT

Instead of having locally stored session id to validate against, we should issue JWT with the session information.

This would allow to store information about the user, scope and the authorised site.

This token should be a JWS+JWE, so it is signed by us and encrypted for us.

Add scope matching

Scope handling needs to be more flexible.

It should be possible to allow all users with certain IT claims to receive a scope without being explicitly configured.

Examples:

Give access to all users with a zhaw.ch address, while excluding students (who would have a @students.zhaw.ch address).

- match: @zhaw.ch
  target: eduid
  claim: email
  scope: user

Give access to all users who belong to an organization:

- match: ZHAW
  target: eduid
  claim: homeorg
  scope: user

Implement config api

Load the configuration from backend.

The configuration includes

  • basic settings

    • urls
    • timeouts
    • backends
  • auth services

  • yaml api

  • Json api

  • Gql api

  • Rest api

  • Ldap api

use error codes and caddy's handle_response feature

Towards the bottom of the documentation for the

reverse_proxy directive there is a remark on intercepting responses from the upstream.

This should allow us to send status codes instead of redirections. This would allow us to simplify the code and move parts of the configuration to caddy.

forward_auth /api/* autho_autho:8081 {
    uri /
   
    @401-403response {
        status 401,403
    }

   handle_response @401-403response {
        redir * /auth/
   }
}

reverse_proxy /auth/* autho_autho:8080 {

    # handles redirects when needed
    # autho will only send status codes 
    @401-403response {
        status 204,401,403
    }

   handle_response @401-403response {
       redir * /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.