-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from Panopto/ms-graph-connector
Microsoft Graph Connector support (beta)
- Loading branch information
Showing
14 changed files
with
935 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
src\panoptoindexconnector\implementations\microsoft_graph_schema.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,105 +1,53 @@ | ||
# | ||
# This file is autogenerated by pip-compile with python 3.7 | ||
# This file is autogenerated by pip-compile | ||
# To update, run: | ||
# | ||
# pip-compile --output-file=requirements.txt requirements.in | ||
# | ||
|
||
-e . | ||
# via -r requirements.in | ||
astroid==2.4.2 | ||
# via pylint | ||
atomicwrites==1.4.0 | ||
# via pytest | ||
attrs==20.3.0 | ||
# via pytest | ||
certifi==2020.12.5 | ||
# via requests | ||
chardet==4.0.0 | ||
# via requests | ||
click==7.1.2 | ||
# via pip-tools | ||
colorama==0.4.4 | ||
# via | ||
# pylint | ||
# pytest | ||
coverage==5.3 | ||
# via | ||
# -r requirements.in | ||
# pytest-cov | ||
flake8==3.8.4 | ||
# via -r requirements.in | ||
idna==2.10 | ||
# via requests | ||
importlib-metadata==3.3.0 | ||
# via | ||
# flake8 | ||
# pluggy | ||
# pytest | ||
iniconfig==1.1.1 | ||
# via pytest | ||
isort==5.6.4 | ||
# via pylint | ||
lazy-object-proxy==1.4.3 | ||
# via astroid | ||
mccabe==0.6.1 | ||
# via | ||
# flake8 | ||
# pylint | ||
mock==4.0.3 | ||
# via -r requirements.in | ||
packaging==20.8 | ||
# via pytest | ||
pip-tools==5.4.0 | ||
# via -r requirements.in | ||
pluggy==0.13.1 | ||
# via pytest | ||
py==1.10.0 | ||
# via pytest | ||
pycodestyle==2.6.0 | ||
# via | ||
# -r requirements.in | ||
# flake8 | ||
pyflakes==2.2.0 | ||
# via | ||
# -r requirements.in | ||
# flake8 | ||
pylint==2.6.0 | ||
# via -r requirements.in | ||
pyparsing==2.4.7 | ||
# via packaging | ||
pyreadline==2.1 | ||
# via panoptoindexconnector | ||
pytest==6.2.1 | ||
# via | ||
# -r requirements.in | ||
# pytest-cov | ||
pytest-cov==2.10.1 | ||
# via -r requirements.in | ||
pytest-runner==5.2 | ||
# via -r requirements.in | ||
requests==2.25.1 | ||
# via panoptoindexconnector | ||
ruamel.yaml==0.15.50 | ||
# via panoptoindexconnector | ||
six==1.15.0 | ||
# via | ||
# astroid | ||
# pip-tools | ||
toml==0.10.2 | ||
# via | ||
# pylint | ||
# pytest | ||
typed-ast==1.4.1 | ||
# via astroid | ||
typing-extensions==3.7.4.3 | ||
# via importlib-metadata | ||
urllib3==1.26.6 | ||
# via requests | ||
wrapt==1.12.1 | ||
# via astroid | ||
zipp==3.4.0 | ||
# via importlib-metadata | ||
astroid==2.4.2 # via pylint | ||
atomicwrites==1.4.0 # via pytest | ||
attrs==20.3.0 # via pytest | ||
certifi==2020.12.5 # via requests | ||
cffi==1.15.0 # via cryptography | ||
chardet==4.0.0 # via requests | ||
click==7.1.2 # via pip-tools | ||
colorama==0.4.4 # via pylint, pytest | ||
coverage==5.3 # via -r requirements.in, pytest-cov | ||
cryptography==36.0.0 # via msal, pyjwt | ||
flake8==3.8.4 # via -r requirements.in | ||
idna==2.10 # via requests | ||
importlib-metadata==3.3.0 # via flake8, pluggy, pytest | ||
iniconfig==1.1.1 # via pytest | ||
isort==5.6.4 # via pylint | ||
lazy-object-proxy==1.4.3 # via astroid | ||
mccabe==0.6.1 # via flake8, pylint | ||
mock==4.0.3 # via -r requirements.in | ||
msal==1.16.0 # via panoptoindexconnector | ||
packaging==20.8 # via pytest | ||
pip-tools==5.4.0 # via -r requirements.in | ||
pluggy==0.13.1 # via pytest | ||
py==1.10.0 # via pytest | ||
pycodestyle==2.6.0 # via -r requirements.in, flake8 | ||
pycparser==2.21 # via cffi | ||
pyflakes==2.2.0 # via -r requirements.in, flake8 | ||
pyjwt[crypto]==2.3.0 # via msal | ||
pylint==2.6.0 # via -r requirements.in | ||
pyparsing==2.4.7 # via packaging | ||
pyreadline==2.1 # via panoptoindexconnector | ||
pytest-cov==2.10.1 # via -r requirements.in | ||
pytest-runner==5.2 # via -r requirements.in | ||
pytest==6.2.1 # via -r requirements.in, pytest-cov | ||
requests==2.25.1 # via msal, panoptoindexconnector | ||
ruamel.yaml==0.15.50 # via panoptoindexconnector | ||
six==1.15.0 # via astroid, pip-tools | ||
toml==0.10.2 # via pylint, pytest | ||
typed-ast==1.4.1 # via astroid | ||
typing-extensions==3.7.4.3 # via importlib-metadata | ||
urllib3==1.26.6 # via requests | ||
wrapt==1.12.1 # via astroid | ||
zipp==3.4.0 # via importlib-metadata | ||
|
||
# The following packages are considered to be unsafe in a requirements file: | ||
# pip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,9 @@ def readme(): | |
with open('README.md') as readme_file: | ||
return readme_file.read() | ||
|
||
|
||
REQUIRES = [ | ||
'msal', | ||
'pyreadline', | ||
'requests', | ||
'ruamel.yaml<=15.66.0', | ||
|
@@ -26,7 +28,7 @@ def readme(): | |
author_email='[email protected]', | ||
description=('A general application for connecting a panopto search index to an external source'), | ||
long_description=readme(), | ||
keywords=['python', 'panopto', 'connector', 'attivio', 'coveo'], | ||
keywords=['python', 'panopto', 'connector', 'attivio', 'coveo', 'microsoft_graph'], | ||
|
||
install_requires=REQUIRES, | ||
package_data={ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,6 @@ | |
*.yaml | ||
!attivio.yaml | ||
!coveo.yaml | ||
!microsoft_graph.yaml | ||
!debug.yaml | ||
!template.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
class CustomExceptions: | ||
""" | ||
User-defined exceptions | ||
""" | ||
|
||
class Error(Exception): | ||
"""Base class for other exceptions""" | ||
pass | ||
|
||
class QuotaLimitExceededError(Error): | ||
"""Raised when the Tenant quota has exceeded""" | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
src/panoptoindexconnector/implementations/microsoft_graph.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# | ||
# Panopto index connector configuration file | ||
# | ||
|
||
|
||
# The address to your panopto site | ||
panopto_site_address: https://your.site.panopto.com | ||
|
||
# The oauth credentials to connect to the panopto API | ||
panopto_oauth_credentials: | ||
username: myconnectoruser | ||
password: mypassword | ||
client_id: 123 | ||
client_secret: 456 | ||
grant_type: password | ||
|
||
# Your index integration target endpoint | ||
target_address: https://graph.microsoft.com/v1.0/external/connections | ||
|
||
# Your Microsoft graph data for the connector | ||
target_credentials: | ||
tenant_id: 00000000-0000-0000-0000-000000000000 | ||
client_id: 00000000-0000-0000-0000-000000000000 | ||
client_secret: myclientsecret | ||
grant_type: client_credentials | ||
authority: https://login.microsoftonline.com | ||
scopes: | ||
- https://graph.microsoft.com/.default | ||
|
||
# Your Microsoft graph connection (connector) that will be used to push Panopto items to | ||
target_connection: | ||
# 'id' can only have ASCII alphanumeric characters and no empty spaces. | ||
id: sampleConnectionId | ||
name: Sample connection name | ||
description: Sample connection description | ||
|
||
# The name of your implementation | ||
target_implementation: microsoft_graph_implementation | ||
|
||
# Set to "true" if we should not push permissions to the target; | ||
# often used with the principal_allowlist to control permissions by | ||
# what is synced rather than matching the ID Provider on the target | ||
skip_permissions: false | ||
|
||
# Sleep time to avoid limitation between synced items per second. | ||
# Panopto API allows 100 request per minute. | ||
sleep_seconds: 0.6 | ||
|
||
# Define the mapping from Panopto fields to the target field names | ||
field_mapping: | ||
|
||
# Id in panopto maps to id in Microsoft graph | ||
Id: id | ||
|
||
# Top level data | ||
Info: | ||
Title: title | ||
Url: uri | ||
ThumbnailUrl: thumbnailUrl | ||
|
||
# Content data | ||
Metadata: | ||
Folder: folder | ||
Summary: description | ||
MachineTranscription: machineTranscription | ||
HumanTranscription: humanTranscription | ||
ScreenCapture: screenCapture | ||
Presentation: presentation |
Oops, something went wrong.