Skip to content

Add UPST Authentication for oci api mcp server#359

Open
shyam2511 wants to merge 1 commit into
oracle:mainfrom
shyam2511:upst-auth
Open

Add UPST Authentication for oci api mcp server#359
shyam2511 wants to merge 1 commit into
oracle:mainfrom
shyam2511:upst-auth

Conversation

@shyam2511

@shyam2511 shyam2511 commented Jul 8, 2026

Copy link
Copy Markdown
Member

Description

Added UPST auth method to OCI API MCP Server.

The server can now exchange an OCI Identity Domain service-bearer JWT for an OCI User Principal Security Token (UPST) and use it to authenticate OCI CLI commands. It generates and securely stores the matching RSA signing key and CLI configuration, reuses valid tokens during the server session, and renews tokens shortly before expiration.

This supports service-user and federated identity workflows without requiring a pre-existing OCI CLI security-token profile.

Dependencies:

  • cryptography==46.0.7 for RSA key generation and serialization.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • make lint
  • uv tool run black --check on changed OCI API MCP Server Python files
  • uv tool run isort --settings-path src/oci-api-mcp-server --check-only on changed OCI API MCP Server Python files
  • cd src/oci-api-mcp-server && COVERAGE_FILE=../../.coverage.oci-api-mcp-server uv run pytest --cov=. --cov-branch --cov-append --cov-report=term-missing
  • Manually tested by adding the server to cline using test credentials and making mcp calls

Results:

  • 33 tests passed.
  • 92.97% coverage.
  • Black, isort, and Ruff checks passed for the changed files.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@oracle-contributor-agreement oracle-contributor-agreement Bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jul 8, 2026
@shyam2511 shyam2511 changed the title Add UPST authorization for oci api mcp server Add UPST auth for oci api mcp server Jul 8, 2026
@shyam2511 shyam2511 changed the title Add UPST auth for oci api mcp server Add UPST Authentication for oci api mcp server Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant