Giter Site home page Giter Site logo

flask-multipass-cern's Introduction

Flask-Multipass-CERN

This package provides the cern auth and identity providers for Flask-Multipass.

These providers are only useful if you are at CERN and intend to use Flask-Multipass with the new Keycloak-based CERN authentication infrastructure.

In its current state it also overkill if all you want to do is logging in via OIDC. If that's your goal use the authlib multipass provider since Keycloak works perfectly fine with it.

In case you need access to arbitrary group membership information (e.g. for user-managed ACLs) and the ability to search for CERN users, then this is a good choice for you.

CERN usage details

The following permissions (requested through the application portal) are needed:

  • Token exchange with authorization-service-api for basic login functionality
  • Group membership in authorization-service-groups-readers for group functionality
  • Group membership in authorization-service-identity-readers for user search functionality
  • Tokens with group membership information (optional) - this needs to be requested directly from the authorization service team

Requesting them will most likely require you to have a professional justification.

Performance

When using group membership or user search, the library need to get an "API access" token from keycloak which typically takes 200-300ms. Set the cache key of the multipass identity provider configuration to the import path of a Flask-Caching instance or a function returning such an instance, or the instance itself to enable caching of tokens (until they expire) and group data (30 minutes).

If group membership information is included in tokens, it will be cached during login so the extra API call when checking whether a user is in a group won't be needed unless the cached data already expired.

Note

In applying the MIT license, CERN does not waive the privileges and immunities granted to it by virtue of its status as an Intergovernmental Organization or submit itself to any jurisdiction.

flask-multipass-cern's People

Contributors

javfg avatar thiefmaster avatar

Watchers

 avatar  avatar

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.