Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mozilla-iam/auth0-callback-validator
https://github.com/mozilla-iam/auth0-callback-validator
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/mozilla-iam/auth0-callback-validator
- Owner: mozilla-iam
- License: mpl-2.0
- Created: 2024-06-14T09:55:36.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-07-16T22:39:47.000Z (6 months ago)
- Last Synced: 2024-07-17T23:49:30.020Z (6 months ago)
- Language: Python
- Size: 21.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# OIDC/SAML Callback URL Validator
## Introduction
This proposal outlines the development of a Python-based software tool designed to validate a list of OpenID Connect (OIDC) or Security Assertion Markup Language (SAML) callback URLs. The primary objective of this tool is to ensure that the provided URLs are accessible and respond with specific HTTP status codes indicating their validity which will be used to audit the callback list settings for each client application within Auth0. This document describes the functionality, components, and specifications required for the tool's implementation.## Objectives
* Primary Objective: To create a Python tool that takes a client_id, retrieves the client applications callback list, validates each callback URL against specified criteria, and returns their validity status.
* Usability Goal: To provide a straightforward and efficient mechanism for validating multiple OIDC or SAML callback URLs at once, ensuring they meet the necessary criteria for successful interactions.## Techstack
Python 3.12.3
[Auth0 Python SDK](https://auth0-python.readthedocs.io/en/latest/index.html)## Auth0 environment variables
To make use of this application three Auth0 variables have to be set up- AUTH0_DOMAIN
- AUTH0_CLIENT_ID
- AUTH0_CLIENT_SECRETThese variables can be set as a part of your shell environment variables or in a file name ```.env```
Without these variables you will not be able to run the code. these credentials are used to generate a token that interacts with the Auth0 Management API.The client should have the one following scopes set in Auth0:
- read:client
- read:client_keys
- read:client_credentials
- read:client_summarySee [Auth0 Get Clients](https://auth0.com/docs/api/management/v2/clients/get-clients) and [Auth- Get Clients By Id](https://auth0.com/docs/api/management/v2/clients/get-clients-by-id) for further documentation on required scopes.
## Running Tests
Run the command:```python3 -m unittest```
## Running Code
Run the command:```python3 validator/validator.py```
#### Examples
- show help message: ```python3 validator/validator.py -h```- retrieve callback urls for all clients: ```python3 validator/validator.py -a```
- retrieve callback urls for one client: ```python3 validator/validator.py client_id```
## Building an executable
Run the commands:```cd validator```
```pyinstaller --onefile validator.py```## Running the executable
pyinstaller will create the final executable in the ```dist``` directory and will be named ```validator```. You can run the executable by typing the command ```validator``` with the appropriate flags or values#### Examples
- show help message: ```./validator -h```- retrieve callback urls for all clients: ```./validator -a```
- retrieve callback urls for one client: ```./validator client_id```