Close Menu
SalesforceCodex
    Facebook X (Twitter) Instagram
    Trending
    • How to Build a Generic Modal Window in Lightning Web Component
    • Top 10 Salesforce Flow Features of Salesforce Summer ’25
    • Unlock the Power of Vibe Coding in Salesforce
    • How to Implement Dynamic Queueable Chaining in Salesforce Apex
    • How to Implement Basic Queueable Chaining in Salesforce Apex
    • How to Suppress PMD Warnings in Salesforce Apex
    • Top 10 PMD Issues Salesforce Developers Should Focus on in Apex
    • How to Use Graph API for Outlook-Salesforce Connection
    Facebook X (Twitter) Instagram
    SalesforceCodex
    Subscribe
    Thursday, May 29
    • Home
    • Architecture
    • Salesforce
      • News
      • Apex
      • Integration
      • Books Testimonial
    • Questions
    • Certification
      • How to Prepare for Salesforce Integration Architect Exam
      • Certification Coupons
    • Integration Posts
    • Downloads
    • About Us
      • Privacy Policy
    SalesforceCodex
    Home»Salesforce»Basics of Securing Salesforce Application

    Basics of Securing Salesforce Application

    Dhanik Lal SahniBy Dhanik Lal SahniJanuary 19, 2021Updated:January 12, 20252 Comments6 Mins Read
    Facebook Twitter Pinterest LinkedIn Tumblr Email
    Basics of Securing Salesforce Application
    Share
    Facebook Twitter LinkedIn Pinterest Email

    Application security is the discipline of processes, tools, and practices aiming to protect applications from threats throughout the entire application lifecycle. We have to properly analyze and handle application security risks. Web developers or administrators should follow best practices while developing applications. This post will explain the basics of securing Salesforce application.

    Application security can also help organizations protect all kinds of applications used by internal and external stakeholders including customers, business partners and employees.

    Application security issues are growing day by day, in this month only lot of internet fraud and data breach incident happened. See below image to for some reported issues of big organization’s.

    Security and Data Security - SalesforceCodex

    Why should we secure web application?

    Internet is nowadays full of security fraud, internet robbery, data breach etc. not only small organization, big organization also facing lot of data security issues. If we see, in this month only lot of internet fraud and data breaches happened.

    Why Application Security is important - SalesforceCodex

    Based on this internet fraud organizations have to secure their application not from external source but also from internal user. If we are able to make application and our network secure then we can prevents loss of sensitive data. Data is money for business so if we are able to save our data our business reputation and financial loss also can be reduced.

    Top Web Application Security Risks

    There are many web application flaws where attacker can attack and utilize those to transact into our system or steal our important data. Let us see top web application security risks.

    1. Injection:

    Injection flaws are when an attacker/hacker uses unfiltered and often malicious data to attack databases or directories connected to web applications.

    2. Broken Authentication

    Authentication is “broken” when attackers/hackers are able to compromise passwords, keys or session tokens, user account information, and other details to assume user identities.

    3. Sensitive Data Exposure

    Many APIs and web applications do not properly protect sensitive data, such as financial, healthcare, and PII. Attackers/hackers may steal or modify such weakly protected data to conduct credit card fraud, identity theft, or other crimes.

    4. Security Misconfiguration

    Security misconfiguration is insecure default configurations, incomplete or ad hoc configurations, open cloud storage, misconfigured HTTP headers, and verbose error messages containing sensitive information. This way attacker can easily login to our system and they can steal data/files.

    5. Cross-Site Scripting XSS

    Cross-site scripting uses malicious code injected into sites to attack a user’s web browser. An attacker can insert the code through a link and, together with social engineering, will lure the user to clicking the link and executing the code. 

    6. Cross-Site Request Forgery

    Cross-site request forgeries (CSRF) use social engineering to trick authenticated users into clicking a link, as an example and take control of their sessions.

     7. Unvalidated Redirects &  Forwards

    Unvalidated redirects and forwards are possible when a web application accepts untrusted input that could cause the web application to redirect the request to a URL contained within untrusted input.

    8. Using Components with Known Vulnerabilities

    Many security issues can come with using unfettered code from sources you aren’t familiar with. May be component which we purchased have injection flaw then it will make our application in security risk. So due diligence needs to get done when considering using a third-party code or component in web application.

    Is all Salesforce app secure?

    We can not say that all Salesforce application is 100% secure. Data security is our priority and we have to initiated proper data governance policy then only our Salesforce app will be secure. As we are creating custom application like customer portal, mobile application or lightning component with untrusted JavaScript libraries, we can be in risk in these cases. So we should write code with best practice and we should use verified trusted libraries only.

    Is Salesforce App Secure - SalesforceCodex

    How to secure Salesforce Application?

    Salesforce offer two type of security – System level security and Application level security. System level security is implemented for complete Salesforce org like who can access our application and Application level security is mainly controls and restricts what the user can edit, delete and view the values of the field of an Object.

    System Level Security:

    System–level security is a architecture, policy and processes that ensure data and system security on individual or network computer systems. System level security is implemented using authentication and authorization.

    Authentication is the process of recognizing a user’s identity. It will prevent unauthorized access to our salesforce org or its data by making sure each logged in user is who they say they are.

    Authorization defines which data or features an authenticated user can use. This will be used once authentication is complete and user is into the application. Now what a user can do is implemented using authorization.

    System Level Security | Securing Salesforce | SalesforceCodex

    Application Level Security:

    Application level security controls and restricts what the user can edit, delete and view the values of the field of an Object. Using below implementation we can secure our application.

    1. Security Health Check

    Use Salesforce Health Check tool to identify and fix potential vulnerabilities in your security settings.

    2. Auditing

    Auditing provides information about use of the system, which can be critical in diagnosing potential or real security issues. To verify that our Org is actually secure, we should perform audits to monitor for unexpected changes or usage trends.

    We can monitor record modification fields, login history for successful and failure attempt, field history tracking and field audit trails.

    3. Salesforce Shield

    Salesforce Shield is a trio (3 features) of security tools that helps admins and developers build extra levels of trust, compliance, and governance right into business-critical apps.

    Shield Platform Encryption:

    Shield Platform Encryption allows us to natively encrypt most sensitive data at rest across all your Salesforce apps. Encrypting data at rest adds another layer of protection to PII, sensitive, confidential, or proprietary data. We can add masking as well to more security of PI and PII information.

    Real-Time Event Monitoring:

    Real-Time Event Monitoring gives you access to detailed performance, security, and usage data on all your Salesforce apps. We can see who is accessing critical business data when, and from where.

    Field Audit Trail:

    Field Audit Trail lets you know the state and value of your data for any date, at any time. We can use it for regulatory compliance, internal governance, audit, or customer service.

    4. Data Security

    Using this security feature, we can control which users approach which information in your entire organization, a particular object, a particular field, or an individual record. We can utilize profile, permission set, custom permission, sharing setting, apex sharing, role hierarchy to restrict object and fields and share records.

    Data Level Security | SalesforceCodex

    5. Security Testing

    We should get tested our custom code components thoroughly. All permission of object, fields, records should be tested for each profile/permission sets. Customer Portal/Mobile application needs special attention as these will be used by external users.

    Session Video:

    Reference:

    https://developer.salesforce.com/blogs/developer-relations/2017/04/salesforce-data-security-model-explained-visually.html

    https://trailhead.salesforce.com/content/learn/modules/data_security/data_security_overview

    application security custom permission OWD Permission set profile salesforce sharing rule sharing setting system level security web application flaws web application risks
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    Previous ArticleTop 10 Best Practice for Lightning Flow
    Next Article Salesforce Integration Interview Questions
    Dhanik Lal Sahni
    • Website
    • Facebook
    • X (Twitter)

    With over 18 years of experience in web-based application development, I specialize in Salesforce technology and its ecosystem. My journey has equipped me with expertise in a diverse range of technologies including .NET, .NET Core, MS Dynamics CRM, Azure, Oracle, and SQL Server. I am dedicated to staying at the forefront of technological advancements and continuously researching new developments in the Salesforce realm. My focus remains on leveraging technology to create innovative solutions that drive business success.

    Related Posts

    By Dhanik Lal Sahni4 Mins Read

    How to Build a Generic Modal Window in Lightning Web Component

    May 26, 2025
    By Dhanik Lal Sahni6 Mins Read

    Top 10 Salesforce Flow Features of Salesforce Summer ’25

    May 11, 2025
    By Dhanik Lal Sahni6 Mins Read

    Unlock the Power of Vibe Coding in Salesforce

    April 30, 2025
    View 2 Comments

    2 Comments

    1. Pingback: What is Salesforce Administrator Job Profile? - SalesforceCodex

    2. Pingback: Difference Between With and Without Security in Apex

    Leave A Reply Cancel Reply

    Ranked #1 SALESFORCE DEVELOPER BLOG BY SALESFORCEBEN.COM
    Featured on Top Salesforce Developer Blog By ApexHours
    Recent Posts
    • How to Build a Generic Modal Window in Lightning Web Component
    • Top 10 Salesforce Flow Features of Salesforce Summer ’25
    • Unlock the Power of Vibe Coding in Salesforce
    • How to Implement Dynamic Queueable Chaining in Salesforce Apex
    • How to Implement Basic Queueable Chaining in Salesforce Apex
    Ranked in Top Salesforce Blog by feedspot.com
    RSS Recent Stories
    • How to Connect Excel to Salesforce to Manage Your Data and Metadata February 9, 2025
    • Difference Between With Security and Without Security in Apex January 2, 2025
    • Top Reasons to Love Salesforce Trailhead: A Comprehensive Guide December 5, 2024
    • How to Utilize Apex Properties in Salesforce November 3, 2024
    • How to Choose Between SOQL and SOSL Queries July 31, 2024
    Archives
    Categories
    Tags
    apex (111) apex code best practice (8) apex rest (11) apex trigger best practices (4) architecture (22) Asynchronous apex (9) AWS (5) batch apex (9) batch processing (4) code optimization (8) code review tools (3) custom metadata types (5) design principle (9) file upload (3) flow (15) future method (4) google (6) google api (4) integration (19) integration architecture (6) lighting (8) lightning (64) lightning-combobox (5) lightning-datatable (10) lightning component (30) Lightning web component (62) lwc (51) named credential (8) news (4) optimize apex code (4) Permission set (4) pmd (3) Queueable (9) rest api (23) S3 Server (4) salesforce (141) salesforce apex (46) salesforce api (4) salesforce api integration (5) Salesforce Interview Question (4) salesforce news (5) salesforce question (5) solid (6) tooling api (5) Winter 20 (8)

    Get our newsletter

    Want the latest from our blog straight to your inbox? Chucks us your detail and get mail when new post is published.
    * indicates required

    Ranked #1 SALESFORCE DEVELOPER BLOG BY SALESFORCEBEN.COM
    Featured on Top Salesforce Developer Blog By ApexHours
    Recent Posts
    • How to Build a Generic Modal Window in Lightning Web Component
    • Top 10 Salesforce Flow Features of Salesforce Summer ’25
    • Unlock the Power of Vibe Coding in Salesforce
    • How to Implement Dynamic Queueable Chaining in Salesforce Apex
    • How to Implement Basic Queueable Chaining in Salesforce Apex
    Ranked in Top Salesforce Blog by feedspot.com
    RSS Recent Stories
    • How to Connect Excel to Salesforce to Manage Your Data and Metadata February 9, 2025
    • Difference Between With Security and Without Security in Apex January 2, 2025
    • Top Reasons to Love Salesforce Trailhead: A Comprehensive Guide December 5, 2024
    • How to Utilize Apex Properties in Salesforce November 3, 2024
    • How to Choose Between SOQL and SOSL Queries July 31, 2024
    Archives
    Categories
    Tags
    apex (111) apex code best practice (8) apex rest (11) apex trigger best practices (4) architecture (22) Asynchronous apex (9) AWS (5) batch apex (9) batch processing (4) code optimization (8) code review tools (3) custom metadata types (5) design principle (9) file upload (3) flow (15) future method (4) google (6) google api (4) integration (19) integration architecture (6) lighting (8) lightning (64) lightning-combobox (5) lightning-datatable (10) lightning component (30) Lightning web component (62) lwc (51) named credential (8) news (4) optimize apex code (4) Permission set (4) pmd (3) Queueable (9) rest api (23) S3 Server (4) salesforce (141) salesforce apex (46) salesforce api (4) salesforce api integration (5) Salesforce Interview Question (4) salesforce news (5) salesforce question (5) solid (6) tooling api (5) Winter 20 (8)

    Get our newsletter

    Want the latest from our blog straight to your inbox? Chucks us your detail and get mail when new post is published.
    * indicates required

    Facebook X (Twitter) Instagram Pinterest YouTube Tumblr LinkedIn Reddit Telegram
    © 2025 SalesforceCodex.com. Designed by Vagmine Cloud Solution.

    Type above and press Enter to search. Press Esc to cancel.

    Ad Blocker Enabled!
    Ad Blocker Enabled!
    Our website is made possible by displaying online advertisements to our visitors. Please support us by disabling your Ad Blocker.