Coder Social home page Coder Social logo

jeremy-code-f / collective.msal Goto Github PK

View Code? Open in Web Editor NEW

This project forked from collective/collective.msal

0.0 1.0 0.0 59 KB

Microsoft Azure Authentication as Plone PAS Plugin

License: GNU General Public License v2.0

Python 89.89% Shell 1.97% RobotFramework 8.14%

collective.msal's Introduction

https://travis-ci.org/collective/collective.msal.svg?branch=master Coveralls Latest Version Egg Status

https://img.shields.io/pypi/pyversions/collective.msal.svg?style=plastic:alt:Supported-PythonVersions

License

collective.msal

Features

Simple PAS plugin that allows to a Microsoft Tenant users to authenticate on Plone. It relies on:

Documentation

The authentication happens on the Microsoft server side and then, if succeeded, it creates a local plone.session token keeping the plone user authenticated.

User documentation (in short)

  1. Setup an Azure App on Microsoft Azure Portal
  2. Configure environment vars in buildout configuration/ZMI
  3. Install the product collective.msal in plone control panel
  4. Use the [sign in with microsoft] button, that has been added to the login form, to authenticate
  5. enjoy

User documentation (little bit longer)

You have to setup your APP separately on Microsoft Azure portal first; then locally.

In the Azure Microsoft Platform:
  1. Register your application. This will provides you the CLIENT_ID and directory id of the tenant you will use as AUTHORITY parameter
  2. Configure your application in order to generate a CLIENT_SECRET
  3. Define a REDIRECT_PATH (by default: /collective.msal.getAToken). You can set these parameters as enviroment variabiles in buildout configuration (see Installation)
  4. Setup other Azure stuff according to Microsoft Documentation
Locally:
  1. In the instance buildout section: set environment variables properly. see Installation
  2. In Plone: Install the product via plone control panel. This will adds a Plone/acl_users/acl_msal plugin and overrides (z3c.jbot) the login form adding the Microsoft sign in button
  3. In ZMI Plone -> acl_users -> acl_msal -> Properties TAB: Verify the parameters CLIENT_ID, CLIENT_SECRET, AUTHORITY, and REDIRECT_PATH (this one by default should point to /collective.msal.getAToken)

If you want to write down your login form you may want to use the followig helper to generate the login href:

Plone/@@collective.msal.login

Translations

This product has been translated into

  • not really needed so far

Installation

Install collective.msal by adding it to your buildout:

[buildout]

...

eggs =
    collective.msal

[instance]

...

enviroment-vars +=
    CLIENT_ID 25305d7c-xxxx-yyyy-zzzz-abcdefg998877
    CLIENT_SECRET secret
    AUTHORITY https://login.microsoftonline.com/<ID_DIRECTORY_TENANT>
    REDIRECT_PATH /collective.msal.getAToken

and then running bin/buildout -Nv

Contribute

Support

If you are having issues, please let me know opening an issue here https://github.com/collective/collective.msal/issues

License

The project is licensed under the GPLv2.

collective.msal's People

Contributors

sauzher avatar

Watchers

James Cloos 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.