An OIDC authorization server building blocks with security and privacy by design philosophy.
This will not provide a full-featured standalone OIDC Server but a limited and secure settings according to your use cases :
online usersusingauthorization_codeflow with mandatory PKCE via Pushed Authorization Request with state enforcement;machine-to-machineusingclient_credentialsbased on asymetric authentication schemes;devices and constrained environments, you know for IO(v)T (Internet Of vulnerable Thing);offline usersusingrefresh_tokenflow for application that need toact as an online user but without its online interaction.impersonation / delegationusingtoken_exchangeflow fro resource server who wants to access authenticated external resource on behalf of the subject with a restricted resource level privilege set.
I have been developing OAuth/OIDC/UMA providers since 2012, in multiple
languages and environments. People generally don't understand OIDC flows.
It's like driving a car that requires you to know how engine work and how the car is built. But the only thing you want is to drive your car.
OAuth / OIDC is often criticized in favor of SAML, but implementations are more vulnerables than the protocol itself. OAuth is just offered as a developer framework, but it's true to say that not all developers are aware of security problems.
Implementations are done by developers that don't have/take the time to browse the specification maze, they read them quickly with their own belief in mind. As a consequence the specifications are not understood but barely interpreted, that will produce faulty implementations.
Also security products are often associated with NIH syndrom.
What I observed in real life:
- Not using
authorization_codebecause it doesn't have user/password in the flow; client_credentialsgrant type to be used ascustomer credentialslikepasswordgrant type but for external customer user access (login form with client credentials);- Using
client_credentialsfrom a JS public UI (hardcoded client_secret); - Dynamic authorization application based on token claims without signature checks;
- Authentication based on the fact the you can retrieve the token ... not validating token content (Token is here => You are admin);
Many OIDC providers give you a lot of features that you have to understand and choose to maximize your security posture. So that your security posture is correlated to your understanding of OAuth and OIDC and their implementations in the product.
I don't like this idea to be honest.
I understand the requirements of commercial products to have a wide compatibility
matrix, but by allowing insecure settings for one client you can compromise the
the whole platform, and also lose the customer inside the feature fog.
But OAuth / OIDC specification are only tools in a toolbox, and they need to be orchestrated in a proper way to provide a simple, efficient and secure service.
That's the reason why I've started this project as an OSS project, to provide a simple and solid implementations of 4 OAuth flows.
- Enforce OIDC features as a complete suite according to selected use-case;
- Provide a complete toolchain to enforce security and privacy without the complete knowledge of all related protocols;
- Enhance security posture based on security objectives not the understand of security protocols;
- Provide a battle-tested framework;
- Provide a wire protocol decoupled framework, OIDC is tighly coupled to HTTP but it can be easily decoupled to become portable between other wire protocols (CoAP);
- A complete OIDC compliant server. By making some optional and recommended
parameters as required,
solidcan't pass the OIDC compliance tests;
I made sample server and various integrations inside examples/ folder.
PAR+DPoP+JARMis enabled and enforced forauthorization_codeflow;hybridflow is not and will be supported; Web applications must use server side component (or lambda) to negociate authorizations; By design, your client-side application code (JS) should not be exposed until you are identified;- Only response_type
codewill be supported to enforce server-side negociation; PKCE+Nonceis enforced by default for all client types duringauthorization_codeflow;authorization_codeflow could not be started by theuser-agent, as the default behavior, theclientmust use PAR protocol to retrieve arequest_urithat will qualify and start theauthorization_codeflow;- Asymetric authentication methods are enforced by default;
- No
HSxxx/RSxxxsupport as JOSE signature algorithms;HSxxxdoesn't provide digital signature;RSxxxuses RSA algorithms that needs to have high computation to improve security protection level so that it will be more difficult for constrained environment (IoT) to have same security protection level as a normal application;- Only
elliptical curvesinvolved algorithms will be used;
access_token/refresh_tokenarehybridtokens so that they embed protocol validation details (expiration, etc.) without any privacy related info (sub). These informations are referenced via an embededjticlaim that will address an AS-only accessbile record that will contains extra data;audienceparameter is mandatory for request that needscopein order to target the corresponding application. This will allow various validations betweenclientandapplication, andconsentmanagement;PARmust use JWT encoded request payload to due request registration.
- OAuth Core
- OAuth Extensions
- Discovery
- Identity authentication
- Client authentication
- Asymmetric authentication
- RFC7523 - JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grants
- RFC7521 - Assertion Framework for OAuth 2.0 Client Authentication and Authorization Grants
-
private_key_jwt- https://oauth.net/private-key-jwt/ -
attest_jwt_client_auth- OAuth 2.0 Attestation-Based Client Authentication -
tls_client_auth- RFC8705 - OAuth 2.0 Mutual-TLS Client Authentication and Certificate-Bound Access Tokens
- Asymmetric authentication
- Grant Types
-
client_credentialsgrant type -
authorization_codegrant type- RFC7636 - Proof Key for Code Exchange by OAuth Public Clients - https://oauth.net/2/pkce/
- RFC9126 - OAuth 2.0 Pushed Authorization Requests (PAR) - https://oauth.net/2/pushed-authorization-requests/
- RFC9101 - The OAuth 2.0 Authorization Framework: JWT-Secured Authorization Request (JAR) (JAR)
- JWT Secured Authorization Response Mode for OAuth 2.0 (JARM)
- RFC9207 - OAuth 2.0 Authorization Server Issuer Identification
- RFC9396 - OAuth 2.0 Rich Authorization Requests
-
refresh_tokengrant type - RFC8628 -
urn:ietf:params:oauth:grant-type:device_codegrant type - rfc8628 - RFC8693 -
urn:ietf:params:oauth:grant-type:token-exchangegrant type - rfc8693 -
urn:openid:params:grant-type:cibagrant type - OpenID Connect Client Initiated Backchannel Authentication Flow
-
- Resource
- Client
- Tokens
- Privacy
- Scheme
- RFC6750 - The OAuth 2.0 Authorization Framework: Bearer Token Usage
- RFC7800 - Proof-of-Possession Key Semantics for JSON Web Tokens (JWTs)
- RFC9449 - OAuth 2.0 Demonstrating Proof-of-Possession at the Application Layer (DPoP)
- RFC8705 - OAuth 2.0 Mutual-TLS Client Authentication and Certificate-Bound Access Tokens
- Authentication by reference
- Random string
- Verifiable token (signed UUID)
- Authentication by value
- Token Management
- RFC7662 - OAuth 2.0 Token Introspection
- RFC7009 - OAuth 2.0 Token Revocation
- (DRAFT) - JWT Response for OAuth Token Introspection - draft-ietf-oauth-jwt-introspection-response
- HTTP
- Authorization Server
- Standalone
- Caddy plugin
- Reverse Proxy
- Caddy plugin
- Authorization Server
- CoAP
- Authorization Server
- Standalone
- Authorization Server
- AWS
- Auhtorization Server
- AWS Lambda
- Auhtorization Server
- OAuth 2.0
- OAuth 2.0 Client Authentication
- OAuth 2.0 Security Best Current Practice
- Why you should stop using the OAuth implicit grant!
- OAuth 2.0 for Browser-Based Apps
- Financial-grade API - Part 1: Read-Only API Security Profile
- Financial-grade API - Part 2: Read and Write API Security Profile
- PKCE vs. Nonce: Equivalent or Not?
- An Extensive Formal Security Analysis of the OpenID Financial-grade API
- Mix-Up, Revisited
- Financial-grade API: JWT Secured Authorization Response Mode for OAuth 2.0 (JARM)