Skip to content

Upgrade Thunder from v0.23.0 to v0.29.0 and align IdP bootstrap resources/configuration#260

Merged
ginaxu1 merged 4 commits intoOpenNSW:mainfrom
sthanikan2000:improve/thunder-0.27
Mar 23, 2026
Merged

Upgrade Thunder from v0.23.0 to v0.29.0 and align IdP bootstrap resources/configuration#260
ginaxu1 merged 4 commits intoOpenNSW:mainfrom
sthanikan2000:improve/thunder-0.27

Conversation

@sthanikan2000
Copy link
Copy Markdown
Member

@sthanikan2000 sthanikan2000 commented Mar 16, 2026

Summary

This PR upgrades Thunder from v0.23.0 to v0.27.0 and updates IdP bootstrap/configuration to match the v0.27 behavior and APIs.

The change includes:

  • Upgrading Thunder images in both IdP-specific and unified docker-compose setups.
  • Aligning setup-time URL/env handling for HTTPS bootstrap calls.
  • Updating bootstrap scripts to use the newer resource/permission and application configuration patterns.
  • Expanding sample bootstrap resources to include realistic OU hierarchy, user types, groups/roles, and M2M applications.

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Refactoring/upgrade (infrastructure/config + bootstrap compatibility updates)
  • Documentation update

What Changed

1. Thunder image upgrade

  • Updated Thunder image tag from v0.23.0 to v0.27.0 in:
    • idp/docker-compose.yml
    • docker-compose.yml

2. IdP bootstrap/runtime config alignment

  • Added/updated IdP setup env usage for:
    • THUNDER_API_BASE
    • THUNDER_PUBLIC_URL
    • THUNDER_SAMPLE_USER_PASSWORD
    • THUNDER_M2M_CLIENT_SECRET and per-M2M overrides
  • Updated env examples to reflect HTTPS local setup and new optional vars.

3. Bootstrap script updates for Thunder v0.27

  • Updated default bootstrap to be compatible with the current Thunder APIs and resource model.
  • Added support for loading bootstrap-local .env values for local execution parity.

4. Brief summary of changes in idp/02-sample-resources.sh

The sample bootstrap now provisions a full multi-OU seed model and related identities/apps:

  • Creates organization-unit structure:

    • Private Sector (root)
    • ABCD Traders (child)
    • Government Organization (root)
    • NPQS/FCAU/IRD (government child OUs)
  • Creates user types:

    • Private_User (private-sector users)
    • Government_User (government users)
  • Creates groups and roles:

    • Groups: Traders, CHA
    • Roles: Trader, CHA
    • Assigns roles to matching groups
  • Creates users and memberships:

    • Private users in ABCD Traders OU
    • Government users in NPQS/FCAU/IRD OUs
    • Group memberships to drive role inheritance
  • Creates portal SPA applications:

    • TRADER_PORTAL_APP
    • OGA_PORTAL_APP_NPQS
    • OGA_PORTAL_APP_FCAU
    • OGA_PORTAL_APP_IRD
  • Creates M2M applications (client_credentials):

    • NPQS_TO_NSW
    • FCAU_TO_NSW
    • IRD_TO_NSW
    • Uses env-configurable secrets with fallback chain
  • Adds improved helper/idempotency handling:

    • Application/user/group/role lookup helpers
    • Existing-resource handling for repeatable bootstrap runs

Why

  • Thunder v0.27 introduces behavior/schema differences vs v0.23 that require bootstrap and config alignment.
  • This update ensures local and docker-based startup produce a reproducible, functional identity seed state for NSW portals and inter-service M2M flows.

Related Issues

Related to #11 #12 #78 #224 #247 #248 #251

Validation Performed

  • Verified compose configuration after changes.
  • Ran clean bootstrap with volume reset and confirmed:
    • setup completes successfully,
    • default + sample resource scripts execute successfully,
    • M2M clients are created,
    • Develop console login/callback flow works with configured redirect URIs.

