Showing posts with label Marketplace/App Directory. Show all posts
Showing posts with label Marketplace/App Directory. Show all posts

Securing Salesforce Apps – A Real-World Story with ACME

In the previous blogs, we saw how different vulnerabilities are discovered, resolved and can have impact on the application from the code perspective. In this blog, we walk you through a real world scenario where ACME, a client is using a Salesforce-based application for client onboarding. ACME stores sensitive user data which makes it important for them to implement access controls to guarantee that only authorized team members are able to carry out authorized tasks and view users' personally identifiable information (PII). The application was created to provide a safe and effective onboarding process while streamlining Know Your Customer (KYC) procedures.  

However, handling financial and PII data is not something to be taken lightly. The involvement of sensitive information like personal identification, account statements, and books requires utmost attention. Although Salesforce provides a secure platform to build secure and agile applications, the access control and configuration of the platform is where the real challenge lies. Simply put, even the most secure system is only as safe as its setup.

At this point, ACME realized that they needed a thorough security review, everything from code to Salesforce configurations, and turned to Blueinfy. This blog is aimed at providing a detailed take on how we carried out the security review for ACME and ensured the platform’s reliability. 

The Role of Blueinfy in ACME’s Journey

The main goal of Blueinfy was to make the ACME application and configuration as secure as possible. Our approach was not limited to code reviews and penetration testing for identifying underlying issues. Typically, that’s the way to go; however, Salesforce has its own unique setup that can expose businesses to risks if not addressed properly.

As a result, we decided to kick up the security review by a notch by moving ahead of the usual tests and performing a detailed configuration review. To help the app seamlessly handle the financial data with confidence, we aimed to further strengthen ACME’s foundation.

What the Review Actually Covered

Instead of highlighting the technical jargons, let’s quickly discuss the key areas and checkpoints we covered that made all the difference.

1. Access Management – User Roles, Profiles, Permission Sets

As the name suggests, we started working on the application’s core by reviewing who can access the Salesforce platform, alongside all the interactive resources and functionalities at the user level. To prevent unauthorized access for the safety of sensitive data, effective access management is crucial.

Salesforce provides a unique way to set up user roles, profiles, and permission sets to implement access management, which allows you to decide who has access to different Salesforce components, i.e., records, objects, and fields. Moreover, it also defines the level of access (read, write, delete, etc.) each user has. 
 

It is important to understand the following terms in the context of the Salesforce application configuration-

  • Roles – It helps in determining a user’s position in the org and affects access to records based on the default organization-wide settings. 
  • Profiles – Determines the authorization to perform an action (Create, read, update, and delete) on objects and fields
  • Permission Sets – a list of permissions that need to be granted to users in addition to their profile 
During the Blueinfy review, one of the key focus of the testing was to review user roles and profile setup to identify permission implementation. For example, a non-admin user should not have access to change any system-wide settings. The objective here was also to make sure that ACME is following the principle of least privilege and is granting only the user’s permissions that are necessary. The review team exploited authorization bypass vulnerabilities at many instances due to missing CRUD/FLS enforcement in the code, despite access restrictions being defined through profiles and permission sets.

 

2. Sharing Settings

In Salesforce, sharing settings define how records are shared within the organization. When the application has multiple users and user roles, it is essential to implement platform-provided protection to implement proper authorization. This control ensures that users can only access the data appropriate to their role. 

The sharing settings also configure external organisation-wide defaults, which give control/manage access of external users. When this setting is configured as “Public Read/Write,” it permits all external users to view and modify each record of that object. Blueinfy reviewed ACME’s implementation of sharing settings to ensure proper implementation of authorization. The objective here was also to make sure that ACME is following the principle of least privilege to protect the data of the application against unauthorized access, especially for external users. 

 

3.  Insecure Storage of Sensitive Data 

Ensuring sensitive data is kept securely was a critical component of this review. Moreover, it assists in safeguarding against data breaches and protects the data from unauthorized users. The Salesforce platform provides multiple secure storage options with protected custom metadata API fields. It boasts custom settings, named credentials, and encrypting data in custom objects with keys in protected custom settings. To make sure that no data is stored as plain text, Blueinfy’s evaluation assessed ACME’s use of the Salesforce-supplied encryption mechanism, verifying its proper use. Moreover, the entire application was only accessible over a secure channel (SSL).  

 

4. Wide OAuth Scope

Salesforce often provides a wide third-party app support. However, this brings along the risk of more access than necessary. Protocols like OAuth enable the application to access Salesforce data on behalf of a user. This makes the system vulnerable, as broad scopes can unknowingly provide applications with more data than they require. Blueinfy carefully reviewed the OAuth configurations for ACME’s integration. Here, our main goal was to grant minimal access to external applications. Hence, we took all the narrowly defined common scopes, including Full Access, API Access, and Refresh Tokens, in ACME’s Salesforce environment into consideration and were successfully able to reduce the risk of data leakage by restricting the OAuth scope. Our practice helped in ensuring that only necessary data and functionality were exposed to external systems. 

 

5. Session Management

Session management refers to the controls that decide the duration of a user session and system behavior on user inactivity. Improperly configured session timeout may cause unauthorized access if a session is active for a long time, or users may get logged out early, causing inconvenience. Blueinfy made sure that ACME set the session timeouts correctly so that it reduces the risks of session hijacking and more.

 

6. Password Policies

Strong passwords are still the first line of defence. Even cloud platforms like Salesforce can fall victim to brute-force attacks with weak or predictable passwords. To prevent such instances and unauthorized user access, Blueinfy made sure that ACME’s application is aligned with industry best practices to protect user accounts from common threats. 

 

7. Missing Security Headers

Web applications rely on security headers for functions including protection against HSTS, clickjacking, content injection, and other common issues. Applications can be vulnerable to these threats when security headers are absent or incorrectly set. Blueinfy verified the presence of essential security headers in ACME’s Salesforce application.

Key Takeaways from the Review

Our testing methodologies allowed us to make significant practical improvements. From reducing excessive permissions and refining data-sharing rules to setting stricter login controls, Blueinfy did not just reduce hidden risks for ACME but also provided a clearer picture of the application’s functioning. 
This resulted in making the ACME’s Salesforce application more compliant and genuinely more secure. More importantly, ACME’s team could now serve clients knowing that their information was well-protected.

The Bigger Picture: Why This Matters for Businesses

For any business that handles financial or personal data, a simple overlooked configuration can result in costly breaches and distrust among consumers. This highlights the point that security reviews should not be seen as nice, optional extras, but rather as a necessity for growth. By acting proactively, ACME created an opportunity instead of a problem and improved its system and client assurance. 

ACME’s experience teaches every company that uses Salesforce or other similar platforms an important lesson: a secure and stable platform requires attention and expertise to point out certain misconfigurations. Salesforce has strong built-in protections, but how these parameters apply depends entirely on the configuration of the platform.
 

[Case Study] Case Study: Securing App Directory Applications with Targeted Security Reviews

Background
ACME has emerged as a leading messaging platform company that specializes in providing real-time communication solutions. With a robust suite of features designed for managing notifications from users and groups, ACME has positioned itself as an essential tool for businesses and individuals seeking efficient communication.

One of the standout features of ACME's platform is its ability to allow users and vendors to develop applications that integrate seamlessly with third-party API/SaaS solutions. This capability enables users to receive notifications and updates in real-time, consolidating various operational outcomes into a single interface. By eliminating the need for users to switch between multiple applications, ACME enhances user experience and operational efficiency.

However, as the App Directory applications have full privileges to the platform, poorly written applications can compromise the security of the ACME’s platform along with the ACME’s users’ data. Thus, it becomes extremely important for the companies to protect their platform itself as well as the data of users whenever users use the App Directory apps developed by a third party. Hence, the rapid expansion of the App Directory has introduced significant security challenges. As more applications are added, the risk of vulnerabilities and security breaches increases, necessitating a comprehensive approach to security reviews.

Challenges
The integration of third-party applications into ACME's platform presents several challenges:
Security Risks: The extensive App Directory poses significant security risks if comprehensive reviews are not performed. Each application may introduce vulnerabilities that could compromise user data and the integrity of the platform.

Complexity of Integrations:
Automated security scanners often struggle to conduct thorough reviews due to the intricate nature of these integrations. The diverse functionalities and varying levels of security compliance among third-party applications complicate the review process.

Time-Consuming Manual Testing: While manual black-box testing can provide in-depth security insights, it is often time-consuming and resource-intensive. This approach can delay the onboarding of new applications, impacting ACME's growth and responsiveness to market demands.

Need for a Systematic Approach: Without a structured methodology for security reviews, ACME risks overlooking critical vulnerabilities, which could lead to data breaches and loss of user trust.

Solutions
To address these challenges, ACME partnered with Blueinfy. Blueinfy undertook a comprehensive analysis of ACME's application development process and architecture in order to build a efficient security review methodology. The following solutions were implemented:

Development of a Security Review Methodology: Blueinfy created a tailored methodology to define the scope of security reviews based on integrated application domains and related functionalities. This systematic approach ensures that all relevant aspects of an application are considered during the review process.

Identify Scoped Entities: The methodology specifies the domains and users interacting with the platform application, whether directly or indirectly, through data communication. By clearly defining these interactions, the focus of the security reviews would be on
the most critical areas, ensuring thorough examination of potential vulnerabilities.

Time-Bound Black-Box Security Reviews: Blueinfy conducted time-bound black-box application security reviews on the specified scoped domains/entities. This focused approach allowed for efficient testing while maintaining high standards of security assessment. Remarkably, this process achieved zero false positives and negatives, ensuring that all identified vulnerabilities were genuine and actionable.

Outcome
The partnership between ACME and Blueinfy yielded significant positive outcomes:

Secure Expansion of App Directory: ACME can now securely expand its App Directory, incorporating hundreds of applications within a minimal timeframe. The targeted security reviews have instilled confidence in the integrity of the applications being added.

Effective Vulnerability Mitigation: The targeted security reviews ensure that vulnerabilities associated with third-party integrations are effectively mitigated. This proactive approach minimizes the risk of security breaches and enhances user trust in the platform.

Operational Efficiency: By streamlining the security review process, ACME can onboard new applications more quickly, maintaining its competitive edge in the messaging platform market.

Conclusion
The collaboration between ACME and Blueinfy serves as a compelling case study in the importance of targeted security reviews for application platforms. As the digital landscape continues to evolve, the need for robust security measures becomes increasingly critical. By implementing a systematic approach to security reviews, ACME has not only enhanced the security of its App Directory but also ensured operational efficiency and user trust.

Article by Amish Shah

[Case Study] Security Review of ACME's Marketplace Applications

Background
ACME is a prominent player in the Customer Relationship Management (CRM) industry, renowned for its robust cloud-based platform. This platform is equipped with a variety of built-in features, including leads, orders, contacts, accounts, and user management capabilities. Designed to meet diverse customer needs, ACME’s platform allows users and vendors to extend functionalities through a proprietary programming language. This flexibility enables the development of custom solutions that can be deployed on ACME's Marketplace, fostering innovation and user engagement.

However, the very features that provide flexibility and customization also introduce significant security vulnerabilities. As applications developed on the platform operate within the same environment as built-in features, insecure applications can jeopardize the entire system, exposing users to various risks and potentially damaging ACME's reputation. Thus, it becomes extremely important for the ACME to protect their platform itself as well as the data of users whenever users use the Marketplace apps developed by a third party.

Challenges

Security Risks: The ability for users and vendors to create custom applications raised concerns about the security of these applications, as vulnerabilities could be exploited to compromise the entire platform.

Inefficient Security Review Process: The existing security review process was time-consuming, particularly due to the limited coverage of automated Static Application Security Testing (SAST) scanners for the custom programming language used on the platform.

Manual Review Limitations: Conducting thorough manual reviews was essential but resource-intensive, leading to delays in application deployment.

Solutions
To address these challenges, ACME partnered with Blueinfy to develop a comprehensive security review strategy. The approach included several key components:

Tailored Security Review Process:
Blueinfy's experts conducted an in-depth analysis of ACME's platform, focusing on its built-in features and the unique programming language.

Checklist and Automation: A checklist of insecure coding practices was created, specifically tailored to the platform's programming language. Blueinfy developed specialized utilities to detect insecure coding patterns within the applications, enhancing the efficiency of the review process. This checklist and utilities served as a foundational tool for identifying vulnerabilities in custom code.

Focused Manual Code Reviews: The team performed manual code reviews, concentrating on the identified insecure patterns, while also addressing false positives and negatives to ensure accuracy.

Blackbox Testing:
External endpoints were identified from the code, and manual blackbox testing was conducted on these endpoints to further validate security.


Outcome
The implementation of this systematic security review process yielded significant improvements for ACME:

Enhanced Security: The comprehensive review process allowed for the early identification of vulnerabilities, thereby strengthening the overall security of the platform and its applications.

Reduced Review Time: By streamlining the security review process, ACME was able to validate applications more efficiently, significantly reducing the time required for comprehensive security assessments.

Conclusion
By implementing these strategies, ACME not only fortified its platform against potential threats but also established a model for ongoing security improvement in the rapidly evolving landscape of cloud-based applications.

Article by Amish Shah