You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cloud credential CRUD stores whitespace-padded keys and reports no-op updates as successful writes #7420
Two lifecycle gaps in the cloud-credential CRUD let bad input in and report no-ops as successful writes:
CloudCredentialService.create stores name / accessKey / secretKey exactly as pasted. An accessKey or secretKey pasted with a trailing space or newline is saved "successfully" and then breaks every cloud signature check (SignatureDoesNotMatch), and a whitespace-padded accessKey also slips past the vendor + accessKey uniqueness check ("AKID " and "AKID" pass as distinct). CloudCredentialService.update has the same gap for a rotated secret.
CloudCredentialService.update with only an id (no name, secretKey or remark) "succeeds": the write path still bumps gmt_modified, evicts every cached cloud client for that credential (AliyunClientFactory / TencentClientFactory invalidate) and records an UPDATE_CLOUD_CREDENTIAL SUCCESS audit row - a no-op reported as a successful update.
Root cause
Paste hygiene is missing at the service boundary (whitespace is never trimmed before validation and persistence), and the partial-update path has no "at least one field" guard, so an empty change set flows into a write that reports metadata and side effects for work it did not do.
Impact
Operators create credentials that look valid but can never authenticate (whitespace in the key material), and the credential name-uniqueness check can be bypassed by whitespace; empty update calls fabricate modification metadata, cache invalidations and audit trail entries. Same failure-as-success class the project has been cleaning up.
Activity