Skip to content

Replace hardcoded Caldera credentials with env vars#13

Open
deacon-mp wants to merge 1 commit into
mainfrom
fix/remove-hardcoded-credentials
Open

Replace hardcoded Caldera credentials with env vars#13
deacon-mp wants to merge 1 commit into
mainfrom
fix/remove-hardcoded-credentials

Conversation

@deacon-mp

Copy link
Copy Markdown
Collaborator

Summary

  • Replace hardcoded API key (ADMIN123) and URL in app/mcp_server.py with os.environ.get() calls
  • Credentials are now read from CALDERA_API_KEY and CALDERA_URL environment variables
  • Previous default values are preserved as fallbacks for backward compatibility

Motivation

Hardcoded credentials in source code pose a security risk, especially in public repositories. This change allows users to configure credentials via environment variables without modifying the source, while maintaining backward compatibility with the existing defaults.

Test plan

  • Verify the MCP server starts correctly without environment variables set (uses defaults)
  • Verify the MCP server reads CALDERA_API_KEY and CALDERA_URL from the environment when set
  • Verify API calls succeed with custom credentials passed via environment variables

🤖 Generated with Claude Code

The API key and URL were hardcoded in mcp_server.py. This change reads
them from CALDERA_API_KEY and CALDERA_URL environment variables,
falling back to the previous defaults for backward compatibility.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant