Skip to content

feat: add Identity Provider Factory and Interface scripts#256

Open
Aravinda-HWK wants to merge 3 commits intoLSFLK:mainfrom
Aravinda-HWK:255-feature-create-identity-provider-interface
Open

feat: add Identity Provider Factory and Interface scripts#256
Aravinda-HWK wants to merge 3 commits intoLSFLK:mainfrom
Aravinda-HWK:255-feature-create-identity-provider-interface

Conversation

@Aravinda-HWK
Copy link
Collaborator

📌 Description

This PR is to add identity provider factory and interface scripts into the system, where we will be able to integrate any ipd into the system.


🔍 Changes Made

  • Create idp-factory.sh file
  • Create idp-interface.sh file

✅ Checklist (Email System)

  • Core services tested (SMTP, IMAP, mail storage, end-to-end delivery)
  • Security & compliance verified (auth via Thunder IDP, TLS, DKIM/SPF/DMARC, spam/virus filtering)
  • Configuration & deployment checked (configs generated, Docker/Compose updated)
  • Reliability confirmed (error handling, logging, monitoring)
  • Documentation & usage notes updated (README, deployment, API)

🧪 Testing Instructions


📷 Screenshots / Logs (if applicable)


⚠️ Notes for Reviewers

@Aravinda-HWK Aravinda-HWK self-assigned this Feb 15, 2026
@CLAassistant
Copy link

CLAassistant commented Feb 15, 2026

CLA assistant check
All committers have signed the CLA.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @Aravinda-HWK, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a robust and flexible framework for integrating various Identity Providers into the system. By establishing a factory pattern and a standardized interface, it significantly enhances the system's ability to manage authentication mechanisms, allowing for easier adoption of new IdPs and improved maintainability.

Highlights

  • Identity Provider Factory Introduced: A new idp-factory.sh script has been added to dynamically load and manage different Identity Provider (IdP) implementations based on configuration, supporting extensibility for authentication mechanisms.
  • Standardized IdP Interface Defined: An idp-interface.sh script now defines a clear contract that all IdP implementations must adhere to, ensuring consistency in how providers are initialized, configured, and cleaned up.
  • Provider Validation Mechanism: The system includes a validation helper to ensure that any loaded IdP provider (e.g., Thunder, Keycloak) correctly implements all required functions as defined by the interface.
Changelog
  • scripts/idp/idp-factory.sh
    • Created idp-factory.sh to serve as the central point for creating and managing Identity Provider instances.
    • Implemented logic to dynamically source specific provider scripts (e.g., thunder-idp.sh, keycloak-idp.sh) based on a given provider name.
    • Added a get_provider_from_config function to extract the desired IdP from a silver.yaml configuration file.
    • Exported key functions and variables (IDP_PROVIDER, IDP_INITIALIZE, etc.) for external use by other scripts.
  • scripts/idp/idp-interface.sh
    • Created idp-interface.sh to define the mandatory functions that all Identity Provider implementations must provide.
    • Outlined the required interface functions: _initialize, _wait_for_ready, _configure, _get_compose_file, and _cleanup.
    • Included a validate_provider_implementation helper function to verify that a provider script adheres to the defined interface contract.
    • Defined color codes for consistent and informative output messages within the scripts.
Activity
  • No specific activity (comments, reviews) has been recorded on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a well-structured factory pattern for identity providers using bash scripts, which is a great step towards making the system more extensible. The code is generally clean and well-documented. My review includes a few suggestions to improve robustness, reduce code duplication, and adhere to common shell scripting conventions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Create Identity Provider interface and factory

2 participants