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

Featured Article

DEI backlash: Stay up-to-date on the latest legal and corporate challenges

It’s clear that this year will be a turning point for DEI.

2 hours ago
DEI backlash: Stay up-to-date on the latest legal and corporate challenges

The keynote will be focused on Apple’s software offerings and the developers that power them, including the latest versions of iOS, iPadOS, macOS, tvOS, visionOS and watchOS.

Watch Apple kick off WWDC 2024 right here

Hello and welcome back to TechCrunch Space. Unfortunately, Boeing’s Starliner launch was delayed yet again, this time due to issues with one of the three redundant computers used by United…

TechCrunch Space: China’s victory

The court ruling said that Fearless Fund’s Strivers Grant likely violates the Civil Rights Act of 1866, which bans the use of race in contracts.

An appeals court rules that VC Fearless Fund cannot issue grants to Black women, but the fight continues

Instagram Threads is rolling out the ability for users to signal which sort of posts they wanted to see more or less of by swiping.

You can now customize your For You feed on Threads using swipes

The Japanese billionaire who commissioned SpaceX for a private mission around the moon on a Starship rocket has abruptly canceled the project, citing ongoing uncertainties around when the launch vehicle…

Japanese billionaire pulls plug on private ‘dearMoon’ lunar Starship mission

Malicious actors are abusing generative AI music tools to create homophobic, racist, and propagandic songs — and publishing guides instructing others how to do so. According to ActiveFence, a service…

People are using AI music generators to create hateful songs

As WWDC 2024 nears, all sorts of rumors and leaks have emerged about what iOS 18 and its AI-powered apps and features have in store.

What to expect from Apple’s AI-powered iOS 18 at WWDC

Dallas is the second city that Cruise is easing its way back into after pulling its entire U.S. fleet late last year.

GM’s Cruise is testing robotaxis in Dallas again

Featured Article

After raising $100M, AI fintech LoanSnap is being sued, fined, evicted

The company has been sued by at least seven creditors, including Wells Fargo.

6 hours ago
After raising $100M, AI fintech LoanSnap is being sued, fined, evicted

Featured Article

Sonos Ace review: A high-priced contender

The Ace are a contender in a crowded market, but they’re still in search of that magic bullet to truly let them stand out from the pack.

6 hours ago
Sonos Ace review: A high-priced contender

The change would see Instagram becoming more like the free version of YouTube, which requires users to view ads before and in the middle of watching videos.

Instagram confirms test of ‘unskippable’ ads

Commerce platform Shopify has acquired Checkout Blocks, allowing Shopify Plus merchants to make no-code customizations in their checkout to enhance customer experience and potentially boost sales.  Checkout Blocks, which debuted…

Shopify acquires Checkout Blocks, a checkout customization app

After the Digital Markets Act (DMA) forced Apple to allow third-party app stores for iOS in Europe, several developers have launched alternative stores, like the AltStore and MacPaw’s Setapp (currently…

Aptoide launches its alternative iOS game store in the EU

Time is relentless and, right now, it’s no friend to procrastination-prone early-stage startup founders. The application window for Startup Battlefield 200 (SB 200) at TechCrunch Disrupt 2024 slams shut in…

One week left: Apply to TC Disrupt Startup Battlefield 200

Cloudera, the once high-flying Hadoop startup, raised $1 billion and went public in 2018 before being acquired by private equity for $5.3 billion in 2021. Today, the company announced that…

Cloudera acquires Verta to bring some AI chops to its data platform

The global spend management sector is experiencing a tailwind of sorts. North America is arguably the biggest market in this space, but spend management companies have seen demand rise across…

Spend management startup SiFi raises $10M to grow further in Saudi Arabia

Neural Concept lets designers model how components will perform before they can be manufactured.

Swiss startup Neural Concept raises $27M to cut EV design time to 18 months

The StrictlyVC roadtrip continues! Coming off of sold-out events in London, Los Angeles, and San Francisco, we’re heading to Washington, D.C. for a cozy-vc-packed, evening at the Woolly Mammoth Theatre…

Don’t miss StrictlyVC in DC next week

X will now allow users to post consensually produced NSFW content as long as it is prominently labeled as such.

X tweaks rules to formally allow adult content

Ashby consolidates existing talent acquisition tools and leans heavily on AI to automate the more repetitive steps in the recruitment pipeline.

Ashby injects recruiting with a dose of AI

Spotify has announced it’s hiking subscriptions for customers in the U.S., the second such price increase in the space of a year. The music-streaming giant reports that premium pricing will…

Spotify to increase premium pricing in the US to $11.99 per month

Monzo has announced its 2024 financial results, revealing its first full-year pre-tax profit. The company also confirmed that it’s in the early stages of expanding into the broader European market…

UK neobank Monzo reports first full (pre-tax) profit, prepares for EU expansion with Dublin hub

Featured Article

Inside Apple’s efforts to build a better recycling robot

Last week, TechCrunch paid a visit to Apple’s Austin, Texas, manufacturing facilities. Since 2013, the company has built its Mac Pro desktop about 20 minutes north of downtown. The 400,000-square-foot facility sits in a maze of industry parks, a quick trip south from the company’s in-progress corporate campus. In recent years, the capital city has…

15 hours ago
Inside Apple’s efforts to build a better recycling robot

Early attempts at making dedicated hardware to house artificial intelligence smarts have been criticized as, well, a bit rubbish. But here’s an AI gadget-in-the-making that’s all about rubbish, literally: Finnish…

Binit is bringing AI to trash

Temasek has previously invested in Lenskart, and this new funding follows a $500 million investment by the Abu Dhabi Investment Authority last year.

Temasek, Fidelity buy $200M stake in Lenskart at $5B valuation

Less than one year after its iOS launch, French startup ten ten has gone viral with a walkie talkie app that allows teens to send voice messages to their close…

French startup ten ten reinvents the walkie-talkie

Featured Article

Unicorn-rich VC Wesley Chan owes his success to a Craigslist job washing lab beakers

While all of Wesley Chan’s success has been well-documented over the years, his personal journey…not so much. Chan spoke to TechCrunch about the ways his life impacts how he invests in startups.

1 day ago
Unicorn-rich VC Wesley Chan owes his success to a Craigslist job washing lab beakers

Presumptive Republican presidential nominee Donald Trump now has an account on the short-form video app that he once tried to ban. Trump’s TikTok account, which launched on Saturday night, features…

Trump takes off on TikTok

With fewer than 400,000 inhabitants, Iceland receives more than its fair share of tourists — and of venture capital.

Iceland’s startup scene is all about making the most of the country’s resources