×
1 Choose EITC/EITCA Certificates
2 Learn and take online exams
3 Get your IT skills certified

Confirm your IT skills and competencies under the European IT Certification framework from anywhere in the world fully online.

EITCA Academy

Digital skills attestation standard by the European IT Certification Institute aiming to support Digital Society development

SIGN IN YOUR ACCOUNT TO HAVE ACCESS TO DIFFERENT FEATURES

CREATE AN ACCOUNT FORGOT YOUR PASSWORD?

FORGOT YOUR DETAILS?

AAH, WAIT, I REMEMBER NOW!

CREATE ACCOUNT

ALREADY HAVE AN ACCOUNT?
EUROPEAN INFORMATION TECHNOLOGIES CERTIFICATION ACADEMY - ATTESTING YOUR PROFESSIONAL DIGITAL SKILLS
  • SIGN UP
  • LOGIN
  • SUPPORT

EITCA Academy

EITCA Academy

The European Information Technologies Certification Institute - EITCI ASBL

Certification Provider

EITCI Institute ASBL

Brussels, European Union

Governing European IT Certification (EITC) framework in support of the IT professionalism and Digital Society

  • CERTIFICATES
    • EITCA ACADEMIES
      • EITCA ACADEMIES CATALOGUE<
      • EITCA/CG COMPUTER GRAPHICS
      • EITCA/IS INFORMATION SECURITY
      • EITCA/BI BUSINESS INFORMATION
      • EITCA/KC KEY COMPETENCIES
      • EITCA/EG E-GOVERNMENT
      • EITCA/WD WEB DEVELOPMENT
      • EITCA/AI ARTIFICIAL INTELLIGENCE
    • EITC CERTIFICATES
      • EITC CERTIFICATES CATALOGUE<
      • COMPUTER GRAPHICS CERTIFICATES
      • WEB DESIGN CERTIFICATES
      • 3D DESIGN CERTIFICATES
      • OFFICE IT CERTIFICATES
      • BITCOIN BLOCKCHAIN CERTIFICATE
      • WORDPRESS CERTIFICATE
      • CLOUD PLATFORM CERTIFICATENEW
    • EITC CERTIFICATES
      • INTERNET CERTIFICATES
      • CRYPTOGRAPHY CERTIFICATES
      • BUSINESS IT CERTIFICATES
      • TELEWORK CERTIFICATES
      • PROGRAMMING CERTIFICATES
      • DIGITAL PORTRAIT CERTIFICATE
      • WEB DEVELOPMENT CERTIFICATES
      • DEEP LEARNING CERTIFICATESNEW
    • CERTIFICATES FOR
      • EU PUBLIC ADMINISTRATION
      • TEACHERS AND EDUCATORS
      • IT SECURITY PROFESSIONALS
      • GRAPHICS DESIGNERS & ARTISTS
      • BUSINESSMEN AND MANAGERS
      • BLOCKCHAIN DEVELOPERS
      • WEB DEVELOPERS
      • CLOUD AI EXPERTSNEW
  • FEATURED
  • SUBSIDY
  • HOW IT WORKS
  •   IT ID
  • ABOUT
  • CONTACT
  • MY ORDER
    Your current order is empty.
EITCIINSTITUTE
CERTIFIED

What are the three settings that control the behavior of cookies in relation to the Same Origin Policy?

by EITCA Academy / Saturday, 05 August 2023 / Published in Cybersecurity, EITC/IS/WASF Web Applications Security Fundamentals, Same Origin Policy, Cross-Site Request Forgery, Examination review

The Same Origin Policy (SOP) is a fundamental security principle in web applications that restricts the interaction between different origins to prevent cross-site scripting attacks and protect user data. Cookies, which are small pieces of data stored by websites on a user's browser, are subject to the SOP. To control the behavior of cookies in relation to the SOP, there are three settings that can be used: SameSite, Secure, and HttpOnly.

1. SameSite: The SameSite attribute determines whether a cookie should be sent in cross-site requests. It has three possible values: "Strict", "Lax", and "None". When set to "Strict", the cookie is only sent in requests originating from the same site. This means that the cookie will not be included in cross-site requests, such as when a user clicks on a link from one site to another. For example, if a user is on "https://example.com" and clicks on a link to "https://example2.com", the cookies associated with "example.com" will not be sent to "example2.com".

When set to "Lax", the cookie is sent in cross-site requests, but only for "safe" HTTP methods, such as GET. This provides some flexibility for certain scenarios, such as allowing cookies to be sent when a user navigates to a different site by clicking on a link, but not when the request is triggered by a third-party resource, such as an image or script.

When set to "None", the cookie is sent in all cross-site requests, regardless of the HTTP method. This is the least restrictive option and should be used with caution, as it may introduce security risks if not properly implemented. To mitigate these risks, the "Secure" attribute should also be set.

