Git Product home page Git Product logo

copenhagen's Introduction

The Copenhagen Book

thecopenhagenbook.com

The Copenhagen Book provides a general guideline on implementing auth in web applications. It is free, open source, and community maintained. It may be opinionated or incomplete at times but we hope this fills a certain void in online resources. We recommend using this alongside the OWASP Cheat Sheet Series.

If you have any suggestions or concerns, consider opening a new issue.

copenhagen's People

Contributors

pilcrowonpaper avatar glazy avatar lgraubner avatar franciscop avatar idopesok avatar infomiho avatar nateemerson avatar pyqlsa avatar

Stargazers

EL Ardi Anas avatar Abdellatif Ahammad avatar  avatar Rafal Hofman avatar herb avatar Evgeni Atanasov avatar Vincent Shury avatar Chance Barkley avatar Ayoub Ennabili avatar Mohamed El Mahdali avatar Ismail Ghallou  avatar Wojciech Stańczuk avatar Lyong avatar suzuki avatar Iivari Leinonen avatar Ângelo Tadeucci avatar Spencer McKenney avatar Maik Kowol avatar Huynh Duc Duy avatar Bahlul Hasanli avatar BABA avatar Nutchanon Taechasuk avatar Travis Bredehoft avatar Lucas Kruger avatar Manabu Niseki avatar Chingiz Mammadov avatar Keziah avatar  avatar Mathis Dousse avatar  avatar Derek avatar Kexi Dang avatar Eduardo San Martin Morote avatar Alexey Golyshev avatar CHOO XIANG LUN avatar Sean avatar  avatar  avatar Pablo Maffioli avatar Martin Sjåstad avatar Son Tran avatar Oladele Olorunsola avatar Cactus avatar  avatar M̴̧̡̡̢͎̬͖̬̠̭̱̝̩̪̝̠͎͈̪̰͕͓̼̻͎̮̜̫̬͍̱̭̠̟̖͉͈̺͙͉͒́͂̾̅̚̚͜͜͜Ę̷̡̡̧̨͎͕̟̪̰͍̬̮̥̝̖̯͕̳̳̜̭͖̯͙̜̰̤̼̠̼̪̝̐̔̍̋͜͝R̶̘̹̠̻̺̟̞̦͗̓̓̐̄̀͊̏̔͂͑̉͆͘̕͝T̴̢̨̛̩̮̖̺̱͙̳̪̠̼͐͌̇̀̓́͂̎̔͗͂̄̈́̆́̏̉̀͑͗͐̈́̋̇͌̿̅͒̓͒͒̂͋͘͝͝ avatar  avatar Achraf Kamel avatar Dominic Bachmann avatar Timofey Dergachev avatar Pierre Murillo avatar Abdo Omar avatar Alexey avatar Obaid Qatan avatar Khaya avatar Amr Tamer avatar Ahmed Elsakaan avatar ⊣˚∆˚⊢ avatar mateo arteaga avatar Dmytro Pushkarchuk avatar Radoslav avatar  avatar Manzoor Wahid avatar Dejan Toteff avatar Abhijit avatar Tiago Duarte avatar Lewis Davidson avatar Ronny Vedå avatar  avatar Joe O'Meara avatar  avatar Asil Barkın E avatar Yanis ABBAS avatar Hussam Alkhafaji  avatar Michael Ansel avatar Kyle Sullivan avatar Ståle Pettersen avatar Marco avatar Claes Nymand Nilsson avatar Jonathan Strong avatar Rich Angeletti avatar Roney Stein avatar Ivan Malopinsky avatar  avatar Joel Valiente avatar Vladyslav Dukhin avatar Iain Funnell (yowie) avatar Owando avatar  avatar  avatar David avatar Nicolas RUFF avatar Ferdy Tarawan avatar Ahmada Yusril avatar Oleksandr Sh. avatar Daichi Harada avatar Kris Webber avatar Greg Broiles avatar John Bridges avatar Michael Staub avatar Gary Fuller avatar

Watchers

⊣˚∆˚⊢ avatar Daniel Weck avatar  avatar Carl Vitullo avatar  avatar  avatar Ravi Kumar avatar  avatar sommeeeR avatar John Bridges avatar

copenhagen's Issues

Guide: SAML

Unfortunately I've never implemented SAML before

Extra information around SameSite cookies and CSRF

The "Sessions" guide contains the following:

CSRF protection must be implemented when using cookies, and using the SameSite flag is not sufficient.

This is somewhat true, but there is some additional nuance here.

My understanding is that SameSite=Lax (or Strict) is sufficient CSRF protection if the following conditions are met:

  • The user's browser supports it. Global support is currently ~96%
  • GET requests aren't used to mutate data on the server.
  • The website/application doesn't surface user-generated content (such as the ability to post links, forms, etc).

As with anything related to auth, there are plenty of edge-cases (as listed above) but generally I think SameSite=Lax or SameSite=Strict could be recommended as a sufficient method of CSRF protection in certain circumstances.

Interested to hear your thoughts and, if you agree, I'm happy to modify the "SameSite cookie attribute" section of the "CSRF" guide to include this info.

Consider Inference Opportunities

In various journeys of an applications functions it's possible to infer the presence of a identity such as

New user sign up is provided an email that is checked 'that account already exists' <-- this is a point of enumeration
Forgotten Password is often a point of enumeration too altho often a little noisier <-- user doesn't exist versus email sent
Login page also a point of enumeration <-- user does not exist versus incorrect password

Areas like these should either send to the user's provided email address actions to authenticated such as how Spotify's magic link works or send an email suggesting someone has attempted to sign up using this email address if the account doesn't exist yet

where an application cannot do this, it must be aware of the enumeration and scraping potential

Does this make sense ?

I can put something in long form if needed, but in principle, how are re defending from scraping and inference based learning for unauthenticated visitors

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.