Add UPST Authentication for oci api mcp server#359
Open
shyam2511 wants to merge 1 commit into
Open
Conversation
shyam2511
requested review from
AlaaShaker,
gebhardtr and
krisrice
as code owners
July 8, 2026 07:31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.7for RSA key generation and serialization.Type of change
How Has This Been Tested?
make lintuv tool run black --checkon changed OCI API MCP Server Python filesuv tool run isort --settings-path src/oci-api-mcp-server --check-onlyon changed OCI API MCP Server Python filescd src/oci-api-mcp-server && COVERAGE_FILE=../../.coverage.oci-api-mcp-server uv run pytest --cov=. --cov-branch --cov-append --cov-report=term-missingResults:
Checklist: