-
Notifications
You must be signed in to change notification settings - Fork 157
[ES-2712] OpenId global config readme update #1647
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Md-Humair-KK
wants to merge
1
commit into
mosip:develop
Choose a base branch
from
Infosys:ES-FapiReadMeUpdate
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,107 @@ | ||
| # Overview | ||
|
|
||
| This document describes the design and configuration of OpenID Server Profiles in eSignet. Server profiles enable organizations to enforce standards-based security features across all OIDC clients in a deployment, ensuring compliance with security standards like FAPI 2.0 while providing flexibility for custom security configurations. | ||
|
|
||
| It covers the following topics: | ||
| - Profile Configuration | ||
| - Profile-to-Feature Mapping | ||
| - Creating Custom Profiles | ||
| - Client Registration Behavior | ||
| - Runtime Execution | ||
|
|
||
| # Profile Configuration | ||
|
|
||
| On application startup, eSignet reads the global OpenID profile value from `mosip.esignet.server.profile` in `application_default.properties`. | ||
|
|
||
| The configured profile determines the default standards behavior for the deployment: | ||
|
|
||
| | Profile | PAR | DPoP | JWE | PKCE | Description | | ||
| |---------|-----|------|-----|------|-------------| | ||
| | `fapi2.0` | ✅ | ✅ | ❌ | ✅ | FAPI 2.0 Security Profile compliant - Enforces Pushed Authorization Requests, DPoP token binding, and PKCE for enhanced security | | ||
| | `none` | ❌ | ❌ | ❌ | ❌ | No enforced defaults; all security features are driven by client-level configuration via `additionalConfig` | | ||
|
|
||
| ## Configuration Property | ||
|
|
||
| ```properties | ||
| # Server profile options: | ||
| # fapi2.0 - FAPI 2.0 compliance with PAR, DPoP, and PKCE enforced | ||
| # none - No enforced defaults; client-level configuration applies | ||
| # <custom-defined> - Custom profile defined in server_profile table | ||
| mosip.esignet.server.profile=none | ||
| ``` | ||
|
|
||
| # Profile-to-Feature Mapping | ||
|
|
||
| eSignet loads the profile-to-feature mapping from a database table (`server_profile`) that defines which features (PAR, DPoP, JWE, PKCE) are enabled for each profile. This database-driven approach allows for dynamic profile management without code changes. | ||
|
|
||
| ## Server Profile Table Structure | ||
|
|
||
| | Profile | Feature | Additional Config Key | | ||
| |---------|---------|----------------------| | ||
| | `fapi2.0` | PAR | `require_pushed_authorization_requests` | | ||
| | `fapi2.0` | DPOP | `dpop_bound_access_tokens` | | ||
| | `fapi2.0` | PKCE | `require_pkce` | | ||
|
|
||
| The table maps each profile to its enabled features along with the corresponding `additionalConfig` key that controls the feature at runtime. | ||
|
|
||
| # Creating Custom Profiles | ||
|
|
||
| You can create your own custom profile with any combination of PAR, DPoP, JWE, and PKCE features by adding new entries to the `server_profile` table. This flexibility allows organizations to define security profiles that match their specific compliance requirements without requiring any code modifications. | ||
|
|
||
| ## Example: Creating a Custom Profile | ||
|
|
||
| To create a profile named `custom-secure` that enforces only PAR and PKCE: | ||
|
|
||
| ```sql | ||
| INSERT INTO server_profile (profile_name, additional_config_key, feature) VALUES | ||
| ('custom-secure', 'require_pushed_authorization_requests', 'PAR'), | ||
| ('custom-secure', 'require_pkce', 'PKCE'); | ||
| ``` | ||
|
|
||
| After adding the profile to the database, configure eSignet to use it: | ||
|
|
||
| ```properties | ||
| # Can be set to: fapi2.0 | none | <custom-defined-profile> | ||
| mosip.esignet.server.profile=custom-secure | ||
| ``` | ||
|
|
||
| This allows deployments to define their own security posture by mixing and matching features as needed. | ||
|
|
||
| # Client Registration Behavior | ||
|
|
||
| When an OIDC client is created or updated via the Client Management API, the behavior depends on the configured global profile: | ||
|
|
||
| ## Profile Mode: `none` | ||
|
|
||
| The relying party has full control over security features. They may explicitly configure PAR, DPoP, PKCE, and JWE via the `additionalConfig` field in the client registration request. This mode is suitable for deployments where different clients require different security configurations. | ||
|
|
||
| ## Profile Mode: Specific Profile (`fapi2.0` or custom) | ||
|
|
||
| The client-level flags provided in `additionalConfig` are ignored and the OIDC transaction will be updated by the selected profile's enforced feature set. This ensures uniform security enforcement across all clients in the deployment. | ||
|
|
||
| # Runtime Execution | ||
|
|
||
| During transaction initiation and runtime execution: | ||
|
|
||
| 1. **Profile Resolution**: eSignet resolves the effective configuration for the transaction based on the selected global profile from the `server_profile` table. | ||
|
|
||
| 2. **Feature Enforcement**: Authentication and authorization flows strictly enforce PAR, DPoP, JWE, and PKCE according to the active profile. Non-compliant requests are rejected with appropriate error responses. | ||
|
|
||
| 3. **Client Override Handling**: Client-specific overrides (via `additionalConfig`) are applied **only when the profile is `none`**. For all other profiles, the server-level configuration takes precedence. | ||
|
|
||
| # Summary | ||
|
|
||
| The OpenID Server Profile feature provides a powerful mechanism for organizations to: | ||
|
|
||
| - **Enforce compliance**: Apply security standards like FAPI 2.0 uniformly across all clients | ||
| - **Maintain flexibility**: Allow client-specific configurations when using `none` profile | ||
| - **Extend easily**: Create custom profiles via database entries without code changes | ||
| - **Ensure consistency**: Override client-level settings with server-level profiles for predictable security behavior | ||
|
|
||
| # References | ||
|
|
||
| - [OpenID FAPI2 Baseline Profile](https://openid.net/specs/fapi-2_0-baseline.html) | ||
| - [FAPI 2.0 Compliance in eSignet](fapi2-compliance.md) | ||
| - [OAuth 2.0 Pushed Authorization Requests (PAR)](https://www.rfc-editor.org/rfc/rfc9126) | ||
| - [OAuth 2.0 Demonstrating Proof-of-Possession (DPoP)](https://datatracker.ietf.org/doc/html/rfc9449) | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct
fapi2.0feature mapping (JWE enabled, PKCE not enforced).The
fapi2.0entries are currently inverted in multiple places: Line 20 and Line 27 document PKCE as enabled and JWE as disabled, and Lines 41-44 map PKCE instead of JWE. This will mislead operators and produce incorrect profile expectations.Proposed doc fix
Based on learnings: For the esignet OpenID profile feature configurations, the
fapi2.0profile enables only PAR, DPOP, and JWE features, and PKCE should not be included forfapi2.0.Also applies to: 27-27, 41-44
🤖 Prompt for AI Agents