Summary
Dinky's SysConfigController.getAll() endpoint can be accessed without authentication because a method-level @SaIgnore overrides the controller's login requirement. A remote unauthenticated caller who can reach the HTTP service may retrieve system configuration, including credentials and tokens that are returned without adequate redaction.
Affected context
The issue occurs in Dinky deployments where the SysConfig API is reachable and the GET /api/sysConfig/getAll handler uses an authentication-bypass annotation. The response may contain configured LDAP, object-storage, Maven, and DolphinScheduler credentials, as well as Dinky token values. Exposure depends on network reachability and on which settings have been populated in the deployment.
Exploit preconditions
- Attack surface: Dinky's HTTP API, specifically
GET /api/sysConfig/getAll - Required access: Network connectivity to the Dinky HTTP port; no valid session or role is required
- Trigger point: A parameterless request to the system-configuration endpoint
- Why exploitation is possible: The method-level
@SaIgnorebypasses the class-level@SaCheckLogin, allowing the Sa-Token interceptor to permit unauthenticated access - Data condition: Sensitive values are exposed when they are present in system configuration and are not handled by the limited desensitization logic
Why this happens
The underlying bug is an authentication control override. A method-level exemption disables the broader class-level login check for an endpoint that returns security-sensitive configuration data. This behavior maps to CWE-306: Missing Authentication for Critical Function, because the application does not require authentication before performing a sensitive information retrieval operation. The risk is amplified by returning credential-bearing fields in cleartext rather than applying consistent secret-handling rules.
Potential impact
- An unauthenticated caller may obtain system configuration details
- Third-party credentials, access keys, passwords, and service tokens could be disclosed
- Exposed tokens may enable access to related Dinky operations or integrations
- Attackers could use leaked credentials for unauthorized access to LDAP, object storage, Maven repositories, or orchestration services
- Credential disclosure could support follow-on file modification, data access, or lateral movement
General mitigation guidance
Mitigation generally focuses on requiring authentication and authorization for every endpoint that returns configuration or secret material.
Common defensive patterns include:
- Removing authentication-bypass annotations from sensitive handlers
- Applying explicit session and role checks at the endpoint boundary
- Returning only a strict allowlist of non-sensitive configuration fields
- Excluding secrets from API responses by design rather than relying only on field-level masking
- Centralizing consistent redaction or secret-reference handling for credential-bearing values
- Storing secrets in a dedicated secret-management facility and injecting references instead of plaintext values
- Restricting network access to administrative APIs and applying least privilege to service credentials
- Rotating credentials that may have been exposed and reviewing dependent systems for unauthorized use
How teams detect issues like this
Detection can combine source review, runtime monitoring, and policy enforcement:
- Use static analysis to identify authentication-bypass annotations on handlers that return configuration, credentials, or administrative data
- Review controller inheritance and annotation precedence to verify that method-level exemptions cannot override required protections
- Search API schemas and response serializers for secret-bearing fields such as passwords, access keys, and tokens
- Monitor unauthenticated requests to system-configuration and administrative endpoints
- Add policy checks that prohibit plaintext secrets in API responses and require explicit authorization metadata for sensitive routes
- Use automated code-review tools to flag exposed configuration endpoints and inconsistent redaction behavior

