Code Monkey home page Code Monkey logo

cmpg-323-overview---35803150's People

Contributors

suksesnwu avatar

Watchers

 avatar

cmpg-323-overview---35803150's Issues

CMPG323 Class(contact) - 23/08

API Development - Security

Project 2 - secure your API

5. REST security fundamental

HTTP( Basic Web Security )

1. Basic Authentication

  • Internet standard
  • Supported by all major browsers

2. Digest Authentication

-The password is not sent clear to the server.

  • application of **MD5 cryptographic hashing with usage of nonce values to prevent replay attacks. **
  • Nonce -

3. Configured on the IIS web server (platform dependent)

  • Can be both used by REST and SOAP
  • Provides point-to-point security between the two endpoints.

HTTPS( Transport Security )

REST security cheat sheet [1]

  • Mutually authenticated client-side certificates

  • https://cheatsheetseries.owasp.org/cheatsheets/REST_Security_Cheat_Sheet.html

  • Non-public REST services must perform access control at each API endpoint

  • User authentication should be centralized in a Identity Provider(IdP)

  • JSON Web Tokens (JWT)

    as the format for security tokens

    • JWT are JSON data structures containing a set of claims that can be used for access control decisions.
  • API Keys

    • Public REST services without access control run the risk of being farmed leading to excessive bills for bandwidth or compute cycles
    • API keys can reduce the impact of denial-of-service attacks.
  • Restrict HTTP methods

    • Apply an allow list of permitted HTTP Methods e.g. GET, POST, PUT
    • Reject all requests not matching the allow list with HTTP response code 405 Method not allowed.
    • Make sure the caller is authorized to use the incoming HTTP method on the resource collection, action, and record

Session Management and Authentication

  • OAuth2
  • OpenID (federated authentication) - one entity trusts another entity with user management.
  • An ID token's password

Resources list

[1] - https://cheatsheetseries.owasp.org/cheatsheets/REST_Security_Cheat_Sheet.html
[2]

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.