Skip to content

Add Sunbird KBI flow and registry to postman collection#2213

Open
nandhu-kumar wants to merge 1 commit into
mosip:develop-gofrom
nandhu-kumar:develop-go-local-1
Open

Add Sunbird KBI flow and registry to postman collection#2213
nandhu-kumar wants to merge 1 commit into
mosip:develop-gofrom
nandhu-kumar:develop-go-local-1

Conversation

@nandhu-kumar

@nandhu-kumar nandhu-kumar commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features

    • Added Postman workflows for Sunbird Registry policy creation, lookup, search, and optional cleanup.
    • Added Sunbird Knowledge-Based Identification testing, including authorization, token exchange, and identity verification.
    • Added environment settings for Sunbird identity, registry, insurance, and cleanup configuration.
  • Improvements

    • Limited chart publishing workflow options to explicit YES or NO selections for clearer, safer execution.

Signed-off-by: Nandhukumar <nandhukumare@gmail.com>
@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

The PR adds Sunbird Registry policy CRUD and Sunbird KBI PKCE authentication flows to the Postman collection, introduces related environment variables, and restricts chart publishing workflow inputs to YES/NO choices.

Changes

Sunbird testing flows

Layer / File(s) Summary
Registry and KBI Postman flows
postman-collection/Go-eSignet.postman_collection.json, postman-collection/Go-eSignet.postman_environment.json
Adds seeded Sunbird policy creation, lookup, search, opt-in deletion, PKCE-based KBI execution, token exchange, and userinfo.sub validation with new environment variables.

Workflow input controls

Layer / File(s) Summary
Chart publish dispatch inputs
.github/workflows/chart-lint-publish.yml
Changes CHART_PUBLISH and INCLUDE_ALL_CHARTS to YES/NO choice inputs while retaining NO defaults.

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

Possibly related issues

Possibly related PRs

  • mosip/esignet#1986 — Directly overlaps with the Sunbird Registry and KBI Postman collection changes.
  • mosip/esignet#2170 — Overlaps with the Sunbird collection and environment variable additions.

Poem

Policies bloom in a registry bright,
PKCE carries tokens through the night.
YES or NO keeps charts in line,
Sunbird flows validate by design.
A tidy Postman path, one test at a time.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding Sunbird KBI flow and registry steps to the Postman collection.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

🔧 Checkov (3.3.8)
.github/workflows/chart-lint-publish.yml

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'

postman-collection/Go-eSignet.postman_collection.json

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'

postman-collection/Go-eSignet.postman_environment.json

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'


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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

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 `@postman-collection/Go-eSignet.postman_collection.json`:
- Around line 1339-1358: Update the prerequest script for “Delete Policy” to
enable deletion only when the `sunbird_cleanup` environment value equals the
string `"true"`; treat unset, empty, and `"false"` values as disabled and
preserve the existing skip message and `pm.execution.skipRequest()` 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: Repository UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: e7799106-4290-4382-ac77-79816c981dd9

📥 Commits

Reviewing files that changed from the base of the PR and between c8a955c and 69647c6.

📒 Files selected for processing (3)
  • .github/workflows/chart-lint-publish.yml
  • postman-collection/Go-eSignet.postman_collection.json
  • postman-collection/Go-eSignet.postman_environment.json

Comment on lines +1339 to +1358
{
"name": "Delete Policy",
"event": [
{
"listen": "prerequest",
"script": {
"exec": [
"// Opt-in cleanup: skipped by default so a top-to-bottom 'Run collection' does",
"// not delete the seeded record before '5 — Sunbird KBI' consumes it. Set",
"// sunbird_cleanup=true (and run this request manually, after KBI) to enable.",
"if (!pm.environment.get('sunbird_cleanup')) {",
" console.log('Skipping Delete Policy — set sunbird_cleanup=true to enable.');",
" pm.execution.skipRequest();",
"}"
],
"type": "text/javascript",
"packages": {}
}
}
],

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Cleanup guard uses truthiness, not value equality — sunbird_cleanup="false" still runs the delete.

!pm.environment.get('sunbird_cleanup') is only falsy for an empty/unset string. If a user sets sunbird_cleanup to "false" (a natural way to "disable" it), the string is non-empty and truthy, so the guard is bypassed and the delete request executes — the opposite of the documented intent ("Set to 'true' to enable ... left unset so it is skipped by default").

🐛 Proposed fix
-                  "if (!pm.environment.get('sunbird_cleanup')) {",
+                  "if (pm.environment.get('sunbird_cleanup') !== 'true') {",
                   "  console.log('Skipping Delete Policy — set sunbird_cleanup=true to enable.');",
                   "  pm.execution.skipRequest();",
                   "}"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{
"name": "Delete Policy",
"event": [
{
"listen": "prerequest",
"script": {
"exec": [
"// Opt-in cleanup: skipped by default so a top-to-bottom 'Run collection' does",
"// not delete the seeded record before '5 — Sunbird KBI' consumes it. Set",
"// sunbird_cleanup=true (and run this request manually, after KBI) to enable.",
"if (!pm.environment.get('sunbird_cleanup')) {",
" console.log('Skipping Delete Policy — set sunbird_cleanup=true to enable.');",
" pm.execution.skipRequest();",
"}"
],
"type": "text/javascript",
"packages": {}
}
}
],
{
"name": "Delete Policy",
"event": [
{
"listen": "prerequest",
"script": {
"exec": [
"// Opt-in cleanup: skipped by default so a top-to-bottom 'Run collection' does",
"// not delete the seeded record before '5 — Sunbird KBI' consumes it. Set",
"// sunbird_cleanup=true (and run this request manually, after KBI) to enable.",
"if (pm.environment.get('sunbird_cleanup') !== 'true') {",
" console.log('Skipping Delete Policy — set sunbird_cleanup=true to enable.');",
" pm.execution.skipRequest();",
"}"
],
"type": "text/javascript",
"packages": {}
}
}
],
🤖 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 `@postman-collection/Go-eSignet.postman_collection.json` around lines 1339 -
1358, Update the prerequest script for “Delete Policy” to enable deletion only
when the `sunbird_cleanup` environment value equals the string `"true"`; treat
unset, empty, and `"false"` values as disabled and preserve the existing skip
message and `pm.execution.skipRequest()` behavior.

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.

1 participant