Skip to content

Adding auth provider for mcp servers#360

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

Adding auth provider for mcp servers#360
shyam2511 wants to merge 1 commit into
oracle:mainfrom
shyam2511:auth-provider

Conversation

@shyam2511

@shyam2511 shyam2511 commented Jul 9, 2026

Copy link
Copy Markdown
Member

Description

Summary

Adds oracle-oci-mcp-auth-provider, a reusable OCI authentication-provider package for MCP servers.

It provides:

  • SecurityTokenProfileProvider
  • InstancePrincipalProvider
  • ResourcePrincipalSessionTokenProvider
  • UserPrincipalSessionTokenProvider

The RPST implementation supports IMDS region lookup, endpoint derivation, signed bootstrap request, query-string retry, timeouts, and error behavior. UPST supports secure RSA key generation, token exchange, renewal, and private temporary credential storage.

Motivation and context

OCI MCP servers need reusable authentication logic without duplicating credential handling and RPST signing behavior. This package centralizes those flows while retaining compatibility with the prior Database MCP RPST/IP implementation.

Dependencies

  • cryptography==46.0.7
  • oci==2.179.0
  • requests>=2.32.5

Type of change

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • 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?

  • cd src/oracle-oci-mcp-auth-provider && uv run pytest --cov=. --cov-branch --cov-report=term-missing -q
    • 18 tests passed
    • 97.70% coverage; enforced minimum is 90%
  • cd src/oracle-oci-mcp-auth-provider && uv build
    • Source distribution and wheel built successfully
  • make lint
    • Passed with no warnings
  • tested the database related calls manually, by using cline as agent.

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 9, 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