Security - raisercostin/software-wiki GitHub Wiki

Client vs Server Security

  • Client code and calls from clients are inherently unsecure: the client medium is not under control and can be manipulated by a bad actor: influence vm, influence browser sandbox, influence memory, influence javascript, influence assembler, intercept and change calls, change https content. The client endpoint is in total control of the client.
    • Conclusion: you must always have validation server side.
    • Corolar: client side validation is for UX purpose (faster to provide feedback) and is optional.
    • When you add client validation you start to break the DRY principle: there is always an already implemented validation algorithm on the server.
    • DRY is also potential broken by a second client.

Credentials

Tokens

Tokens are a temporary proof that you are authorized to do an action. Usually is generated by a server as a final response to a more complicated authentication process. There are several types of tokens: Bearer Token, Refresh Token, API Token depending on how they are generated, used.

PINs

Patterns

Password Rules

Biometrics

Same Origin Policy

The same-origin policy generally prevents one origin from reading arbitrary network resources from another origin

CORS - Cross-Origin Resource Sharing

CORB - Cross-Origin Read Blocking