Overview

2 Standards for implementing authentication

This chapter frames authentication and secret management as foundational pillars of application security alongside secure transport and hardened runtime environments. It urges teams to stop handling passwords and identity logic inside each app and instead rely on standards-driven Single Sign-On (SSO) and modern, phishing-resistant authenticators. For developers, the core toolbox is OAuth2, OpenID Connect, and WebAuthn, supported by robust libraries across languages, and underpinned by essentials like TLS, JOSE, X.509, and PKI. The overarching message is to centralize trust, reduce custom security code, and raise both security and usability by adopting proven protocols and services.

On user authentication, the guidance spans customers, employees, and partners. For customers, minimize friction while maintaining strong security by supporting social login via OpenID Connect/OAuth2, passwordless biometrics and security keys with WebAuthn, and a multifactor username/password fallback when needed—ideally all fronted by an SSO. For employees, consolidate access to internal apps, SaaS tools, and admin surfaces behind a corporate SSO tied to the directory; prefer OpenID Connect and use protocol bridges if only SAML/LDAP are available. For partners, compare issuing local accounts (simple but risky) versus federating to the partner’s SSO (preferred for clean provisioning and revocation). Because phishing remains a top threat, the chapter highlights WebAuthn and physical security keys that bind authentication to the legitimate site origin, thwarting credential theft.

On securing application credentials, the chapter warns against storing secrets in configuration files due to configuration drift, weak file-level protections, poor auditability, and difficult rotation. It recommends a centralized credential service or vault as the single source of truth to streamline updates and rotation, provide detailed audit logs, and leverage hardware-backed protections. Teams can choose a cloud provider’s key vault, platform-native secrets, or a self-hosted solution, but should avoid building their own. Since no universal API exists for secret stores, applications use provider-specific clients and must solve bootstrap trust—ideally with platform-based identity like SPIFFE. The best practices are clear: externalize authentication to a maintained SSO, adopt WebAuthn for phishing resistance, store all secrets in a credential service, and keep these foundations patched and up to date.

An authentication form, commonly referred to as a login form, serves as the primary interface through which users enter their credentials to authenticate and gain access to the system.
Customer authentication preferences. Some customers want to use biometric authentication features, such as fingerprint scanners and face recognition, on their devices and phones. Some customers want to be able to login using their existing accounts with large online service providers such as Google, and Facebook. Some users want to be able to login using a traditional username and password combination. Single Sign On services can accommodate all these types of authentication preferences and more.
Single Sign On (SSO) Service handles user account creation and authentication. Multiple applications can use the same SSO service, simplifying security for application developers. The SSO service implements support authentication using OAuth2, OpenID Connect, WebAuthn, and multi-factor password-based authentication.
A corporate Sigle Sign On (SSO) service makes it possible for employees to access customer facing apps, internal employee only apps, and external SaaS apps using a single set of credentials
A user has to insert the Yubikey in their laptop, then press the button when on the login screen for a an application that support a physical security key. The Yubikey will check that the URL of the site the user is trying to log into matches the URL stored inside the Yubikey. If the URLs don’t match the login will fail. A Yubikey can protect against phishing attacks such as the one described in the text above.
Externalize application authentication into an SSO service that applications can access using OpenID Connect and WebAuthn. If you know OpenID Connect and WebAuthn, you can use all modern SSO services.
Applications depend on internal and external services that require passwords and API keys. The credentials to access services are extremely sensitive and must be protected. How can an application store and access sensitive credentials it needs to operate?
A credential vault is a centralized store of all sensitive configuration values, such as passwords, API keys, digital certificates, and other secrets the application needs to access at runtime.
A credential management service and a single sign on service are two foundational components for cloud native application security. As a developer you can use the OpenID Connect and WebAuthn protocols to interact with all modern SSO services. However, for credential services there is no industry standard API so you will have to use a proprietary API provided by the credential service implementation.

Summary

  • Passwords are weak, reused across services, and expensive to store securely, making them poor for both security and user experience.
  • Externalizing authentication to SSO services improves security, reduces development effort, and provides better user experience across multiple applications.
  • Modern applications should support OAuth2/OpenID Connect for social login, WebAuthn for biometric authentication, and multifactor password authentication as fallback.
  • Corporate SSO services enable employees to access internal applications, external SaaS services, and customer-facing apps using unified Active Directory credentials.
  • Organizations can either provide partner employees with internal accounts or delegate authentication to the partner's own SSO service for better security.
  • Physical security keys using WebAuthn protocol protect against phishing attacks by validating website URLs before authentication.
  • OAuth2, OpenID Connect, and WebAuthn are the essential authentication protocols developers need to master for modern applications.
  • Applications should store sensitive credentials like API keys and passwords in centralized credential services rather than configuration files.
  • Credential services provide single source of truth, easy updates, simplified rotation, comprehensive audit logs, and hardware security module support.
  • No industry standard exists for credential service APIs, requiring use of provider-specific APIs and libraries.
  • Information security engineers choose and configure SSO services, while developers implement OpenID Connect and WebAuthn integration in applications.

FAQ

Why are passwords a poor choice for security and user experience?They’re hard to remember, so users pick weak ones or reuse them across sites, and securely storing them server-side is complex and costly. A breach or storage mistake can compromise many accounts at once.
Which open standards should I know for modern authentication?OpenID Connect (OIDC) for delegating login to an SSO and getting identity tokens, OAuth 2.0 as the authorization foundation, and WebAuthn for passwordless, phishing-resistant authentication with biometrics and security keys.
What is OpenID Connect used for in applications?OIDC lets apps offload login to an external Identity Provider/SSO and receive standardized ID tokens about the user. It simplifies integrating both customer- and employee-facing apps with a single, widely supported protocol.
How does WebAuthn enable passwordless login?WebAuthn lets users authenticate with device biometrics (face/fingerprint) or FIDO2 security keys. It’s supported by major browsers and mobile/desktop OSes, providing strong, phishing-resistant authentication.
How can I offer customers their preferred login method?Use an SSO that supports multiple options: social login via OAuth2/OIDC, passwordless biometrics via WebAuthn (passkeys/security keys), and password-based login with optional MFA (authenticator apps or SMS as a fallback).
What’s the recommended approach for employee authentication with Active Directory?Integrate apps with the corporate SSO using OIDC. If the SSO only supports legacy protocols (e.g., SAML/LDAP), use an OIDC-to-SAML bridge so apps speak OIDC while the SSO continues using existing enterprise standards.
How should I let partners access internal systems securely?Prefer federation: configure your SSO to trust the partner’s SSO so their employees authenticate with their own accounts. This ensures immediate deprovisioning when access is revoked at the partner.
What is phishing-resistant authentication and how do I enable it?It prevents credential theft on fake sites. Enable FIDO2/WebAuthn security keys or platform passkeys, which verify the site’s origin (RP ID) before authenticating, blocking most phishing attempts.
Should every application use an SSO service, and what are my options?Yes—SSO centralizes and hardens authentication while simplifying development. Options include managed cloud SSO, self-hosted products (open source or commercial), and building your own only when truly necessary; keep whatever you choose patched and up to date.
What should developers learn beyond OIDC and WebAuthn?Master the surrounding foundations: TLS, JOSE (JWT/JWS/JWE), X.509 certificates, and PKI. Then use high-quality language frameworks (e.g., Spring Security) to integrate cleanly with your SSO.

pro $24.99 per month

  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose one free eBook per month to keep
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime

lite $19.99 per month

  • access to all Manning books, including MEAPs!

team

5, 10 or 20 seats+ for your team - learn more


choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Software Security for Developers ebook for free
choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Software Security for Developers ebook for free