Notes for Reviewers

  • This PR includes both platform upgrade changes and bootstrap seed model updates.
  • The sample data model was intentionally expanded to better match current NSW flow needs (private-sector + government OUs, group/role inheritance, and M2M clients).

@sthanikan2000 sthanikan2000 requested a review from ginaxu1 March 16, 2026 12:58
@sthanikan2000 sthanikan2000 self-assigned this Mar 16, 2026
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 focuses on upgrading the Thunder Identity Provider to v0.27.0 and aligning its configurations and bootstrap scripts to match the new version's behavior. The changes ensure a functional identity seed state for NSW portals and inter-service M2M flows, with an expanded sample data model for better representation of real-world scenarios.

Highlights

  • Thunder Upgrade: Upgraded Thunder Identity Provider from v0.23.0 to v0.27.0, incorporating new features and addressing compatibility issues.
  • IdP Bootstrap Alignment: Aligned IdP bootstrap and runtime configurations with Thunder v0.27, ensuring proper setup and functionality.
  • Expanded Sample Resources: Enhanced sample bootstrap resources to include a realistic OU hierarchy, user types, groups/roles, and M2M applications for comprehensive testing and demonstration.
  • HTTPS Bootstrap Calls: Aligned setup-time URL/env handling for HTTPS bootstrap calls.
Changelog
  • .env.docker.example
    • Added sample user password and M2M client secret variables.
  • docker-compose.yml
    • Upgraded Thunder image tag to v0.27.0 for thunder-db-init, thunder-setup, and thunder services.
    • Updated environment variables for thunder-setup to align with v0.27, including M2M secrets and HTTPS API base.
  • idp/.env.example
    • Updated Thunder API and public URL examples to reflect HTTPS local setup.
  • idp/01-default-resources.sh
    • Added support for loading bootstrap-local .env values for local execution parity.
    • Added regex validation for email addresses in user schema.
    • Added mobileNumber, sub, name, picture, and password attributes to the user schema.
    • Modified admin user creation to use environment variables for username and password.
    • Implemented hierarchical permission model for system resources (ou, user, userschema, group) with view actions.
  • idp/02-sample-resources.sh
    • Refactored the script to use helper functions for resource lookup and creation.
    • Created private sector and government organization units with sample users, groups, and roles.
    • Created SPA applications for trader, NPQS, FCAU and IRD portals.
    • Created M2M applications for NPQS, FCAU, and IRD to NSW integrations.
  • idp/README.md
    • Updated default credentials to admin/1234 and updated developer console access URL to https.
    • Updated the description of the sample resources and current setup.
  • idp/deployment.yaml
    • Changed database config path to configdb.db.
    • Added localhost:3000 to allowed origins.
    • No changes to passkey allowed origins.
Activity
  • Thunder image upgrade from v0.23.0 to v0.27.0.
  • IdP bootstrap and runtime config alignment.
  • Bootstrap script updates for Thunder v0.27.
  • Expanded sample resources to include realistic OU hierarchy, user types, groups/roles, and M2M applications.
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
Copy Markdown
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 successfully upgrades Thunder from v0.23.0 to v0.27.0. The changes are comprehensive, covering Docker image updates, environment configuration alignment, and a significant refactoring of the bootstrap scripts to match the new APIs and resource model of Thunder v0.27. The sample resources have also been thoughtfully expanded. The overall changes are well-executed. I have one suggestion to improve the maintainability of a bootstrap script by refactoring some duplicated code.

Comment thread idp/01-default-resources.sh
ginaxu1
ginaxu1 previously approved these changes Mar 17, 2026
@sthanikan2000 sthanikan2000 requested a review from ginaxu1 March 19, 2026 17:18
@sthanikan2000 sthanikan2000 changed the title Upgrade Thunder from v0.23.0 to v0.27.0 and align IdP bootstrap resources/configuration Upgrade Thunder from v0.23.0 to v0.29.0 and align IdP bootstrap resources/configuration Mar 23, 2026
@ginaxu1 ginaxu1 merged commit 47f0192 into OpenNSW:main Mar 23, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants