Content :
This file contains hidden or 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
| """A simple wrapper for prefect server, with apikey and basic auth check. | |
| usage: | |
| ```bash | |
| # Allow prefect cli to access the server with same PREFECT_API_KEY. | |
| PREFECT_API_KEY=XX | |
| # base64 encoded `username:password`. Allow users to access the server with user:password. | |
| PREFECT_BASIC_AUTH=XX | |
| # start server | |
| uvicorn --host $PREFECT_SERVER_API_HOST --port $PREFECT_SERVER_API_PORT --factory server:create_auth_app |
This file contains hidden or 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
| dispatch:beforeDispatchLoop | |
| dispatch:beforeDispatch | |
| dispatch:beforeNotFoundAction | |
| dispatch:beforeExecuteRoute | |
| dispatch:afterInitialize | |
| dispatch:afterExecuteRoute | |
| dispatch:afterDispatch | |
| dispatch:afterDispatchLoop | |
| dispatch:beforeException |
This file has been truncated, but you can view the full file.
This file contains hidden or 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
| { | |
| "error": null, | |
| "id": 0, | |
| "principal": "admin@host", | |
| "result": { | |
| "commands": { | |
| "aci_add": { | |
| "name": "aci_add", | |
| "takes_args": [], | |
| "takes_options": [ |
This file contains hidden or 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
| import kerberos | |
| import sys | |
| import os | |
| from requests.auth import AuthBase | |
| import requests | |
| import json | |
| class IPAAuth(AuthBase): | |
| def __init__(self, hostname, keytab): | |
| self.hostname = hostname |