SlideShare ist ein Scribd-Unternehmen logo
1 von 22
Farmington Hills
Salesforce Developer User Group
Apex Hours
Lightning Locker Service
#SalesforceApexHours #FarmingtonHillsSFDCDug
Speaker
Date
Venue/Link
Manish Choudhari, Jigar ,Amit Chaudhary
Saturday, DEC 15, 2018 10:00 AM EST ( 8:30 PM IST )
#FarmingtonHillsSFDCdug #SalesforceApexHours
Apex Hours
Who am I ?
Jigar Shah
• Active on Salesforce Developer Community
• Blog at https://learnsfdcwithjigar.wordpress.com
• Salesforce Global Community Speaker
• ApexHours Co-organizer
• Follow us @jigarshah189 or @ApexHours
Our Speaker
Manish Choudhari
14x Certified Salesforce Developer, Salesforce.com
Blogger & Author – http://sfdcfacts.com
Youtube – https://youtube.com/SFDCFacts
Follow me @manish_sfdc
#SalesforceApexHours #FarmingtonHillsSFDCDug
Apex Hours
#FarmingtonHillsSFDCdug #SalesforceApexHours
Agenda
• What is Lightning Locker Service?
• Why there is a need for Lightning Locker?
• Why do we say that browsers can be insecure?
• What is malicious JavaScript?
• What is cross-site scripting(XSS)?
• How it impacts your Lightning Components?
• How you can enable/disable Lightning Locker
• Demo
Apex Hours
#FarmingtonHillsSFDCdug #SalesforceApexHours
What is Lightning Locker Service?
Lightning Locker is a layer which sits in between your browser and DOM (document
object).
In other words, Lightning Locker is a virtual browser that allows only secure request to go
through and have access to real DOM.
This virtual browser sits in front of your unsafe real browser.
Apex Hours
#FarmingtonHillsSFDCdug #SalesforceApexHours
Why there is a need for Lightning
Locker?
Apex Hours
#FarmingtonHillsSFDCdug #SalesforceApexHours
Why do we say that browsers can
be insecure?
Your browser is just an application to compile HTML and JavaScript code to generate
web pages. It is medium to interact with the end user.
The JavaScript should be smart enough to tell the difference between a hacker and
genuine user based on their interaction or activity with the webpage.
Apex Hours
#FarmingtonHillsSFDCdug #SalesforceApexHours
What is malicious JavaScript?
JavaScript code has access to your webpage and can perform tasks like getting
cookies information, sending HTTP request to the external server using XHR or getting
user sensitive data stored in forms.
These awesome features can be equally harmful if not being run by an authorized
person.
Apex Hours
#FarmingtonHillsSFDCdug #SalesforceApexHours
What is cross-site scripting(XSS)?
XSS is a malicious JavaScript code injected within a web-page by the end
user (hacker).
This code can perform malicious activity like get browser cookies, getting user’s
sessions info etc.
Apex Hours
#FarmingtonHillsSFDCdug #SalesforceApexHours
Injecting Via Form
In this case, the hacker needs to identify an input element where he can paste his
malicious JavaScript code.
Apex Hours
#FarmingtonHillsSFDCdug #SalesforceApexHours
Injecting Via URL
In this case, the hacker replaces the URL parameters with a malicious JavaScript
code which will be executed by the webpage.
For example: http://sfdcfacts.com?postId=<script>alert('you are hacked');</script>
Apex Hours
#FarmingtonHillsSFDCdug #SalesforceApexHours
How it impacts your Lightning
Components?
Lightning Framework is a component-based framework, where multiple components
are placed together on the same page to give you a combined output. These
components can be:
• Base lightning component (lightning namespace like lightning:button)
• Other out of the box components (like force, ui, aura namespace)
• Custom components (You org’s custom components, generally from “c” namespace)
• Managed/Unmanaged package components
Apex Hours
#FarmingtonHillsSFDCdug #SalesforceApexHours
Security Vulnerabilities
• One component can traverse the DOM of another component. That means my
managed package component can read or traverse the DOM of my Org’s custom
components.
• Components can call private APIs.
• If strict mode is not enabled (without lightning locker), can lead to other security issues.
Apex Hours
#FarmingtonHillsSFDCdug #SalesforceApexHours
Example
Apex Hours
#FarmingtonHillsSFDCdug #SalesforceApexHours
Dom Structure(Without Lightning
Locker)
Apex Hours
#FarmingtonHillsSFDCdug #SalesforceApexHours
Dom Structure(With Lightning
Locker)
Apex Hours
#FarmingtonHillsSFDCdug #SalesforceApexHours
Advantages of Lightning Locker
Services
• A component cannot traverse the DOM of another component if another component belongs to a different
namespace. Example, we cannot read the DOM of lightning base components as they belong to “lightning”
namespace.
• Custom components do not have access to system APIs. Example, the custom component cannot access
$A.eventService API.
• The JavaScript strict mode is enabled by default and need not be specified specifically.
• You cannot have access to external JS libraries without uploading those in the static resource.
• Salesforce authored or Out of the box components will still have unrestricted access to DOM and APIs as these
components will run in System Mode.
Apex Hours
#FarmingtonHillsSFDCdug #SalesforceApexHours
How you can enable/disable
Lightning Locker
How to disable lightning locker?
You can disable lightning locker by changing the api version of lightning component
bundle to 39 or below.
How to enable lightning locker?
Lightning locker is automatically enabled for component bundles having api version 40
or above.
Apex Hours
#FarmingtonHillsSFDCdug #SalesforceApexHours
Demo
Apex Hours
#FarmingtonHillsSFDCdug #SalesforceApexHours
Q&A
Apex Hours
#FarmingtonHillsSFDCdug #SalesforceApexHours
Reference Resources
http://sfdcfacts.com/lightning/why-there-is-a-need-for-lightning-locker-lightning-
locker-services-part-1/
http://sfdcfacts.com/lightning/lightning-locker-explained-with-example-lightning-
locker-services-part-2/
https://youtu.be/UgzQBVEVvfg
Apex Hours
#FarmingtonHillsSFDCdug #SalesforceApexHours
Follow us
#SalesforceApexHours @ApexHours
https://trailblazercommunitygroups.com/farmingto
n-mi-developers-group/
https://www.youtube.com/channel/UChTdRj6Yfw
qhR_WEFepkcJw/videos
https://www.facebook.com/SalesforceApexHours

