Problem Statement
Credentials (usernames, passwords, API keys) are currently stored in plaintext in YAML descriptor files, configuration properties, and logs, creating significant security risks for credential exposure.
Current Behavior
Location: jplatform-classloader/src/main/java/org/flossware/jplatform/classloader/IsolatedClassLoader.java:199-205
String username = props.get("classpath." + host + ".auth.username");
String password = props.get("classpath." + host + ".auth.password");
if (username != null && password != null) {
return AuthConfig.basic(username, password); // ⚠️ Plaintext
}
Risks:
- Credentials visible in YAML files committed to version control
- Passwords logged in debugging output
- Credentials exposed in configuration backups
- No encryption at rest
- No credential rotation mechanism
Expected Behavior
Credentials should be:
- Stored encrypted in external secret management system (Vault, AWS Secrets Manager)
- Referenced by path, not stored inline
- Rotatable without code changes
- Auditable with access logging
- Never logged in plaintext
Proposed Solution
Option 1: HashiCorp Vault Integration
Add Vault configuration source module (stub exists at jplatform-config-vault):
// In descriptor YAML:
classpath:
- url: https://repo.example.com/libs
auth:
type: vault
path: secret/data/platform/repo-credentials
usernameKey: username
passwordKey: password
Option 2: AWS Secrets Manager
classpath:
- url: https://repo.example.com/libs
auth:
type: aws-secrets
secretId: platform/repo-credentials
region: us-east-1
Option 3: Environment Variable Substitution (Minimum)
classpath:
- url: https://repo.example.com/libs
auth:
username: ${REPO_USERNAME}
password: ${REPO_PASSWORD}
Implementation Tasks
- Complete
jplatform-config-vault module
- Add environment variable substitution to descriptor parser
- Create
SecretsProvider interface in jplatform-api
- Update
IsolatedClassLoader to use secrets provider
- Add credential masking to logging (see issue #XXX)
- Document secrets management in new
SECRETS_MANAGEMENT.md
Acceptance Criteria
Verification Steps
- Configure Vault with test credentials
- Deploy application with Vault-sourced credentials
- Verify authentication works without plaintext in descriptors
- Check logs to confirm no credential leakage
- Test credential rotation without restart
Impact
Severity: HIGH
- Current risk: Credential exposure in version control, logs, backups
- Compliance: Required for SOC 2, PCI-DSS, HIPAA
- Production blocker: Cannot deploy to regulated environments
References
Priority: HIGH | Production Readiness Review Score: 8.3/10
Problem Statement
Credentials (usernames, passwords, API keys) are currently stored in plaintext in YAML descriptor files, configuration properties, and logs, creating significant security risks for credential exposure.
Current Behavior
Location:
jplatform-classloader/src/main/java/org/flossware/jplatform/classloader/IsolatedClassLoader.java:199-205Risks:
Expected Behavior
Credentials should be:
Proposed Solution
Option 1: HashiCorp Vault Integration
Add Vault configuration source module (stub exists at
jplatform-config-vault):Option 2: AWS Secrets Manager
Option 3: Environment Variable Substitution (Minimum)
Implementation Tasks
jplatform-config-vaultmoduleSecretsProviderinterface injplatform-apiIsolatedClassLoaderto use secrets providerSECRETS_MANAGEMENT.mdAcceptance Criteria
Verification Steps
Impact
Severity: HIGH
References
Priority: HIGH | Production Readiness Review Score: 8.3/10