Skip to content

Apply a default sign-out flow automatically instead of an enable toggle#4332

Merged
ThaminduDilshan merged 1 commit into
thunder-id:mainfrom
madurangasiriwardena:default-signout-flow
Jul 24, 2026
Merged

Apply a default sign-out flow automatically instead of an enable toggle#4332
ThaminduDilshan merged 1 commit into
thunder-id:mainfrom
madurangasiriwardena:default-signout-flow

Conversation

@madurangasiriwardena

@madurangasiriwardena madurangasiriwardena commented Jul 24, 2026

Copy link
Copy Markdown
Member

Purpose

Applications currently expose an enable sign-out flow toggle (isSignOutFlowEnabled), and sign-out is disabled when no flow is configured. This makes sign-out inconsistent with sign-in, where a server-level default flow is applied automatically whenever an application does not pin its own.

This PR removes the enable toggle and instead applies a server-level default sign-out flow automatically, so every application gets sign-out out of the box, exactly like authentication. The bundled sign-out flow's handle is renamed from console-signout-flow to default-flow so it is picked up by the same handle-based default resolution.


⚠️ Breaking Changes

🔧 Summary of Breaking Changes

  • The application field isSignOutFlowEnabled is removed from the REST API, import/export payloads, and declarative resource schema.
  • The IS_SIGNOUT_FLOW_ENABLED column is removed from the INBOUND_CLIENT table in the config DB schema scripts.
  • The bundled sign-out flow handle console-signout-flow is renamed to default-flow.