2. Secure: The Secure attribute indicates that a cookie should only be sent over a secure HTTPS connection. When this attribute is set, the cookie will not be transmitted over unencrypted HTTP connections. This helps protect the confidentiality and integrity of the cookie data by ensuring that it is only sent over encrypted channels. For example, a cookie with the Secure attribute set will not be sent if a user visits a website using an insecure HTTP connection, such as "http://example.com".

3. HttpOnly: The HttpOnly attribute prevents client-side scripts, such as JavaScript, from accessing the cookie. This is an important security measure to protect against cross-site scripting (XSS) attacks. By setting the HttpOnly attribute, the cookie is only accessible by the server, making it more difficult for an attacker to steal sensitive information, such as session tokens, through malicious scripts injected into web pages.

The three settings that control the behavior of cookies in relation to the Same Origin Policy are SameSite, Secure, and HttpOnly. The SameSite attribute determines whether a cookie should be sent in cross-site requests, the Secure attribute ensures that the cookie is only sent over secure HTTPS connections, and the HttpOnly attribute prevents client-side scripts from accessing the cookie.

Other recent questions and answers regarding Cross-Site Request Forgery:

  • What potential workarounds exist to bypass the Same Origin Policy, and why are they not recommended?
  • How does the Same Origin Policy opt-in mechanism work for cross-origin communication?
  • What are the drawbacks of using the "document.domain" API to bypass the Same Origin Policy?
  • What is the purpose of the Cross-Origin Resource Sharing (CORS) API in enforcing the Same Origin Policy?
  • How does the Same Origin Policy restrict interactions between different origins in web applications?
  • How does the Same Origin Policy protect against Cross-Site Request Forgery (CSRF) attacks?
  • What scenarios does the Same Origin Policy allow and deny in terms of website interactions?
  • Explain the role of security headers in enforcing the Same Origin Policy.
  • How does the Same Origin Policy restrict the access of cookies in web pages?
  • How does the "lax" setting for cookies strike a balance between security and usability in web applications?

View more questions and answers in Cross-Site Request Forgery

More questions and answers:

  • Field: Cybersecurity
  • Programme: EITC/IS/WASF Web Applications Security Fundamentals (go to the certification programme)
  • Lesson: Same Origin Policy (go to related lesson)
  • Topic: Cross-Site Request Forgery (go to related topic)
  • Examination review
Tagged under: Cross-site Scripting (XSS) Attacks, Cybersecurity, HttpOnly Attribute, SameSite, Secure Attribute, Session Tokens
Home » Cross-Site Request Forgery / Cybersecurity / EITC/IS/WASF Web Applications Security Fundamentals / Examination review / Same Origin Policy » What are the three settings that control the behavior of cookies in relation to the Same Origin Policy?

Certification Center

USER MENU

  • My Account

CERTIFICATE CATEGORY

  • EITC Certification (106)
  • EITCA Certification (9)

What are you looking for?

  • Introduction
  • How it works?
  • EITCA Academies
  • EITCI DSJC Subsidy
  • Full EITC catalogue
  • Your order
  • Featured
  •   IT ID
  • EITCA reviews (Reddit publ.)
  • About
  • Contact
  • Cookie Policy (EU)

EITCA Academy is a part of the European IT Certification framework

The European IT Certification framework has been established in 2008 as a Europe based and vendor independent standard in widely accessible online certification of digital skills and competencies in many areas of professional digital specializations. The EITC framework is governed by the European IT Certification Institute (EITCI), a non-profit certification authority supporting information society growth and bridging the digital skills gap in the EU.

    EITCA Academy Secretary Office

    European IT Certification Institute ASBL
    Brussels, Belgium, European Union

    EITC / EITCA Certification Framework Operator
    Governing European IT Certification Standard
    Access contact form or call +32 25887351

    Follow EITCI on Twitter
    Visit EITCA Academy on Facebook
    Engage with EITCA Academy on LinkedIn
    Check out EITCI and EITCA videos on YouTube

    Funded by the European Union

    Funded by the European Regional Development Fund (ERDF) and the European Social Fund (ESF), governed by the EITCI Institute since 2008

    Information Security Policy | DSRRM and GDPR Policy | Data Protection Policy | Record of Processing Activities | HSE Policy | Anti-Corruption Policy | Modern Slavery Policy

    Automatically translate to your language

    Terms and Conditions | Privacy Policy
    Follow @EITCI
    EITCA Academy

    Your browser doesn't support the HTML5 CANVAS tag.

    • Cybersecurity
    • Quantum Information
    • Artificial Intelligence
    • Cloud Computing
    • Web Development
    • GET SOCIAL
    EITCA Academy


    © 2008-2026  European IT Certification Institute
    Brussels, Belgium, European Union

    TOP
    CHAT WITH SUPPORT
    Do you have any questions?
    We will reply here and by email. Your conversation is tracked with a support token.