Weitere ähnliche Inhalte

Was ist angesagt?

Library management system
Library management systemLibrary management system
Library management system
Raaghav Bhatia
 
Introducing Kafka's Streams API
Introducing Kafka's Streams APIIntroducing Kafka's Streams API
Introducing Kafka's Streams API
confluent
 
Security testing presentation
Security testing presentationSecurity testing presentation
Security testing presentation
Confiz
 

Was ist angesagt? (20)

Micro services Architecture
Micro services ArchitectureMicro services Architecture
Micro services Architecture
 
Event Sourcing, Stream Processing and Serverless (Benjamin Stopford, Confluen...
Event Sourcing, Stream Processing and Serverless (Benjamin Stopford, Confluen...Event Sourcing, Stream Processing and Serverless (Benjamin Stopford, Confluen...
Event Sourcing, Stream Processing and Serverless (Benjamin Stopford, Confluen...
 
Test strategy Vs. Test Plan
Test strategy Vs. Test PlanTest strategy Vs. Test Plan
Test strategy Vs. Test Plan
 
Test Plan Template
Test Plan TemplateTest Plan Template
Test Plan Template
 
Library management system
Library management systemLibrary management system
Library management system
 
System Testing.pptx
System Testing.pptxSystem Testing.pptx
System Testing.pptx
 
Test plan
Test planTest plan
Test plan
 
QA Interview Questions With Answers
QA Interview Questions With AnswersQA Interview Questions With Answers
QA Interview Questions With Answers
 
The Security Code Review Guide
The Security Code Review GuideThe Security Code Review Guide
The Security Code Review Guide
 
manual-testing
manual-testingmanual-testing
manual-testing
 
Software design of library circulation system
Software design of  library circulation systemSoftware design of  library circulation system
Software design of library circulation system
 
Unit testing and scaffolding
Unit testing and scaffoldingUnit testing and scaffolding
Unit testing and scaffolding
 
Shop management system
Shop management systemShop management system
Shop management system
 
Introducing Kafka's Streams API
Introducing Kafka's Streams APIIntroducing Kafka's Streams API
Introducing Kafka's Streams API
 
06 template test plan
06 template test plan06 template test plan
06 template test plan
 
04. xss and encoding
04.  xss and encoding04.  xss and encoding
04. xss and encoding
 
Test plan on iit website
Test plan on iit websiteTest plan on iit website
Test plan on iit website
 
Security testing presentation
Security testing presentationSecurity testing presentation
Security testing presentation
 
Streaming with Spring Cloud Stream and Apache Kafka - Soby Chacko
Streaming with Spring Cloud Stream and Apache Kafka - Soby ChackoStreaming with Spring Cloud Stream and Apache Kafka - Soby Chacko
Streaming with Spring Cloud Stream and Apache Kafka - Soby Chacko
 
Toolbox of techniques for Architecture Reviews
Toolbox of techniques for Architecture ReviewsToolbox of techniques for Architecture Reviews
Toolbox of techniques for Architecture Reviews
 

Ähnlich wie Lightning Locker Services

Java scriptwidgetdevelopmentjstanbul2012
Java scriptwidgetdevelopmentjstanbul2012Java scriptwidgetdevelopmentjstanbul2012
Java scriptwidgetdevelopmentjstanbul2012
Volkan Özçelik
 

Ähnlich wie Lightning Locker Services (20)

DEF CON 27 - BEN SADEGHIPOUR - owning the clout through ssrf and pdf generators
DEF CON 27 - BEN SADEGHIPOUR  - owning the clout through ssrf and pdf generatorsDEF CON 27 - BEN SADEGHIPOUR  - owning the clout through ssrf and pdf generators
DEF CON 27 - BEN SADEGHIPOUR - owning the clout through ssrf and pdf generators
 
API SECURITY
API SECURITYAPI SECURITY
API SECURITY
 
Salesforce apex hours PayPal with Salesforce Integration
Salesforce apex hours   PayPal with Salesforce IntegrationSalesforce apex hours   PayPal with Salesforce Integration
Salesforce apex hours PayPal with Salesforce Integration
 
Salesforce apex hours :- azure active directory seamless single sign-on with...
Salesforce apex hours  :- azure active directory seamless single sign-on with...Salesforce apex hours  :- azure active directory seamless single sign-on with...
Salesforce apex hours :- azure active directory seamless single sign-on with...
 
Salesforce apex hours azure active directory seamless single sign-on with s...
Salesforce apex hours   azure active directory seamless single sign-on with s...Salesforce apex hours   azure active directory seamless single sign-on with s...
Salesforce apex hours azure active directory seamless single sign-on with s...
 
Hackazon realistic e-commerce Hack platform
Hackazon realistic e-commerce Hack platformHackazon realistic e-commerce Hack platform
Hackazon realistic e-commerce Hack platform
 
Attacking Web Proxies
Attacking Web ProxiesAttacking Web Proxies
Attacking Web Proxies
 
Ajax
AjaxAjax
Ajax
 
Salesforce Apex Hours: What means Winter 18 for Developers
Salesforce Apex Hours: What means Winter 18 for Developers Salesforce Apex Hours: What means Winter 18 for Developers
Salesforce Apex Hours: What means Winter 18 for Developers
 
#ImpactSalesforceSaturday: Lightning Components 101: An Apex Developer’s Guide
#ImpactSalesforceSaturday: Lightning Components 101: An Apex Developer’s Guide#ImpactSalesforceSaturday: Lightning Components 101: An Apex Developer’s Guide
#ImpactSalesforceSaturday: Lightning Components 101: An Apex Developer’s Guide
 
Detailed Developer Report.pdf
Detailed Developer Report.pdfDetailed Developer Report.pdf
Detailed Developer Report.pdf
 
Big Data Week 2013 Flow
Big Data Week 2013 FlowBig Data Week 2013 Flow
Big Data Week 2013 Flow
 
Force.com security
Force.com securityForce.com security
Force.com security
 
Security and Your Salesforce Org
Security and Your Salesforce OrgSecurity and Your Salesforce Org
Security and Your Salesforce Org
 
Joomla web application development vulnerabilities
Joomla web application development vulnerabilitiesJoomla web application development vulnerabilities
Joomla web application development vulnerabilities
 
Hypermedia: The Missing Element to Building Adaptable Web APIs in Rails
Hypermedia: The Missing Element to Building Adaptable Web APIs in RailsHypermedia: The Missing Element to Building Adaptable Web APIs in Rails
Hypermedia: The Missing Element to Building Adaptable Web APIs in Rails
 
Salesforce Apex Hours :- Introduction to lightning components
Salesforce Apex Hours :- Introduction to lightning componentsSalesforce Apex Hours :- Introduction to lightning components
Salesforce Apex Hours :- Introduction to lightning components
 
Punta Dreamin 17 Generic Apex and Tooling Api
Punta Dreamin 17 Generic Apex and Tooling ApiPunta Dreamin 17 Generic Apex and Tooling Api
Punta Dreamin 17 Generic Apex and Tooling Api
 
Java scriptwidgetdevelopmentjstanbul2012
Java scriptwidgetdevelopmentjstanbul2012Java scriptwidgetdevelopmentjstanbul2012
Java scriptwidgetdevelopmentjstanbul2012
 
Browser Security 101
Browser Security 101 Browser Security 101
Browser Security 101
 

Mehr von Amit Chaudhary

Mehr von Amit Chaudhary (20)

Platform cache
Platform cachePlatform cache
Platform cache
 
Apex code Benchmarking
Apex code BenchmarkingApex code Benchmarking
Apex code Benchmarking
 
Empower admins with the power of salesforce dx, git and cicd pipeline
Empower admins with the power of salesforce dx, git and cicd pipelineEmpower admins with the power of salesforce dx, git and cicd pipeline
Empower admins with the power of salesforce dx, git and cicd pipeline
 
Marketing cloud development
Marketing cloud developmentMarketing cloud development
Marketing cloud development
 
Salesforce Apex Hours : Node red for salesforce
Salesforce Apex Hours : Node red for salesforceSalesforce Apex Hours : Node red for salesforce
Salesforce Apex Hours : Node red for salesforce
 
Modular application development using unlocked packages
Modular application development using unlocked packagesModular application development using unlocked packages
Modular application development using unlocked packages
 
Einstein Next Best Action (NBA)
Einstein Next Best Action (NBA)Einstein Next Best Action (NBA)
Einstein Next Best Action (NBA)
 
Pardot basics
Pardot basicsPardot basics
Pardot basics
 
Lightning web components
Lightning web componentsLightning web components
Lightning web components
 
Lightning web components
Lightning web componentsLightning web components
Lightning web components
 
Salesforce apex hours heroku connect - deep dive
Salesforce apex hours   heroku connect - deep diveSalesforce apex hours   heroku connect - deep dive
Salesforce apex hours heroku connect - deep dive
 
Salesforce DX for Non-Scratch Org
Salesforce DX for Non-Scratch OrgSalesforce DX for Non-Scratch Org
Salesforce DX for Non-Scratch Org
 
Einstein Analytics Part 2
Einstein Analytics Part 2Einstein Analytics Part 2
Einstein Analytics Part 2
 
Einstein Analytics
Einstein Analytics Einstein Analytics
Einstein Analytics
 
Demystifying the salesforce reports api
Demystifying the salesforce reports apiDemystifying the salesforce reports api
Demystifying the salesforce reports api
 
Salesforce apex hours Einstein platform services
Salesforce apex hours   Einstein platform servicesSalesforce apex hours   Einstein platform services
Salesforce apex hours Einstein platform services
 
Salesforce Apex Hours : How Lightning Platform Query Optimizer works for LDV
Salesforce Apex Hours : How Lightning Platform Query Optimizer works for LDVSalesforce Apex Hours : How Lightning Platform Query Optimizer works for LDV
Salesforce Apex Hours : How Lightning Platform Query Optimizer works for LDV
 
Einstein bots
Einstein botsEinstein bots
Einstein bots
 
Integrating with salesforce using platform events
Integrating with salesforce using platform eventsIntegrating with salesforce using platform events
Integrating with salesforce using platform events
 
Einstein analytics basics
Einstein analytics basicsEinstein analytics basics
Einstein analytics basics
 

Kürzlich hochgeladen

Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
Chris Hunter
 

Kürzlich hochgeladen (20)

ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 

Lightning Locker Services