This application provides a RESTful API for managing OIDC (OpenID Connect) connectors with Dex, an open-source OIDC provider. It serves as a backend service that allows users to create, update, delete, and list OIDC connectors over HTTP. This will be useful if you embed DexIDP in your app and want to let users manage their own OIDC.
-
Connector Types:
- Supports multiple types of OIDC connectors:
- General OIDC Connector: Provides standard OIDC functionality with customizable issuer.
- EntraID OIDC Connector: Integrates with Microsoft Entra (Azure AD) and fetches the issuer dynamically based on the specified tenant ID.
- Google Workspace OIDC Connector: Facilitates OIDC authentication for Google Workspace applications.
- Supports multiple types of OIDC connectors:
-
Connector Management:
- Create: Add new connectors with required parameters such as client ID and secret.
- Update: Modify existing connectors while retaining their identities.
- Delete: Remove connectors by their IDs.
- List: Retrieve all configured connectors or filter by type.
-
Dynamic Issuer Fetching:
- The EntraID connector automatically fetches the issuer URL based on the tenant ID.
-
Validation:
- Ensures that all required fields are present and formatted correctly.
-
Logging:
- Uses Logrus for detailed logging, aiding in monitoring and debugging.
curl -X POST http://localhost:8080/create/oidc \
-H "Content-Type: application/json" \
-d '{
"issuer": "https://example.com",
"client_id": "your-client-id",
"client_secret": "your-client-secret"
}'curl -X POST http://localhost:8080/create/oidc/entraid \
-H "Content-Type: application/json" \
-d '{
"tenant_id": "4725ad3d-5ab0-4f42-8a4a-fdee5ef586c5",
"client_id": "your-client-id",
"client_secret": "your-client-secret"
}'curl -X POST http://localhost:8080/create/oidc/google-workspace \
-H "Content-Type: application/json" \
-d '{
"client_id": "your-client-id",
"client_secret": "your-client-secret"
}'-
Delete a General OIDC Connector:
curl -X DELETE http://localhost:8080/delete/default-oidc
-
Delete an EntraID OIDC Connector:
curl -X DELETE http://localhost:8080/delete/entraid-oidc
-
Delete a Google Workspace OIDC Connector:
curl -X DELETE http://localhost:8080/delete/google-workspace-oidc
curl -X GET http://localhost:8080/listcurl -X GET http://localhost:8080/list/oidcThis OIDC connector management application simplifies integration with various identity providers using OIDC. It supports dynamic issuer retrieval and comprehensive validation, making the setup process straightforward and enhancing the reliability of authentication services. Whether for generic OIDC applications or specific implementations like Google Workspace or EntraID, this application offers flexibility and functionality critical to modern identity management solutions.
-
To Create Connectors:
- General OIDC:
curl -X POST http://localhost:8080/create/oidc ...
- EntraID OIDC:
curl -X POST http://localhost:8080/create/oidc/entraid ...
- Google Workspace OIDC:
curl -X POST http://localhost:8080/create/oidc/google-workspace ...
- General OIDC:
-
To Delete Connectors:
- General OIDC:
curl -X DELETE http://localhost:8080/delete/default-oidc
- EntraID OIDC:
curl -X DELETE http://localhost:8080/delete/entraid-oidc
- Google Workspace OIDC:
curl -X DELETE http://localhost:8080/delete/google-workspace-oidc
- General OIDC:
-
To List Connectors:
- List All Connectors:
curl -X GET http://localhost:8080/list
- List OIDC Connectors Only:
curl -X GET http://localhost:8080/list/oidc
- List All Connectors:
Make sure to replace placeholders like your-client-id and your-client-secret with actual values appropriate for your setup.