DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  1. DZone
  2. Data Engineering
  3. Databases
  4. Effective API Security: 6 Keys to Keeping a Lock Down

Effective API Security: 6 Keys to Keeping a Lock Down

While APIs enable users to do a lot of really great things on the web, they also give hackers a great route for getting into your data.

Ross Garrett user avatar by
Ross Garrett
·
Mar. 17, 17 · Opinion
Like (4)
Save
Tweet
Share
2.68K Views

Join the DZone community and get the full member experience.

Join For Free

APIs are certified “cool” - they provide access to data and services otherwise locked behind corporate firewalls, they enable easy development of web and mobile products, and they allow organizations to do business in new ways. But this strategic opportunity opens up vulnerabilities, and APIs are becoming the primary attack vector for unscrupulous individuals, organizations - even governments!

Image title

Security then must be a leading concern - all API stakeholders (developers, architects, operations, and the business) must play a role in deploying a security model that both enables and protects. I’ve put together a list of guiding principles your API projects should follow.

6 Keys

  1. Don't Put Security Last: Security is often relegated to the last design consideration - deciding how to deal with authentication and access control. But a robust security model must also consider your overall application architecture and find all layers where threats and vulnerabilities may exist. It’s also important to think about reusability in your security architecture, making it easy for developers to leverage standardized mechanisms at each application tier.
  2. Leverage Existing Standards: As I mentioned in #1, basic access control is actually pretty simple. Users and clients request access to objects like data, applications, and services - your access controls then make a decision to grant or deny that request. Today, user management is a mature space and most organizations have a central user directory. Object management must reach this same maturity, enabling better controls and improved granularity across your APIs and data models. Leverage existing standards (E.g. OAuth 2.0) to grant granular access to services.
  3. It's Not Always Keeping the Bad Guys Out: You might think that security architectures are focused on keeping the bad guys out, but in fact most often the inverse is true. Access control infrastructure is designed to provide a user experience to authorized entities - employees, customers, etc. It’s important to design for malice - assume that those who try to gain unauthorized access are in fact not “playing by the rules,” instead of finding ways to work around the areas governed by policy.
  4. Keep it Balanced: Users simply don’t care about or understand security - they just want easy access and peace of mind that their data is secure. Unfortunately, for a long time security measures and technologies have delegated far too much responsibility to the end user, expecting them to make educated and technical decisions. How often have you been asked “Do you trust this certificate?” in a web browser? It’s not practical to assume users have the technical knowledge to understand PKI - so how is it reasonable to push this responsibility to them? API security should be designed in such a way to balance user experience and security.
  5. Arm the Developers: Developer experience is just as important as user experience, and here again knowledge around security can be dangerously lacking. Your API consumers can’t be expected to know, and your APIs can unwittingly create vulnerabilities by not arming developers with sufficient knowledge. For example, a developer may hit an API too many times and degrade performance. Or a developer may not know why or how to protect API and session keys. These can result in Denial of Service, and other security issues.
  6. Protect All Patterns: Finally, API integration patterns are evolving, and while request/response still makes up the lion’s share of implementations today, there are other models that need to be secured as well. With an increasing preference for Webhooks, Server-Sent Events, and WebSockets, the client-server designation is becoming blurred. Signatures and encryption (e.g. TLS) should be considered to help protect these bi-directional integration patterns. Here's an example of Cloud Elements Event Management Security.

Hopefully, this list helps at least shed some light on the issues you may encounter, and provide some guidance and best practice for specific use cases. API Security may not be a glamorous topic, and you won’t get much glory if you do everything right. But then again, nobody wants to make headlines for their failures!

API security

Published at DZone with permission of Ross Garrett, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • The Enterprise, the Database, the Problem, and the Solution
  • AWS Fargate: Deploying Jakarta EE Applications on Serverless Infrastructures
  • AIOps Being Powered by Robotic Data Automation
  • How to Cut the Release Inspection Time From 4 Days to 4 Hours

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: