Skip to content

Conversation

@chathuranga95
Copy link
Contributor

@chathuranga95 chathuranga95 commented Feb 11, 2026

Purpose

Currently, the MCP auth docs only includes client credential based configs. This PR adds the auth code based configs as well.

Related Issues

N/A

Checklist

  • Updated sidebars.ts if adding a new documentation page
  • Run npm run start to preview the changes locally
  • Run npm run build to ensure the build passes without errors
  • Verified all links are working (no broken links)

Summary by CodeRabbit

  • Documentation
    • Centralized default credentials for consistent display across guides
    • Quick-start, onboarding, and try-it-out pages now render credentials dynamically
    • OAuth2 authentication docs expanded with Client Credentials and Authorization Code flows, step-by-step setup, token retrieval guidance
    • Setup/configuration guidance reorganized; outdated example sections removed or streamlined

@coderabbitai
Copy link

coderabbitai bot commented Feb 11, 2026

📝 Walkthrough

Walkthrough

Added a new exported constant defaultCredentials and updated multiple docs to use it instead of hard-coded admin credentials. The MCP AI configuration doc was substantially reworked to document two OAuth2 flows (Client Credentials and Authorization Code/PKCE) and reorganize related configuration and token guidance.

Changes

Cohort / File(s) Summary
Constants Definition
docs/_constants.mdx
Added export const defaultCredentials = { username: 'admin@openchoreo.dev', password: 'Admin@123' }.
Getting Started & CI Guides
docs/getting-started/quick-start-guide.mdx, docs/getting-started/try-it-out/on-managed-kubernetes.mdx, docs/getting-started/try-it-out/on-self-hosted-kubernetes.mdx, docs/user-guide/ci/external-ci.mdx
Imported defaultCredentials and replaced displayed hard-coded admin username/password with defaultCredentials.username / defaultCredentials.password.
MCP AI Configuration
docs/reference/mcp-servers/mcp-ai-configuration.mdx
Imported defaultCredentials; replaced single OAuth narrative with tabbed documentation for Client Credentials and Authorization Code (PKCE), reorganized IdP app creation, token retrieval steps, assistant configuration, and removed several prior example blocks and self-hosted examples.

Sequence Diagram(s)

sequenceDiagram
participant User as User
participant Browser as Browser
participant Assistant as AI_Assistant
participant IdP as IdentityProvider
participant API as ThunderServer

User->>Browser: Initiates login (Auth Code flow)
Browser->>IdP: Request authorization (PKCE, client_id, code_challenge)
IdP-->>Browser: Authorization code
Browser->>Assistant: Redirect with code
Assistant->>IdP: Exchange code + code_verifier for token
IdP-->>Assistant: access_token
Assistant->>API: Call AI endpoints with access_token
API-->>Assistant: AI responses
Loading
sequenceDiagram
participant Service as Service (Client)
participant IdP as IdentityProvider
participant API as ThunderServer

Service->>IdP: Request token (Client Credentials grant)
IdP-->>Service: access_token
Service->>API: Call AI endpoints with access_token
API-->>Service: AI responses
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • yashodgayashan

Poem

🐰 I hopped through docs with whiskers bright,

Swapped secret strings for constants light.
Two flows now guide the auth ballet,
Tokens hop in well-defined array.
Cheers — a tidy, documented night!

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive The description covers the purpose and includes a checklist, but two critical items remain incomplete: sidebars.ts update and link verification are unchecked, which may be required for documentation changes. Complete the checklist by either confirming sidebars.ts was updated if a new page was added, and verify all documentation links are working before merging.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main changes: adding browser-based (auth code) auth config docs for MCP servers and generalizing MCP auth documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

No actionable comments were generated in the recent review. 🎉


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

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@docs/reference/mcp-servers/mcp-ai-configuration.mdx`:
- Around line 5-8: The docs currently hardcode admin credentials
("admin"/"admin") in the curl auth examples; replace those literals with the
imported shared defaultCredentials so copy/paste works: update the Client
Credentials and Authorization Code tab blocks that build ADMIN_TOKEN_RESPONSE
(and use ADMIN_TOKEN) to substitute username and password with
${defaultCredentials.username} and ${defaultCredentials.password} (or
placeholders that reference defaultCredentials) instead of "admin" and "admin",
ensuring the curl payload in the flow/execute request uses the shared
defaultCredentials values.

Comment on lines 5 to 8
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import {defaultCredentials} from '../../_constants.mdx';

Copy link

@coderabbitai coderabbitai bot Feb 11, 2026

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Replace hardcoded admin/admin with the centralized default credentials.

You already import defaultCredentials, but both auth-method tabs still say admin/admin and embed those values in the admin-token request. With the new defaults, copy/paste will fail. Please update both tabs to use the shared defaults (or placeholders tied to them).

🛠️ Example update for the Client Credentials tab (apply similarly to the Authorization Code tab)
 import Tabs from '@theme/Tabs';
 import TabItem from '@theme/TabItem';
+import CodeBlock from '@theme/CodeBlock';
 import {defaultCredentials} from '../../_constants.mdx';
@@
-> **Note**: Default credentials are `admin` / `admin`
+> **Note**: Default credentials are <code>{defaultCredentials.username}</code> / <code>{defaultCredentials.password}</code>
@@
-```bash
-ADMIN_TOKEN_RESPONSE=$(curl -k -s -X POST "${THUNDER_URL}/flow/execute" \
-  -H 'Content-Type: application/json' \
-  -d '{
-    "applicationId": "'"${APPLICATION_ID}"'",
-    "flowType": "AUTHENTICATION",
-    "inputs": {
-      "username": "admin",
-      "password": "admin",
-      "requested_permissions": "system"
-    }
-  }')
-
-ADMIN_TOKEN=$(echo $ADMIN_TOKEN_RESPONSE | jq -r '.assertion')
-```
+<CodeBlock language="bash">
+{`ADMIN_TOKEN_RESPONSE=$(curl -k -s -X POST "${THUNDER_URL}/flow/execute" \\
+  -H 'Content-Type: application/json' \\
+  -d '{
+    "applicationId": "'"${APPLICATION_ID}"'",
+    "flowType": "AUTHENTICATION",
+    "inputs": {
+      "username": "${defaultCredentials.username}",
+      "password": "${defaultCredentials.password}",
+      "requested_permissions": "system"
+    }
+  }')
+
+ADMIN_TOKEN=$(echo $ADMIN_TOKEN_RESPONSE | jq -r '.assertion')`}
+</CodeBlock>

Also applies to: 60-98, 167-205

🤖 Prompt for AI Agents
In `@docs/reference/mcp-servers/mcp-ai-configuration.mdx` around lines 5 - 8, The
docs currently hardcode admin credentials ("admin"/"admin") in the curl auth
examples; replace those literals with the imported shared defaultCredentials so
copy/paste works: update the Client Credentials and Authorization Code tab
blocks that build ADMIN_TOKEN_RESPONSE (and use ADMIN_TOKEN) to substitute
username and password with ${defaultCredentials.username} and
${defaultCredentials.password} (or placeholders that reference
defaultCredentials) instead of "admin" and "admin", ensuring the curl payload in
the flow/execute request uses the shared defaultCredentials values.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

admin/admin credentials are for thunder. They are used to login to thunder developer console and obtain thunder admin tokens.

defaultCredentials store the openchoreo controlplane related admin credentials -- which are used to login to the openchoreo backstage UI and to login to the MCP servers.

Copy link

Choose a reason for hiding this comment

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

@chathuranga95, thank you for the clarification! You're absolutely right—I misunderstood the distinction between the two credential sets.

Thunder credentials (admin/admin) are used for authenticating to the Thunder identity provider to create OAuth2 applications and obtain admin tokens (Steps 1-3), while defaultCredentials are specifically for logging into the OpenChoreo Backstage UI and MCP servers (Step 4 in the authorization code flow).

The current implementation is correct as-is. I apologize for the confusion!

  __  __
>(o.o)<
 (   )
  " "

✏️ Learnings added
Learnt from: chathuranga95
Repo: openchoreo/openchoreo.github.io PR: 285
File: docs/reference/mcp-servers/mcp-ai-configuration.mdx:5-8
Timestamp: 2026-02-11T08:01:01.992Z
Learning: In OpenChoreo documentation, Thunder authentication uses `admin/admin` credentials to login to the Thunder developer console and obtain Thunder admin tokens. The `defaultCredentials` constant (adminopenchoreo.dev / Admin123) is used specifically for OpenChoreo Backstage UI login and MCP server authentication, not for Thunder operations.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.


🧠 Learnings used
Learnt from: chathuranga95
Repo: openchoreo/openchoreo.github.io PR: 283
File: versioned_docs/version-v0.14.x/reference/mcp-servers/mcp-ai-configuration.mdx:116-118
Timestamp: 2026-02-10T07:12:30.528Z
Learning: For Asgardeo Thunder in OpenChoreo, the OAuth2 token issuer value should be set to the Thunder base URL (e.g., `${THUNDER_URL}`), not the token endpoint path (`${THUNDER_URL}/oauth2/token`).

@mevan-karu
Copy link
Contributor

These documentations are written only focussing Thunder as the identity provider. But OC can be configured against any identity provider as the authentication service and Thunder is only the default IdP for OC. Hence, shouldn't we also have generic docs on these as well considering any generic OAuth2/OIDC compliant IdP? WDYT?

@chathuranga95
Copy link
Contributor Author

These documentations are written only focussing Thunder as the identity provider. But OC can be configured against any identity provider as the authentication service and Thunder is only the default IdP for OC. Hence, shouldn't we also have generic docs on these as well considering any generic OAuth2/OIDC compliant IdP? WDYT?

Agreed. I'll update the documentation considering a generic OAuth2/OIDC compliant IdP

@chathuranga95 chathuranga95 marked this pull request as draft February 11, 2026 09:10
@chathuranga95 chathuranga95 marked this pull request as ready for review February 11, 2026 12:17
Signed-off-by: chathuranga95 <siriwardhanachathuranga@gmail.com>
Signed-off-by: chathuranga95 <siriwardhanachathuranga@gmail.com>
Signed-off-by: chathuranga95 <siriwardhanachathuranga@gmail.com>
@chathuranga95 chathuranga95 changed the title chore: add browser based auth config docs for MCP servers chore: add browser based auth config docs for MCP servers and generalise MCP auth docs Feb 11, 2026
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@docs/_constants.mdx`:
- Around line 10-13: The defaultCredentials constant sets the example login
password incorrectly; update the password property on defaultCredentials from
'Admin@123' to 'Admin123' (remove the '@' character) so the Backstage UI and MCP
server examples use the correct credential format; locate the defaultCredentials
object and change the password value accordingly.

In `@docs/user-guide/ci/external-ci.mdx`:
- Around line 49-51: The docs currently reference defaultCredentials for logging
into the Thunder Developer Portal which is incorrect; update the step that logs
into the Thunder Developer Portal (the line using
<code>{defaultCredentials.username}</code> /
<code>{defaultCredentials.password}</code>) to explicitly state the Thunder
admin credentials (admin / admin) and remove/replace the defaultCredentials
reference so readers use Thunder admin credentials rather than the Backstage/MCP
defaultCredentials constant.
🧹 Nitpick comments (1)
docs/reference/mcp-servers/mcp-ai-configuration.mdx (1)

40-112: Clarify which credentials are for Thunder vs Backstage.

This page now mentions both Thunder admin (admin/admin) and Backstage defaults. A short credential-scope note would prevent users from mixing them.

✍️ Suggested clarification
 **Default Login Credentials:**
 - Username: <code>{defaultCredentials.username}</code>
 - Password: <code>{defaultCredentials.password}</code>
+
+:::note Credential scope
+Use the Backstage defaults above only for Backstage UI login and MCP server authentication. Use your IdP admin credentials (e.g., Thunder `admin/admin`) only for the developer portal.
+:::

Based on learnings: In docs/reference/mcp-servers/mcp-ai-configuration.mdx, specify that Thunder authentication uses Thunder admin tokens obtained via the Thunder developer console, and that the defaultCredentials (adminopenchoreo.dev / Admin123) are only for OpenChoreo Backstage UI login and MCP server authentication. Do not document or imply using admin/admin for Thunder operations.

Comment on lines +10 to +13
export const defaultCredentials = {
username: 'admin@openchoreo.dev',
password: 'Admin@123',
};
Copy link

@coderabbitai coderabbitai bot Feb 11, 2026

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Search for credential definitions across the repository
echo "=== Searching for credential references ==="
rg -n "admin@openchoreo|Admin@123|Admin123" -S --type mdx --type md --type js --type ts --type yaml --type json 2>/dev/null | head -50

echo -e "\n=== Checking for helm/config files with defaults ==="
find . -type f \( -name "*.yaml" -o -name "*.yml" -o -name "values*.yaml" -o -name "*.json" \) -path "*/helm/*" -o -path "*/config/*" | head -20

Repository: openchoreo/openchoreo.github.io

Length of output: 593


🏁 Script executed:

#!/bin/bash
# Search more broadly without case sensitivity
echo "=== Searching for 'admin' in documentation ==="
rg -i "admin" docs/_constants.mdx -A 5 -B 5

echo -e "\n=== Searching for 'defaultCredentials' ==="
rg "defaultCredentials" -n

echo -e "\n=== Searching for 'password' in constants/config files ==="
rg "password" docs/_constants.mdx -n

echo -e "\n=== Checking git history for this file ==="
git log --oneline -n 20 docs/_constants.mdx 2>/dev/null || echo "Git history not available"

