Reviewing backend connections, destinations and service permissions
Effective deployment configuration can expose information and capabilities beyond the security assumptions in application code. Understanding backend connections and destinations and service permissions helps establish which security property the feature needs and where that property is actually enforced.
What does this involve?
Authorisation determines which resources and operations an established identity may use. It must be enforced where protected data is read or changed. User interface restrictions, obscure identifiers and documentation can help usability, but they do not replace the service's own permission decision.
Applications interact with multiple services, including APIs, databases, or other components. These may be considered internal to the application but not included in the application's standard access control mechanisms, or they may be entirely external. In either case, it is necessary to configure the application to interact securely with these components and, if required, protect that configuration.
Why it matters
Consider a realistic failure: an operational setting introduces a public diagnostic or privileged service path that the feature review did not consider.
A missing check can expose another account's information or let an ordinary user perform a privileged action. The result should be described by the actual records and operations reached, including whether access crosses a customer or organisational boundary.
A code audit connects a stated requirement to the implementation responsible for enforcing it. Source review and targeted behavioural checks should explain the same boundary and any relevant exceptions.
How penetration testers check for it
Review the specific control expectations below against the code, deployment and observable application behaviour.
- Confirm that communications between backend application components that don't support the application's standard user session mechanism, including APIs, middleware, and data layers, are authenticated. Authentication must use individual service accounts, short-term tokens, or certificate-based authentication and not unchanging credentials such as passwords, API keys, or shared accounts with privileged access.
- Confirm that communications between backend application components, including local or operating system services, APIs, middleware, and data layers, are performed with accounts assigned the least necessary privileges.
- Confirm that if a credential has to be used for service authentication, the credential being used by the consumer is not a default credential.
- Confirm that an allowlist is used to define the external resources or systems with which the application is permitted to communicate. This allowlist can be implemented at the application layer, web server, firewall, or a combination of different layers.
- Confirm that the web or application server is configured with an allowlist of resources or systems to which the server can send requests or load data or files from.
- Confirm that where the application connects to separate services, it follows the documented configuration for each connection, such as maximum parallel connections, behaviour when maximum allowed connections is reached, connection timeouts, and retry strategies.
- Test nested resources, background processing and state changes.
- Confirm rejection as well as the legitimate successful journey.
How to fix it
Implement the required boundary in the component that actually performs the sensitive operation and retain focused regression coverage.
- Define explicit access rules and default-deny behaviour.
- Bind resource selection to trusted ownership and tenant context.
- Enforce permission checks at each protected operation.
- Maintain regression cases for unauthorised users and changed permissions.
A successful response alone does not prove unauthorised access. Establish whose resource was affected and what the caller was legitimately entitled to do.
Recheck the changed behaviour against the original failure conditions and the legitimate user journey. Keep enough evidence to show which release and configuration were verified, and include related entry points that depend on the same security decision.
Related issues
- Auditing service-to-service encryption and peer identity
- Auditing TLS protocols, certificates and encrypted connections
- Documenting application roles, permissions and access rules
Read about our methodology or contact pentested.com to discuss the security of your application code.