Posts

Showing posts with the label security

Designing Useful APIs: Best Practices for Naming, Idempotency, Pagination, Filtering, Versioning & Security

Image
Best Practices in API Design (A Practical Guide) APIs are the connective tissue of modern software. A  useful  API is predictable, consistent, and safe to evolve. Below is a concise, hands-on guide—mirroring the structure in the image—covering eight fundamentals with patterns, anti-patterns, and snippets you can drop into your docs. 1) Use Clear Naming Principles Nouns, not verbs  for resources:  /products ,  /orders/123 ,  /users/42 . Plural collections ; singular items:  /products  (list/create),  /products/{id}  (read/update/delete). Use subresources for relationships/actions : Relationship:  /orders/123/items Domain actions (state changes) as subpaths:  /orders/123/cancel ,  /users/42/verify Consistent casing  (kebab-case or snake_case) and predictable errors. Do POST /api/v1/products GET /api/v1/products?category=shoes PATCH /api/v1/products/123 DELETE /api/v1/products/123 Don’t /createNewProduct /getProduc...

SSH Security Configuration for Servers

Image
Introduction Secure Shell (SSH) is a crucial component for remote access to Server Instance, and its configuration should be optimized to ensure the highest level of security. Given the role SSH plays in facilitating secure communication and access to servers, it is strongly recommended to implement robust security measures to protect sensitive data and prevent unauthorized access to these Servers. The current configuration enforces the following security measures: Dedicated terminal-user Root login is disabled Host-based authentication is disabled Empty passwords are disabled Public-Key Authentication is enabled Max-auth attempts is set to 5 Idle-Timeout is set to 5 minutes X11 Forwarding is disabled Port Forwarding is disabled Max concurrent sessions is set to 5 Log level is set to verbose (audit trail) Warning banner is set to scare-of threat-actors First Steps Before applying the config file mentioned below, make sure to take the foll...