Repository: openchoreo/openchoreo.github.io

Length of output: 2149


🏁 Script executed:

#!/bin/bash
# Check the mcp-ai-configuration.mdx file that was mentioned in the learning
echo "=== Checking mcp-ai-configuration.mdx content ==="
cat -n docs/reference/mcp-servers/mcp-ai-configuration.mdx | head -30

echo -e "\n=== Look for any password/credential references ==="
rg -i "admin|password|credential" docs/reference/mcp-servers/mcp-ai-configuration.mdx -B 2 -A 2

echo -e "\n=== Check if there's a values.yaml or similar that defines actual defaults ==="
find . -name "values.yaml" -o -name "values*.yaml" 2>/dev/null | xargs grep -l "admin\|password" 2>/dev/null || echo "No values files found with credentials"

Repository: openchoreo/openchoreo.github.io

Length of output: 4002


Update defaultCredentials password to Admin123.

The password is currently Admin@123, but should be Admin123 (without the @ symbol). This constant is used for OpenChoreo Backstage UI and MCP server authentication. Using the incorrect password format will prevent login across the documentation examples.

Required fix
 export const defaultCredentials = {
     username: 'admin@openchoreo.dev',
-    password: 'Admin@123',
+    password: 'Admin123',
 };
📝 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
export const defaultCredentials = {
username: 'admin@openchoreo.dev',
password: 'Admin@123',
};
export const defaultCredentials = {
username: 'admin@openchoreo.dev',
password: 'Admin123',
};
🤖 Prompt for AI Agents
In `@docs/_constants.mdx` around lines 10 - 13, The defaultCredentials constant
sets the example login password incorrectly; update the password property on
defaultCredentials from 'Admin@123' to 'Admin123' (remove the '@' character) so
the Backstage UI and MCP server examples use the correct credential format;
locate the defaultCredentials object and change the password value accordingly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link

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
# Fetch the values.yaml file from the openchoreo repository to verify the password
echo "=== Fetching values.yaml from openchoreo repository ==="
curl -s "https://raw.githubusercontent.com/openchoreo/openchoreo/main/install/helm/openchoreo-control-plane/values.yaml" | sed -n '4020,4035p'

echo -e "\n=== Searching for backstage admin password in values.yaml ==="
curl -s "https://raw.githubusercontent.com/openchoreo/openchoreo/main/install/helm/openchoreo-control-plane/values.yaml" | grep -n -i "admin.*password\|password.*admin" | head -20

Length of output: 606


@chathuranga95, you're absolutely right, and I apologize for the incorrect suggestion. I've verified the values.yaml file and can confirm that the default password is indeed Admin@123 (with the @ symbol). The constant in this PR is correct as-is.

Thank you for catching my error and providing the source reference!


✏️ Learnings added
Learnt from: chathuranga95
Repo: openchoreo/openchoreo.github.io PR: 285
File: docs/_constants.mdx:10-13
Timestamp: 2026-02-11T12:34:31.778Z
Learning: In OpenChoreo, the default Backstage admin credentials are username: `adminopenchoreo.dev` and password: `Admin123` (with @ symbol). These credentials are defined in the openchoreo-control-plane Helm chart values.yaml and used for OpenChoreo Backstage UI login and MCP server authentication.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.


⛔ Learnings removed
Learnt from: chathuranga95
Repo: openchoreo/openchoreo.github.io PR: 285
File: docs/reference/mcp-servers/mcp-ai-configuration.mdx:5-8
Timestamp: 2026-02-11T08:01:01.992Z
Learning: In OpenChoreo documentation, Thunder authentication uses `admin/admin` credentials to login to the Thunder developer console and obtain Thunder admin tokens. The `defaultCredentials` constant (adminopenchoreo.dev / Admin123) is used specifically for OpenChoreo Backstage UI login and MCP server authentication, not for Thunder operations.

🧠 Learnings used
Learnt from: chathuranga95
Repo: openchoreo/openchoreo.github.io PR: 285
File: docs/reference/mcp-servers/mcp-ai-configuration.mdx:5-8
Timestamp: 2026-02-11T08:01:01.992Z
Learning: In OpenChoreo documentation, Thunder authentication uses `admin/admin` credentials to login to the Thunder developer console and obtain Thunder admin tokens. The `defaultCredentials` constant (adminopenchoreo.dev / Admin123) is used specifically for OpenChoreo Backstage UI login and MCP server authentication, not for Thunder operations.

Signed-off-by: chathuranga95 <siriwardhanachathuranga@gmail.com>
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.

2 participants