💥 Impact

  • Clients or declarative resource files that send isSignOutFlowEnabled will have that field ignored.
  • Sign-out is now always available for every application (using the app's own signOutFlowId, or the server default when unset); it can no longer be turned off via the flag.
  • Anything referencing the sign-out flow by the handle console-signout-flow must use default-flow.

🔄 Migration Guide

  • Remove isSignOutFlowEnabled from any application create/update/import payloads and declarative YAML.
  • To customize sign-out per application, set signOutFlowId (or signOutFlowHandle); leave it unset to inherit the server default.
  • Optionally set flow.default_signout_flow_handle in deployment.yaml (defaults to default-flow).
  • Update references from the console-signout-flow handle to default-flow.

Approach

Sign-out now mirrors the existing authentication-flow default mechanism:

  • Added flow.default_signout_flow_handle config (default default-flow) to the engine FlowConfig, default.json, the Helm chart, and the OpenChoreo resourcetype templates.
  • resolveFlowDefaults (inbound client service) resolves the default sign-out flow by handle via GetFlowByHandle(handle, SIGNOUT) when SignOutFlowID is empty, instead of disabling sign-out.
  • getFlowGraph (flow exec service) drops the IsSignOutFlowEnabled gate; the now-unused ErrorSignOutFlowDisabled error and its i18n defaults are removed.
  • IsSignOutFlowEnabled is removed from the app model, engine provider models, store marshal/scan, service/handler/importer/declarative mapping, and the IS_SIGNOUT_FLOW_ENABLED column is dropped from configdb (Postgres + SQLite), with query constants re-numbered.
  • The bundled SIGNOUT flow in 01-default-resources.yaml is renamed to handle default-flow; GetFlowByHandle filters by handle and flow type, so default-flow resolves uniquely across AUTHENTICATION / RECOVERY / SIGNOUT.
  • Console SignOutFlowSection becomes a plain flow selector (no enable toggle), matching AuthenticationFlowSection.

Related Issues

Related PRs

  • N/A

Checklist

  • Followed the contribution guidelines.
  • Manual test round performed and verified.
  • Documentation provided. (Add links if there are any)
    • Ran Vale and fixed all errors and warnings
  • Tests provided. (Add links if there are any)
    • Unit Tests
    • Integration Tests
  • Breaking changes. (Fill if applicable)
    • Breaking changes section filled.
    • breaking change label added.

Security checks

  • Followed secure coding standards in WSO2 Secure Coding Guidelines
  • Confirmed that this PR doesn't commit any keys, passwords, tokens, usernames, or other secrets.

Summary by CodeRabbit

  • New Features

    • Applications can now specify a sign-out flow via signOutFlowId.
    • A configurable default sign-out flow handle is applied when no application-specific flow is selected.
    • Deployment/Helm and resource runtime settings support configuring the default sign-out flow handle.
  • Changes

    • Removed the sign-out enable/disable toggle and related enablement flag from application configuration and UI.
    • Application create/update/get and OAuth registration now use signOutFlowId instead of the prior enablement flag.
    • Sign-out flow validation now depends on flow configuration rather than an enablement flag.
  • Documentation

    • Documented flow.default_signout_flow_handle in deployment configuration references.

@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: a7ca9a8e-76d3-42d4-a6d6-5641837936a9

📥 Commits

Reviewing files that changed from the base of the PR and between 909bb81 and 0dbe44e.

📒 Files selected for processing (31)
  • backend/cmd/server/bootstrap/01-default-resources.yaml
  • backend/cmd/server/config/default.json
  • backend/dbscripts/configdb/postgres.sql
  • backend/dbscripts/configdb/sqlite.sql
  • backend/internal/actorprovider/utils.go
  • backend/internal/actorprovider/utils_test.go
  • backend/internal/application/declarative_resource.go
  • backend/internal/application/handler.go
  • backend/internal/application/model/application.go
  • backend/internal/application/service.go
  • backend/internal/flow/flowexec/error_constants.go
  • backend/internal/flow/flowexec/service.go
  • backend/internal/flow/flowexec/service_test.go
  • backend/internal/inboundclient/service.go
  • backend/internal/inboundclient/service_test.go
  • backend/internal/inboundclient/store.go
  • backend/internal/inboundclient/store_constants.go
  • backend/internal/system/i18n/core/defaults.go
  • backend/internal/system/importer/service.go
  • backend/pkg/thunderidengine/config/config.go
  • backend/pkg/thunderidengine/providers/model.go
  • docs/content/deployment/configuration.mdx
  • frontend/apps/console/src/features/applications/components/edit-application/flows-settings/SignOutFlowSection.tsx
  • frontend/apps/console/src/features/applications/components/edit-application/flows-settings/__tests__/SignOutFlowSection.test.tsx
  • frontend/apps/console/src/features/applications/models/application.ts
  • frontend/packages/i18n/src/locales/en-US.ts
  • install/helm/conf/deployment.yaml
  • install/helm/values.yaml
  • install/openchoreo/thunderid-oc-resourcetype/samples/resource.yaml
  • install/openchoreo/thunderid-oc-resourcetype/templates/thunderid-resourcetype.yaml
  • tests/integration/oauth/sso/suite_test.go
💤 Files with no reviewable changes (11)
  • backend/dbscripts/configdb/sqlite.sql
  • backend/internal/flow/flowexec/error_constants.go
  • backend/internal/system/i18n/core/defaults.go
  • backend/internal/application/declarative_resource.go
  • frontend/apps/console/src/features/applications/models/application.ts
  • backend/dbscripts/configdb/postgres.sql
  • backend/internal/system/importer/service.go
  • backend/internal/application/model/application.go
  • backend/internal/application/service.go
  • backend/internal/application/handler.go
  • backend/pkg/thunderidengine/providers/model.go
🚧 Files skipped from review as they are similar to previous changes (17)
  • frontend/packages/i18n/src/locales/en-US.ts
  • install/helm/conf/deployment.yaml
  • backend/pkg/thunderidengine/config/config.go
  • backend/cmd/server/bootstrap/01-default-resources.yaml
  • backend/cmd/server/config/default.json
  • docs/content/deployment/configuration.mdx
  • tests/integration/oauth/sso/suite_test.go
  • install/openchoreo/thunderid-oc-resourcetype/samples/resource.yaml
  • install/openchoreo/thunderid-oc-resourcetype/templates/thunderid-resourcetype.yaml
  • backend/internal/actorprovider/utils_test.go
  • install/helm/values.yaml
  • backend/internal/flow/flowexec/service.go
  • backend/internal/inboundclient/store_constants.go
  • backend/internal/inboundclient/service.go
  • backend/internal/inboundclient/store.go
  • frontend/apps/console/src/features/applications/components/edit-application/flows-settings/tests/SignOutFlowSection.test.tsx
  • backend/internal/inboundclient/service_test.go

📝 Walkthrough

Walkthrough

The sign-out enablement boolean is replaced with explicit sign-out flow identifiers. Default sign-out flow resolution, database persistence, application mappings, deployment configuration, flow execution, integration payloads, and Console flow selection are updated.

Changes

Sign-out flow migration

Layer / File(s) Summary
Contracts and default configuration
backend/pkg/thunderidengine/providers/model.go, backend/internal/application/model/application.go, backend/pkg/thunderidengine/config/config.go, backend/cmd/server/config/default.json, install/..., docs/content/deployment/configuration.mdx, backend/cmd/server/bootstrap/01-default-resources.yaml
Sign-out configuration uses flow IDs and handles, with default-flow configured across bootstrap, Helm, OpenChoreo, and documented deployment settings.
Application mapping updates
backend/internal/application/..., backend/internal/actorprovider/..., backend/internal/system/importer/service.go, tests/integration/oauth/sso/suite_test.go
Application request, response, import, actor, and integration mappings stop copying the removed enablement flag.
Inbound-client persistence changes
backend/dbscripts/configdb/*.sql, backend/internal/inboundclient/store*.go
The sign-out enablement column is removed from schemas, SQL statements, marshaling, and row construction while SIGNOUT_FLOW_ID remains persisted.
Flow resolution and execution
backend/internal/inboundclient/service*.go, backend/internal/flow/flowexec/*.go
Empty sign-out flow IDs can resolve from the configured default handle; reconciliation and execution now operate on SignOutFlowID, with corresponding error and test updates.
Console flow selection
frontend/apps/console/src/features/applications/components/edit-application/flows-settings/*, frontend/apps/console/src/features/applications/models/application.ts, frontend/packages/i18n/src/locales/en-US.ts
The sign-out enable/disable toggle is removed, and the flow picker, labels, translations, fixture, and tests use explicit flow selection.

Estimated code review effort: 3 (Moderate) | ~30 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Application
  participant InboundClientService
  participant FlowMetaService
  participant FlowExecutor
  Application->>InboundClientService: Submit application with SignOutFlowID or handle
  InboundClientService->>FlowMetaService: Resolve configured default handle when needed
  FlowMetaService-->>InboundClientService: Return sign-out flow ID
  InboundClientService-->>Application: Store and return sign-out flow configuration
  Application->>FlowExecutor: Request sign-out flow graph
  FlowExecutor-->>Application: Return configured graph or configuration error
Loading

Possibly related PRs

Suggested reviewers: thamindudilshan, brionmario, donomalvindula

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: replacing the sign-out enable toggle with automatic default flow resolution.
Description check ✅ Passed The description follows the template well, covering Purpose, Breaking Changes, Approach, Related Issues/PRs, Checklist, and Security checks.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Trivy (0.72.0)

Trivy execution failed: 2026-07-24T16:54:07Z FATAL Fatal error run error: fs scan error: scan error: scan failed: failed analysis: post analysis error: post analysis error: helm scan error: fs filter error: fs filter error: walk error range error: stat frontend/apps/console/doctor.config.json: no such file or directory: range error: stat frontend/apps/console/doctor.config.json: no such file or directory

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

docs/content/deployment/configuration.mdx

ESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox.

frontend/apps/console/src/features/applications/components/edit-application/flows-settings/SignOutFlowSection.tsx

ESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox.

frontend/apps/console/src/features/applications/components/edit-application/flows-settings/__tests__/SignOutFlowSection.test.tsx

ESLint skipped: the ESLint configuration for this file references a package that is not available in the sandbox.

  • 1 others

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@madurangasiriwardena madurangasiriwardena added the trigger-pr-builder Add when the PR is ready for CI; starts the PR Builder for this and all later pushes label Jul 24, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
backend/cmd/server/bootstrap/01-default-resources.yaml (1)

4990-4991: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Remove the obsolete sign-out enablement field.

The PR removes isSignOutFlowEnabled from declarative resources, but this change keeps it and sets it to false. Remove the field entirely; otherwise bootstrap import may reject the removed attribute or preserve the old disabled behavior instead of resolving default-flow.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@backend/cmd/server/bootstrap/01-default-resources.yaml` around lines 4990 -
4991, Remove the obsolete sign-out enablement field from the default resource
definition near signOutFlowId and recoveryFlowId. Do not retain it with a false
value; leave signOutFlowId and recoveryFlowId unchanged so bootstrap uses the
current default-flow behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@backend/internal/flow/flowexec/service.go`:
- Around line 683-687: Update the sign-out handling in the flow execution path
so a missing client.SignOutFlowID is resolved through DefaultSignOutFlowHandle,
using the shared read-path resolver if available, before returning an error.
Preserve the existing error response only when neither the persisted sign-out
flow nor the configured default can be resolved.

In
`@install/openchoreo/thunderid-oc-resourcetype/templates/thunderid-resourcetype.yaml`:
- Around line 191-195: Update the defaultSignOutFlowHandle schema definition and
its corresponding occurrences so omitting the property preserves the server
default instead of rendering an empty default_signout_flow_handle value. Remove
the empty-string schema default while keeping the property optional and
retaining the existing behavior for explicitly provided handles.

---

Outside diff comments:
In `@backend/cmd/server/bootstrap/01-default-resources.yaml`:
- Around line 4990-4991: Remove the obsolete sign-out enablement field from the
default resource definition near signOutFlowId and recoveryFlowId. Do not retain
it with a false value; leave signOutFlowId and recoveryFlowId unchanged so
bootstrap uses the current default-flow behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: d39518c9-6472-4a8a-93bd-90d156982498

📥 Commits

Reviewing files that changed from the base of the PR and between 7461821 and 27ea0c9.

📒 Files selected for processing (30)
  • backend/cmd/server/bootstrap/01-default-resources.yaml
  • backend/cmd/server/config/default.json
  • backend/dbscripts/configdb/postgres.sql
  • backend/dbscripts/configdb/sqlite.sql
  • backend/internal/actorprovider/utils.go
  • backend/internal/actorprovider/utils_test.go
  • backend/internal/application/declarative_resource.go
  • backend/internal/application/handler.go
  • backend/internal/application/model/application.go
  • backend/internal/application/service.go
  • backend/internal/flow/flowexec/error_constants.go
  • backend/internal/flow/flowexec/service.go
  • backend/internal/inboundclient/service.go
  • backend/internal/inboundclient/service_test.go
  • backend/internal/inboundclient/store.go
  • backend/internal/inboundclient/store_constants.go
  • backend/internal/system/i18n/core/defaults.go
  • backend/internal/system/importer/service.go
  • backend/pkg/thunderidengine/config/config.go
  • backend/pkg/thunderidengine/providers/model.go
  • docs/content/deployment/configuration.mdx
  • frontend/apps/console/src/features/applications/components/edit-application/flows-settings/SignOutFlowSection.tsx
  • frontend/apps/console/src/features/applications/components/edit-application/flows-settings/__tests__/SignOutFlowSection.test.tsx
  • frontend/apps/console/src/features/applications/models/application.ts
  • frontend/packages/i18n/src/locales/en-US.ts
  • install/helm/conf/deployment.yaml
  • install/helm/values.yaml
  • install/openchoreo/thunderid-oc-resourcetype/samples/resource.yaml
  • install/openchoreo/thunderid-oc-resourcetype/templates/thunderid-resourcetype.yaml
  • tests/integration/oauth/sso/suite_test.go
💤 Files with no reviewable changes (12)
  • backend/dbscripts/configdb/sqlite.sql
  • frontend/apps/console/src/features/applications/models/application.ts
  • tests/integration/oauth/sso/suite_test.go
  • backend/dbscripts/configdb/postgres.sql
  • backend/internal/system/importer/service.go
  • backend/internal/flow/flowexec/error_constants.go
  • backend/internal/application/declarative_resource.go
  • backend/internal/system/i18n/core/defaults.go
  • backend/internal/application/handler.go
  • backend/internal/application/service.go
  • backend/internal/application/model/application.go
  • backend/pkg/thunderidengine/providers/model.go

Comment thread backend/internal/flow/flowexec/service.go
Comment on lines +191 to +195
# Handle of the flow used when an application does not pin its
# own signOutFlowId. Empty inherits the server default.
defaultSignOutFlowHandle:
type: string
default: ""

@coderabbitai coderabbitai Bot Jul 24, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Preserve the default sign-out flow handle.

The empty schema default is rendered as default_signout_flow_handle: "", overriding the server default of default-flow. Default OpenChoreo deployments will therefore look up an empty handle when an application has no explicit sign-out flow.

Proposed fix
 defaultSignOutFlowHandle:
   type: string
-  default: ""
+  default: "default-flow"

Also applies to: 474-474, 594-594

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@install/openchoreo/thunderid-oc-resourcetype/templates/thunderid-resourcetype.yaml`
around lines 191 - 195, Update the defaultSignOutFlowHandle schema definition
and its corresponding occurrences so omitting the property preserves the server
default instead of rendering an empty default_signout_flow_handle value. Remove
the empty-string schema default while keeping the property optional and
retaining the existing behavior for explicitly provided handles.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this true? default auth flow also follows the same pattern right?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '== Candidate configuration and resolution files =='
fd -t f -a 'config\.go|default\.json|service\.go' backend | sed -n '1,160p'

printf '%s\n' '== Flow-handle declarations, assignments, and defaults =='
rg -n -C 4 'Default(Auth|SignOut)FlowHandle|default_(auth|signout)_flow_handle' \
  backend install/openchoreo/thunderid-oc-resourcetype/templates/thunderid-resourcetype.yaml

printf '%s\n' '== Configuration unmarshalling/merge paths =='
rg -n -C 5 'Unmarshal|Merge|default\.json|deployment\.yaml|ReadInConfig|LoadConfig|Load.*Config' \
  backend --glob '*.go' --glob '!**/*_test.go' | sed -n '1,260p'

Length of output: 42578


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '== Locate LoadConfig implementation =='
rg -n -C 8 'func LoadConfig\s*\(' backend --glob '*.go'

printf '%s\n' '== Configuration-loader tests and deployment/default precedence assertions =='
rg -n -C 6 'LoadConfig\s*\(|defaultConfigPath|configFilePath|deployment\.yaml|default\.json' \
  backend --glob '*_test.go' | sed -n '1,260p'

Length of output: 24200


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '== LoadConfig implementation =='
sed -n '612,700p' backend/internal/system/config/config.go

printf '%s\n' '== Merge helper definitions and use sites =='
rg -n -C 8 'func .*([Mm]erge|[Oo]verride)|[Mm]erge[A-Za-z]*\(' \
  backend/internal/system/config --glob '*.go' | sed -n '1,320p'

printf '%s\n' '== FlowConfig merge-specific tests =='
rg -n -C 8 'DefaultAuthFlowHandle|DefaultSignOutFlowHandle|default_auth_flow_handle|default_signout_flow_handle' \
  backend/internal/system/config --glob '*_test.go'

Length of output: 30305


@ThaminduDilshan Yes, defaultAuthFlowHandle follows the same pattern, and that shows the finding is not valid.

Although the OpenChoreo template renders both parameters as "", LoadConfig merges only non-zero user values over default.json. Since "" is the zero value for these string fields, both retain the server defaults:

"default_auth_flow_handle": "default-flow",
"default_signout_flow_handle": "default-flow"

So omitting runtime.defaultSignOutFlowHandle still results in default-flow; no schema-default change is needed. I’m withdrawing the review comment.

@rajithacharith rajithacharith added trigger-pr-builder Add when the PR is ready for CI; starts the PR Builder for this and all later pushes and removed trigger-pr-builder Add when the PR is ready for CI; starts the PR Builder for this and all later pushes labels Jul 24, 2026
@codecov

codecov Bot commented Jul 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.83333% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
backend/internal/inboundclient/store.go 83.33% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@madurangasiriwardena madurangasiriwardena removed the trigger-pr-builder Add when the PR is ready for CI; starts the PR Builder for this and all later pushes label Jul 24, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@backend/internal/inboundclient/service_test.go`:
- Line 1564: Restore the shared configuration mutated by the tests at each
affected assignment of DefaultSignOutFlowHandle. In each test, capture the
original value from
sysconfig.GetServerRuntime().Config.Flow.DefaultSignOutFlowHandle before setting
it, then register suite.T().Cleanup to restore that value after the test; apply
this consistently to all three affected tests.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 111b155c-fc7b-417d-9ea2-929220d4d94d

📥 Commits

Reviewing files that changed from the base of the PR and between 27ea0c9 and 4d7e0f4.

📒 Files selected for processing (36)
  • backend/cmd/server/bootstrap/01-default-resources.yaml
  • backend/cmd/server/config/default.json
  • backend/dbscripts/configdb/postgres.sql
  • backend/dbscripts/configdb/sqlite.sql
  • backend/internal/actorprovider/utils.go
  • backend/internal/actorprovider/utils_test.go
  • backend/internal/application/declarative_resource.go
  • backend/internal/application/handler.go
  • backend/internal/application/model/application.go
  • backend/internal/application/service.go
  • backend/internal/flow/flowexec/error_constants.go
  • backend/internal/flow/flowexec/service.go
  • backend/internal/flow/flowexec/service_test.go
  • backend/internal/inboundclient/service.go
  • backend/internal/inboundclient/service_test.go
  • backend/internal/inboundclient/store.go
  • backend/internal/inboundclient/store_constants.go
  • backend/internal/system/i18n/core/defaults.go
  • backend/internal/system/importer/service.go
  • backend/pkg/thunderidengine/config/config.go
  • backend/pkg/thunderidengine/providers/model.go
  • docs/content/deployment/configuration.mdx
  • frontend/apps/console/src/features/applications/components/edit-application/flows-settings/SignOutFlowSection.tsx
  • frontend/apps/console/src/features/applications/components/edit-application/flows-settings/__tests__/SignOutFlowSection.test.tsx
  • frontend/apps/console/src/features/applications/models/application.ts
  • frontend/packages/i18n/src/locales/en-US.ts
  • install/helm/conf/deployment.yaml
  • install/helm/values.yaml
  • install/openchoreo/thunderid-oc-resourcetype/samples/resource.yaml
  • install/openchoreo/thunderid-oc-resourcetype/templates/thunderid-resourcetype.yaml
  • tests/integration/oauth/sso/suite_test.go
  • tests/integration/resources/declarative_resources/agents/agent-declarative-1.yaml
  • tests/integration/resources/declarative_resources/agents/agent-declarative-confidential.yaml
  • tests/integration/resources/declarative_resources/applications/app-declarative-1.yaml
  • tests/integration/resources/declarative_resources/applications/app-declarative-confidential.yaml
  • tests/integration/resources/declarative_resources/flows/flow-declarative-signout-1.yaml
💤 Files with no reviewable changes (12)
  • frontend/apps/console/src/features/applications/models/application.ts
  • backend/internal/system/i18n/core/defaults.go
  • backend/internal/application/declarative_resource.go
  • backend/internal/application/model/application.go
  • backend/dbscripts/configdb/postgres.sql
  • backend/internal/flow/flowexec/error_constants.go
  • tests/integration/oauth/sso/suite_test.go
  • backend/internal/system/importer/service.go
  • backend/dbscripts/configdb/sqlite.sql
  • backend/internal/application/handler.go
  • backend/pkg/thunderidengine/providers/model.go
  • backend/internal/application/service.go
🚧 Files skipped from review as they are similar to previous changes (16)
  • frontend/packages/i18n/src/locales/en-US.ts
  • install/openchoreo/thunderid-oc-resourcetype/samples/resource.yaml
  • install/helm/values.yaml
  • install/helm/conf/deployment.yaml
  • docs/content/deployment/configuration.mdx
  • backend/cmd/server/config/default.json
  • backend/internal/flow/flowexec/service.go
  • backend/internal/inboundclient/store_constants.go
  • install/openchoreo/thunderid-oc-resourcetype/templates/thunderid-resourcetype.yaml
  • backend/internal/actorprovider/utils.go
  • backend/internal/actorprovider/utils_test.go
  • backend/cmd/server/bootstrap/01-default-resources.yaml
  • backend/internal/inboundclient/service.go
  • backend/internal/inboundclient/store.go
  • frontend/apps/console/src/features/applications/components/edit-application/flows-settings/SignOutFlowSection.tsx
  • frontend/apps/console/src/features/applications/components/edit-application/flows-settings/tests/SignOutFlowSection.test.tsx

Comment thread backend/internal/inboundclient/service_test.go Outdated
@madurangasiriwardena
madurangasiriwardena force-pushed the default-signout-flow branch 2 times, most recently from f93a3f6 to ad36092 Compare July 24, 2026 13:59
@madurangasiriwardena madurangasiriwardena added the trigger-pr-builder Add when the PR is ready for CI; starts the PR Builder for this and all later pushes label Jul 24, 2026
@madurangasiriwardena
madurangasiriwardena force-pushed the default-signout-flow branch 2 times, most recently from 909bb81 to accdfa1 Compare July 24, 2026 14:15

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
backend/internal/inboundclient/service.go (1)

1666-1667: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Update the stale reconciliation comment.

The comment above this branch still says sign-out forces the enable flag to false, but that flag is no longer modified here. Restrict the comment to registration and recovery, or remove the obsolete sign-out wording.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@backend/internal/inboundclient/service.go` around lines 1666 - 1667, Update
the comment above the branch assigning SignOutFlowID in the reconciliation logic
to remove the obsolete claim that sign-out forces the enable flag to false;
limit the comment to registration and recovery behavior, or remove it if no
longer needed.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@backend/internal/inboundclient/service.go`:
- Around line 628-640: Update the GetFlowByHandle error handling in the default
sign-out flow lookup to ignore only NOT_FOUND errors, while continuing to map
server errors to ErrFKFlowServerError. Return ErrFKFlowDefinitionRetrievalFailed
for all other retrieval errors, and preserve the existing successful flow.ID
assignment and optional missing-flow behavior.

---

Outside diff comments:
In `@backend/internal/inboundclient/service.go`:
- Around line 1666-1667: Update the comment above the branch assigning
SignOutFlowID in the reconciliation logic to remove the obsolete claim that
sign-out forces the enable flag to false; limit the comment to registration and
recovery behavior, or remove it if no longer needed.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 574224ad-e9cf-4747-bff7-8806fae9c78c

📥 Commits

Reviewing files that changed from the base of the PR and between 4d7e0f4 and 909bb81.

📒 Files selected for processing (31)
  • backend/cmd/server/bootstrap/01-default-resources.yaml
  • backend/cmd/server/config/default.json
  • backend/dbscripts/configdb/postgres.sql
  • backend/dbscripts/configdb/sqlite.sql
  • backend/internal/actorprovider/utils.go
  • backend/internal/actorprovider/utils_test.go
  • backend/internal/application/declarative_resource.go
  • backend/internal/application/handler.go
  • backend/internal/application/model/application.go
  • backend/internal/application/service.go
  • backend/internal/flow/flowexec/error_constants.go
  • backend/internal/flow/flowexec/service.go
  • backend/internal/flow/flowexec/service_test.go
  • backend/internal/inboundclient/service.go
  • backend/internal/inboundclient/service_test.go
  • backend/internal/inboundclient/store.go
  • backend/internal/inboundclient/store_constants.go
  • backend/internal/system/i18n/core/defaults.go
  • backend/internal/system/importer/service.go
  • backend/pkg/thunderidengine/config/config.go
  • backend/pkg/thunderidengine/providers/model.go
  • docs/content/deployment/configuration.mdx
  • frontend/apps/console/src/features/applications/components/edit-application/flows-settings/SignOutFlowSection.tsx
  • frontend/apps/console/src/features/applications/components/edit-application/flows-settings/__tests__/SignOutFlowSection.test.tsx
  • frontend/apps/console/src/features/applications/models/application.ts
  • frontend/packages/i18n/src/locales/en-US.ts
  • install/helm/conf/deployment.yaml
  • install/helm/values.yaml
  • install/openchoreo/thunderid-oc-resourcetype/samples/resource.yaml
  • install/openchoreo/thunderid-oc-resourcetype/templates/thunderid-resourcetype.yaml
  • tests/integration/oauth/sso/suite_test.go
💤 Files with no reviewable changes (12)
  • frontend/apps/console/src/features/applications/models/application.ts
  • backend/dbscripts/configdb/sqlite.sql
  • backend/internal/system/i18n/core/defaults.go
  • backend/internal/application/declarative_resource.go
  • backend/internal/flow/flowexec/error_constants.go
  • backend/dbscripts/configdb/postgres.sql
  • tests/integration/oauth/sso/suite_test.go
  • backend/pkg/thunderidengine/providers/model.go
  • backend/internal/application/service.go
  • backend/internal/application/model/application.go
  • backend/internal/application/handler.go
  • backend/internal/system/importer/service.go
🚧 Files skipped from review as they are similar to previous changes (18)
  • install/helm/values.yaml
  • backend/cmd/server/config/default.json
  • backend/pkg/thunderidengine/config/config.go
  • docs/content/deployment/configuration.mdx
  • install/helm/conf/deployment.yaml
  • install/openchoreo/thunderid-oc-resourcetype/templates/thunderid-resourcetype.yaml
  • install/openchoreo/thunderid-oc-resourcetype/samples/resource.yaml
  • backend/internal/flow/flowexec/service_test.go
  • backend/internal/actorprovider/utils.go
  • frontend/packages/i18n/src/locales/en-US.ts
  • frontend/apps/console/src/features/applications/components/edit-application/flows-settings/SignOutFlowSection.tsx
  • backend/internal/flow/flowexec/service.go
  • backend/cmd/server/bootstrap/01-default-resources.yaml
  • backend/internal/inboundclient/store_constants.go
  • frontend/apps/console/src/features/applications/components/edit-application/flows-settings/tests/SignOutFlowSection.test.tsx
  • backend/internal/actorprovider/utils_test.go
  • backend/internal/inboundclient/service_test.go
  • backend/internal/inboundclient/store.go

Comment thread backend/internal/inboundclient/service.go
@ThaminduDilshan ThaminduDilshan added the breaking change The feature/ improvement will alter the existing behaviour label Jul 24, 2026
Remove the per-application sign-out enable option and apply a
server-level default sign-out flow when an application does not pin its
own, mirroring how the default authentication flow works.

- Add flow.default_signout_flow_handle config (default "default-flow")
- Resolve the default sign-out flow in resolveFlowDefaults and drop the
  IsSignOutFlowEnabled gate in getFlowGraph
- Remove IsSignOutFlowEnabled from models, store, and the
  IS_SIGNOUT_FLOW_ENABLED config DB column
- Rename the bundled sign-out flow handle console-signout-flow to
  default-flow
- Drop the enable toggle from the console SignOutFlowSection and fix its
  i18n keys (signoutFlow -> signOutFlow) so the section title reads
  "Sign Out Flow" like the other flow sections
@madurangasiriwardena
madurangasiriwardena added this pull request to the merge queue Jul 24, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 24, 2026
@ThaminduDilshan
ThaminduDilshan added this pull request to the merge queue Jul 24, 2026
Merged via the queue into thunder-id:main with commit 59ba52f Jul 24, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change The feature/ improvement will alter the existing behaviour trigger-pr-builder Add when the PR is ready for CI; starts the PR Builder for this and all later pushes Type/Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants