Startups

Top 3 riskiest misconfigurations on the Salesforce platform

Comment

Fisherman foot on broken cracked thin ice at lake. Dangerous fishing
Image Credits: FedBul (opens in a new window) / Getty Images

David Brooks

Contributor

David Brooks is senior vice president of product at Copado who joined Salesforce.com just after its IPO in 2005. Previously, he worked at six startups with three successful exits over the last 34 years.

Gartner estimates that by 2025, 70% of enterprise applications will be built on low-code and no-code platforms such as Salesforce and ServiceNow. But are these platforms providing a false sense of security?

When asked, Salesforce administrators often reply that the company is responsible for security. Security is a shared responsibility on SaaS applications. Your provider secures the infrastructure, and your administrators and developers are responsible for ensuring least privilege access rights.

Cloud misconfigurations are responsible for a three-fold increase in data breaches. Typically, misconfiguration occurs when security settings are allowed to default, inappropriate access levels are assigned, or data barriers are not created to protect sensitive data. Configuring a low-code platform is so easy that the low-code administrator often does not understand the impact of checking a box.

When looking at the impact of a simple checkmark, these are the top three riskiest misconfigurations on the Salesforce platform: Modify All Data (MAD) and View All Data (VAD), Sharing & Sharing Groups and Running Apex code without the “runAs” method.

Let’s look at each and the impact they can have.

MAD and VAD

We’ll start with the obvious and most dangerous. Modify All Data and View All Data permissions do exactly what they say. These are the super user permissions for Salesforce.

If a user has VAD, they have read access to every data record in the system. MAD means they can update and delete every record as well. These permissions should only be given to administrators and even then, to a very limited number of people.

Why would an admin be tempted to give MAD or VAD to non-admins? The typical case is when a user is not able to access data that they have a need to see. The admin reviews the user’s profile and permission sets, all of the sharing rules and role hierarchy, and can’t determine why the user can’t see the information. As a “temporary fix,” they give the user MAD or VAD and now the user can see the records — along with everything else in the system.

This mistake can also happen when developers run into the same dilemma. They temporarily turn on MAD in the user profile in order to make progress in their code and later forget that they turned it on.

To fix this, organizations should employ a tool that scans production and new deployments for MAD/VAD permissions and flags any changes. At a minimum, admins should be trained to never enable these permissions for anyone who is not an admin. A better practice is to make changes in sandboxes and promote them with a DevOps tool, limiting the number of admins in production to one or two individuals.

Sharing and sharing groups

Sharing rules and the role hierarchy are very powerful tools to control which records a user can access, but they also have side effects that are often not obvious. Create, read, update and delete (CRUD) object permissions and even Field Level Security (FLS) are much easier to understand. They are all or nothing, but record sharing is designed to restrict a subset of records at a time.

Let’s take the ability to make an object public. When an object is public, everyone in the organization can see every record of that type. This is sometimes acceptable but only if it is a good idea for every user to see every record for that object. It is usually best practice to make objects private and get clarity on which users should have access to which records. Things get more complicated when these objects are shared with portal users through the Experience Cloud.

Here’s an example of unintended consequences at a temporary employment agency. The agency used a Salesforce customer portal to capture time cards from their temps. The time card page was a custom angular page. A large group of internal employees needed access to these time cards, so the admin decided to make the object public with full read/write access for all users. What they didn’t understand was the option led to sharing with portal users. By sharing with portal users, they made these records read/write for them as well.

Salesforce uses Uniform Resource Identifiers (URIs) to represent each page, and the URI for the angular application contains the unique ID of the standard Salesforce record. When one enterprising temp started erasing the end of the URI, they arrived at a standard Salesforce page with a large edit button. The standard page included all of the fields of the object, including the temp’s hourly salary. With a few clicks, this temp gave himself a nice raise.

The first lesson to be learned here is that sharing controls for portal users should be scrutinized to ensure least privilege access for those users. The second lesson is that SaaS applications can be manipulated by changing the URI in the browser address bar, and this applies to all REST API applications.

Sharing Groups are very powerful, but they can potentially open up accidental access to unauthorized users. The challenge lies with the reality of managing a large enterprise.

As admins start defining sharing groups, it is easy to remember who the members are based on the group names. As more groups are added, however, the more difficult it becomes to distinguish the group members from the names. In fact, when the number of groups increases, it’s likely that groups with small differences in membership will be consolidated.

Eventually, you will create a sharing rule for a group that sounds like it contains the right members, but it may also include several other members that were added by other admins during a consolidation. Now all of these other members get access to the same potentially sensitive information.

To avoid this, you should educate admins on the nuances of these rules and incorporate functional testing of data access in your test suites to ensure sensitive data is not exposed.

The “runAs” method

From the Apex Developer’s Guide:

Generally, all Apex code runs in system mode, where the permissions and record sharing of the current user aren’t taken into account. The runAs method doesn’t enforce user permissions or field-level permissions, only record sharing.

There are two potential problems with runAs. The first is not using it! Even if the admin team does a perfect job of setting up the sharing hierarchy and rules, poorly written Apex code will bypass record sharing unless it is enforced using the runAs method. Developers should be aware of this issue and write their code to enforce sharing appropriately. With runAs, the running user will ensure that this user’s access rights are applied and prevent sensitive information from being exposed.

The second potential problem is the fact that field level permissions are not enforced even in runAs blocks. This opens up the potential for exposing sensitive information stored in a record that the user can access but is protected by field-level security. The temp worker salary story above is a good example. Security may be set up to hide this field from one set of users, provide read-only access to another set of users and read/write access to a very limited number of users. However, a developer can write a lightning controller that bypasses these controls without intending to do it.

In this case, it is important to educate developers on the nuances of these rules, incorporate functional testing of data access in test suites to ensure sensitive data is not exposed and run tests under all of the user types who will have access to the Apex.

Test every path

While greater education and awareness is important to reduce inadvertent access, it will never be a complete solution. Rigorous testing is a must for identifying the mistakes that people make. This involves test automation that accounts for more than just the happy path. Your test organization should always understand the intended access rights associated with sensitive information and design tests that run in the context of all of the users who need access — and even those that don’t.

Running under every possible profile and role is generally impractical, but judiciously choosing a representative variety of users will identify most mistakes. There may be 50 or more different profiles in a given production environment, but they will usually segment into a small number of groups: Those with no access, those with read access and those with read/write access to the sensitive information. Identify those groups and run tests as a user from each and verify both positive and negative access.

Functional testing tools are able to access data just like a user through the browser, so all of the issues can be caught, including lightning components that fail to use runAs.

Finally, security is a shared responsibility for SaaS applications. Point-and-click security settings are very powerful but with great power comes great responsibility.

Editor’s note: a previous edition of this article was incorrectly attributed to the wrong contributor; we regret the error.

More TechCrunch

In an interview at his home near Reykjavík, the entrepreneur-turned-VC shared thoughts on his ventures and the journey that led him from Unity to climate tech, a homecoming of sorts.

Unity co-founder David Helgason’s next act: Gaming the climate crisis

Welcome back to TechCrunch’s Week in Review — TechCrunch’s newsletter recapping the week’s biggest news. Want it in your inbox every Saturday? Sign up here. Over the past eight years,…

Fisker collapsed under the weight of its founder’s promises

What is AI? We’ve put together this non-technical guide to give anyone a fighting chance to understand how and why today’s AI works.

WTF is AI?

President Joe Biden has vetoed H.J.Res. 109, a congressional resolution that would have overturned the Securities and Exchange Commission’s current approach to banks and crypto. Specifically, the resolution targeted the…

President Biden vetoes crypto custody bill

Featured Article

Industries may be ready for humanoid robots, but are the robots ready for them?

How large a role humanoids will play in that ecosystem is, perhaps, the biggest question on everyone’s mind at the moment.

20 hours ago
Industries may be ready for humanoid robots, but are the robots ready for them?

VCs are clamoring to invest in hot AI companies, willing to pay exorbitant share prices for coveted spots on their cap tables. Even so, most aren’t able to get into…

VCs are selling shares of hot AI companies like Anthropic and xAI to small investors in a wild SPV market

The fashion industry has a huge problem: Despite many returned items being unworn or undamaged, a lot, if not the majority, end up in the trash. An estimated 9.5 billion…

Deal Dive: How (Re)vive grew 10x last year by helping retailers recycle and sell returned items

Tumblr officially shut down “Tips,” an opt-in feature where creators could receive one-time payments from their followers.  As of today, the tipping icon has automatically disappeared from all posts and…

You can no longer use Tumblr’s tipping feature 

Generative AI improvements are increasingly being made through data curation and collection — not architectural — improvements. Big Tech has an advantage.

AI training data has a price tag that only Big Tech can afford

Keeping up with an industry as fast-moving as AI is a tall order. So until an AI can do it for you, here’s a handy roundup of recent stories in the world…

This Week in AI: Can we (and could we ever) trust OpenAI?

Jasper Health, a cancer care platform startup, laid off a substantial part of its workforce, TechCrunch has learned.

General Catalyst-backed Jasper Health lays off staff

Featured Article

Live Nation confirms Ticketmaster was hacked, says personal information stolen in data breach

Live Nation says its Ticketmaster subsidiary was hacked. A hacker claims to be selling 560 million customer records.

2 days ago
Live Nation confirms Ticketmaster was hacked, says personal information stolen in data breach

Featured Article

Inside EV startup Fisker’s collapse: how the company crumbled under its founders’ whims

An autonomous pod. A solid-state battery-powered sports car. An electric pickup truck. A convertible grand tourer EV with up to 600 miles of range. A “fully connected mobility device” for young urban innovators to be built by Foxconn and priced under $30,000. The next Popemobile. Over the past eight years, famed vehicle designer Henrik Fisker…

2 days ago
Inside EV startup Fisker’s collapse: how the company crumbled under its founders’ whims

Late Friday afternoon, a time window companies usually reserve for unflattering disclosures, AI startup Hugging Face said that its security team earlier this week detected “unauthorized access” to Spaces, Hugging…

Hugging Face says it detected ‘unauthorized access’ to its AI model hosting platform

Featured Article

Hacked, leaked, exposed: Why you should never use stalkerware apps

Using stalkerware is creepy, unethical, potentially illegal, and puts your data and that of your loved ones in danger.

2 days ago
Hacked, leaked, exposed: Why you should never use stalkerware apps

The design brief was simple: each grind and dry cycle had to be completed before breakfast. Here’s how Mill made it happen.

Mill’s redesigned food waste bin really is faster and quieter than before

Google is embarrassed about its AI Overviews, too. After a deluge of dunks and memes over the past week, which cracked on the poor quality and outright misinformation that arose…

Google admits its AI Overviews need work, but we’re all helping it beta test

Welcome to Startups Weekly — Haje‘s weekly recap of everything you can’t miss from the world of startups. Sign up here to get it in your inbox every Friday. In…

Startups Weekly: Musk raises $6B for AI and the fintech dominoes are falling

The product, which ZeroMark calls a “fire control system,” has two components: a small computer that has sensors, like lidar and electro-optical, and a motorized buttstock.

a16z-backed ZeroMark wants to give soldiers guns that don’t miss against drones

The RAW Dating App aims to shake up the dating scheme by shedding the fake, TikTok-ified, heavily filtered photos and replacing them with a more genuine, unvarnished experience. The app…

Pitch Deck Teardown: RAW Dating App’s $3M angel deck

Yes, we’re calling it “ThreadsDeck” now. At least that’s the tag many are using to describe the new user interface for Instagram’s X competitor, Threads, which resembles the column-based format…

‘ThreadsDeck’ arrived just in time for the Trump verdict

Japanese crypto exchange DMM Bitcoin confirmed on Friday that it had been the victim of a hack resulting in the theft of 4,502.9 bitcoin, or about $305 million.  According to…

Hackers steal $305M from DMM Bitcoin crypto exchange

This is not a drill! Today marks the final day to secure your early-bird tickets for TechCrunch Disrupt 2024 at a significantly reduced rate. At midnight tonight, May 31, ticket…

Disrupt 2024 early-bird prices end at midnight

Instagram is testing a way for creators to experiment with reels without committing to having them displayed on their profiles, giving the social network a possible edge over TikTok and…

Instagram tests ‘trial reels’ that don’t display to a creator’s followers

U.S. federal regulators have requested more information from Zoox, Amazon’s self-driving unit, as part of an investigation into rear-end crash risks posed by unexpected braking. The National Highway Traffic Safety…

Feds tell Zoox to send more info about autonomous vehicles suddenly braking

You thought the hottest rap battle of the summer was between Kendrick Lamar and Drake. You were wrong. It’s between Canva and an enterprise CIO. At its Canva Create event…

Canva’s rap battle is part of a long legacy of Silicon Valley cringe

Voice cloning startup ElevenLabs introduced a new tool for users to generate sound effects through prompts today after announcing the project back in February.

ElevenLabs debuts AI-powered tool to generate sound effects

We caught up with Antler founder and CEO Magnus Grimeland about the startup scene in Asia, the current tech startup trends in the region and investment approaches during the rise…

VC firm Antler’s CEO says Asia presents ‘biggest opportunity’ in the world for growth

Temu is to face Europe’s strictest rules after being designated as a “very large online platform” under the Digital Services Act (DSA).

Chinese e-commerce marketplace Temu faces stricter EU rules as a ‘very large online platform’

Meta has been banned from launching features on Facebook and Instagram that would have collected data on voters in Spain using the social networks ahead of next month’s European Elections.…

Spain bans Meta from launching election features on Facebook, Instagram over privacy fears